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.
6 @subsection Makefile Targets
7 @cindex makefile targets
8 @cindex targets, makefile
12 This is the default target. Depending on what your build/host/target
13 configuration is, it coordinates all the things that need to be built.
16 Produce info-formatted documentation. Also, @code{make dvi} is
17 available for DVI-formatted documentation, and @code{make
18 generated-manpages} to generate man pages.
21 Delete the files made while building the compiler.
24 That, and all the other files built by @code{make all}.
27 That, and all the files created by @code{configure}.
30 That, and any temporary or intermediate files, like emacs backup files.
32 @item maintainer-clean
33 Distclean plus any file that can be generated from other files. Note
34 that additional tools may be required beyond what is normally needed to
41 Deletes installed files.
44 Run the testsuite. This creates a @file{testsuite} subdirectory that
45 has various @file{.sum} and @file{.log} files containing the results of
46 the testing. You can run subsets with, for example, @code{make check-gcc}.
47 You can specify specific tests by setting RUNTESTFLAGS to be the name
48 of the @file{.exp} file, optionally followed by (for some tests) an equals
49 and a file wildcard, like:
52 make check-gcc RUNTESTFLAGS="execute.exp=19980413-*"
55 Note that running the testsuite may require additional tools be
56 installed, such as TCL or dejagnu.
59 Builds gcc three times---once with the native compiler, once with the
60 native-built compiler it just built, and once with the compiler it built
61 the second time. In theory, the last two should produce the same
62 results, which @code{make compare} can check. Each step of this process
63 is 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}/}.
67 Like @code{bootstrap}, except that the various stages are removed once
68 they're no longer needed. This saves disk space.
71 Once bootstrapped, this incrementally rebuilds each of the three stages,
72 one at a time. It does this by ``bubbling'' the stages up from their
73 subdirectories, rebuilding them, and copying them back to their
74 subdirectories. This will allow you to, for example, quickly rebuild a
75 bootstrapped compiler after changing the sources, without having to do a
79 Rebuilds the most recently built stage. Since each stage requires
80 special invocation, using this target means you don't have to keep track
81 of which stage you're on or what invocation that stage needs.
84 Removed everything (@code{make clean}) and rebuilds (@code{make bootstrap}).
86 @item stage@var{N} (@var{N} = 1@dots{}4)
87 For each stage, moves the appropriate files to the @file{stage@var{N}}
90 @item unstage@var{N} (@var{N} = 1@dots{}4)
91 Undoes the corresponding @code{stage@var{N}}.
93 @item restage@var{N} (@var{N} = 1@dots{}4)
94 Undoes the corresponding @code{stage@var{N}} and rebuilds it with the
98 Compares the results of stages 2 and 3. This ensures that the compiler
99 is running properly, since it should produce the same object files
100 regardless of how it itself was compiled.