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