OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / doc / makefile.texi
1 @c Copyright (C) 2001, 2002, 2003 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
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.
14
15 @item doc
16 Produce info-formatted documentation.  Also, @samp{make dvi} is
17 available for DVI-formatted documentation, and @samp{make
18 generated-manpages} to generate man pages.
19
20 @item mostlyclean
21 Delete the files made while building the compiler.
22
23 @item clean
24 That, and all the other files built by @samp{make all}.
25
26 @item distclean
27 That, and all the files created by @command{configure}.
28
29 @item maintainer-clean
30 Distclean plus any file that can be generated from other files.  Note
31 that additional tools may be required beyond what is normally needed to
32 build gcc.
33
34 @item install
35 Installs gcc.
36
37 @item uninstall
38 Deletes installed files.
39
40 @item check
41 Run the testsuite.  This creates a @file{testsuite} subdirectory that
42 has various @file{.sum} and @file{.log} files containing the results of
43 the testing.  You can run subsets with, for example, @samp{make check-gcc}.
44 You can specify specific tests by setting RUNTESTFLAGS to be the name
45 of the @file{.exp} file, optionally followed by (for some tests) an equals
46 and a file wildcard, like:
47
48 @smallexample
49 make check-gcc RUNTESTFLAGS="execute.exp=19980413-*"
50 @end smallexample
51
52 Note that running the testsuite may require additional tools be
53 installed, such as TCL or dejagnu.
54
55 @item bootstrap
56 Builds gcc three times---once with the native compiler, once with the
57 native-built compiler it just built, and once with the compiler it built
58 the second time.  In theory, the last two should produce the same
59 results, which @samp{make compare} can check.  Each step of this process
60 is called a ``stage'', and the results of each stage @var{N}
61 (@var{N} = 1@dots{}3) are copied to a subdirectory @file{stage@var{N}/}.
62
63 @item bootstrap-lean
64 Like @code{bootstrap}, except that the various stages are removed once
65 they're no longer needed.  This saves disk space.
66
67 @item bubblestrap
68 This incrementally rebuilds each of the three stages, one at a time.
69 It does this by ``bubbling'' the stages up from their subdirectories
70 (if they had been built previously), rebuilding them, and copying them
71 back to their subdirectories.  This will allow you to, for example,
72 continue a bootstrap after fixing a bug which causes the stage2 build
73 to crash.
74
75 @item quickstrap
76 Rebuilds the most recently built stage.  Since each stage requires
77 special invocation, using this target means you don't have to keep
78 track of which stage you're on or what invocation that stage needs.
79
80 @item cleanstrap
81 Removed everything (@samp{make clean}) and rebuilds (@samp{make bootstrap}).
82
83 @item restrap
84 Like @code{cleanstrap}, except that the process starts from the first
85 stage build, not from scratch.
86
87 @item stage@var{N} (@var{N} = 1@dots{}4)
88 For each stage, moves the appropriate files to the @file{stage@var{N}}
89 subdirectory.
90
91 @item unstage@var{N} (@var{N} = 1@dots{}4)
92 Undoes the corresponding @code{stage@var{N}}.
93
94 @item restage@var{N} (@var{N} = 1@dots{}4)
95 Undoes the corresponding @code{stage@var{N}} and rebuilds it with the
96 appropriate flags.
97
98 @item compare
99 Compares the results of stages 2 and 3.  This ensures that the compiler
100 is running properly, since it should produce the same object files
101 regardless of how it itself was compiled.
102
103 @item profiledbootstrap
104 Builds a compiler with profiling feedback information.  For more
105 information, see
106 @ref{Building,,Building with profile feedback,gccinstall,Installing GCC}.
107 This is actually a target in the top-level directory, which then
108 recurses into the @file{gcc} subdirectory multiple times.
109
110 @end table