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