aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/makefile.texi
blob: 1995e5824a3cdf459f2261fd99d3e6b5d077e00c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
@c Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.

@node Makefile
@subsection Makefile Targets
@cindex makefile targets
@cindex targets, makefile

@table @code
@item all
This is the default target.  Depending on what your build/host/target
configuration is, it coordinates all the things that need to be built.

@item doc
Produce info-formatted documentation.  Also, @samp{make dvi} is
available for DVI-formatted documentation, and @samp{make
generated-manpages} to generate man pages.

@item mostlyclean
Delete the files made while building the compiler.

@item clean
That, and all the other files built by @samp{make all}.

@item distclean
That, and all the files created by @command{configure}.

@item maintainer-clean
Distclean plus any file that can be generated from other files.  Note
that additional tools may be required beyond what is normally needed to
build gcc.

@item install
Installs gcc.

@item uninstall
Deletes installed files.

@item check
Run the testsuite.  This creates a @file{testsuite} subdirectory that
has various @file{.sum} and @file{.log} files containing the results of
the testing.  You can run subsets with, for example, @samp{make check-gcc}.
You can specify specific tests by setting RUNTESTFLAGS to be the name
of the @file{.exp} file, optionally followed by (for some tests) an equals
and a file wildcard, like:

@smallexample
make check-gcc RUNTESTFLAGS="execute.exp=19980413-*"
@end smallexample

Note that running the testsuite may require additional tools be
installed, such as TCL or dejagnu.

@item bootstrap
Builds gcc three times---once with the native compiler, once with the
native-built compiler it just built, and once with the compiler it built
the second time.  In theory, the last two should produce the same
results, which @samp{make compare} can check.  Each step of this process
is called a ``stage'', and the results of each stage @var{N}
(@var{N} = 1@dots{}3) are copied to a subdirectory @file{stage@var{N}/}.

@item bootstrap-lean
Like @code{bootstrap}, except that the various stages are removed once
they're no longer needed.  This saves disk space.

@item bubblestrap
This incrementally rebuilds each of the three stages, one at a time.
It does this by ``bubbling'' the stages up from their subdirectories
(if they had been built previously), rebuilding them, and copying them
back to their subdirectories.  This will allow you to, for example,
continue a bootstrap after fixing a bug which causes the stage2 build
to crash.

@item quickstrap
Rebuilds the most recently built stage.  Since each stage requires
special invocation, using this target means you don't have to keep
track of which stage you're on or what invocation that stage needs.

@item cleanstrap
Removed everything (@samp{make clean}) and rebuilds (@samp{make bootstrap}).

@item restrap
Like @code{cleanstrap}, except that the process starts from the first
stage build, not from scratch.

@item stage@var{N} (@var{N} = 1@dots{}4)
For each stage, moves the appropriate files to the @file{stage@var{N}}
subdirectory.

@item unstage@var{N} (@var{N} = 1@dots{}4)
Undoes the corresponding @code{stage@var{N}}.

@item restage@var{N} (@var{N} = 1@dots{}4)
Undoes the corresponding @code{stage@var{N}} and rebuilds it with the
appropriate flags.

@item compare
Compares the results of stages 2 and 3.  This ensures that the compiler
is running properly, since it should produce the same object files
regardless of how it itself was compiled.

@item profiledbootstrap
Builds a compiler with profiling feedback information.  For more
information, see
@ref{Building,,Building with profile feedback,gccinstall,Installing GCC}.
This is actually a target in the top-level directory, which then
recurses into the @file{gcc} subdirectory multiple times.

@end table