Deleted Added
sdiff udiff text old ( 90075 ) new ( 103445 )
full compact
1@c Copyright (C) 2001, 2002 Free Software Foundation, Inc.
2@c This is part of the GCC manual.
3@c For copying conditions, see the file gcc.texi.
4
5@node Makefile
6@subsection Makefile Targets
7@cindex makefile targets
8@cindex targets, makefile
9
10@table @code
11@item all
12This is the default target. Depending on what your build/host/target
13configuration is, it coordinates all the things that need to be built.
14
15@item doc
16Produce info-formatted documentation. Also, @code{make dvi} is
17available for DVI-formatted documentation, and @code{make
18generated-manpages} to generate man pages.
19
20@item mostlyclean
21Delete the files made while building the compiler.
22
23@item clean
24That, and all the other files built by @code{make all}.
25
26@item distclean
27That, and all the files created by @code{configure}.
28
29@item extraclean
30That, and any temporary or intermediate files, like emacs backup files.
31
32@item maintainer-clean
33Distclean plus any file that can be generated from other files. Note
34that additional tools may be required beyond what is normally needed to
35build gcc.
36
37@item install
38Installs gcc.
39
40@item uninstall
41Deletes installed files.
42
43@item check
44Run the testsuite. This creates a @file{testsuite} subdirectory that
45has various @file{.sum} and @file{.log} files containing the results of
46the testing. You can run subsets with, for example, @code{make check-gcc}.
47You can specify specific tests by setting RUNTESTFLAGS to be the name
48of the @file{.exp} file, optionally followed by (for some tests) an equals
49and a file wildcard, like:
50
51@smallexample
52make check-gcc RUNTESTFLAGS="execute.exp=19980413-*"
53@end smallexample
54
55Note that running the testsuite may require additional tools be
56installed, such as TCL or dejagnu.
57
58@item bootstrap
59Builds gcc three times---once with the native compiler, once with the
60native-built compiler it just built, and once with the compiler it built
61the second time. In theory, the last two should produce the same
62results, which @code{make compare} can check. Each step of this process
63is called a ``stage'', and the results of each stage @var{N}
64(@var{N} = 1@dots{}3) are copied to a subdirectory @file{stage@var{N}/}.
65
66@item bootstrap-lean
67Like @code{bootstrap}, except that the various stages are removed once
68they're no longer needed. This saves disk space.
69
70@item bubblestrap
71Once bootstrapped, this incrementally rebuilds each of the three stages,
72one at a time. It does this by ``bubbling'' the stages up from their
73subdirectories, rebuilding them, and copying them back to their
74subdirectories. This will allow you to, for example, quickly rebuild a
75bootstrapped compiler after changing the sources, without having to do a
76full bootstrap.
77
78@item quickstrap
79Rebuilds the most recently built stage. Since each stage requires
80special invocation, using this target means you don't have to keep track
81of which stage you're on or what invocation that stage needs.
82
83@item cleanstrap
84Removed everything (@code{make clean}) and rebuilds (@code{make bootstrap}).
85
86@item stage@var{N} (@var{N} = 1@dots{}4)
87For each stage, moves the appropriate files to the @file{stage@var{N}}
88subdirectory.
89
90@item unstage@var{N} (@var{N} = 1@dots{}4)
91Undoes the corresponding @code{stage@var{N}}.
92
93@item restage@var{N} (@var{N} = 1@dots{}4)
94Undoes the corresponding @code{stage@var{N}} and rebuilds it with the
95appropriate flags.
96
97@item compare
98Compares the results of stages 2 and 3. This ensures that the compiler
99is running properly, since it should produce the same object files
100regardless of how it itself was compiled.
101
102@end table