makefile.texi revision 132718
1132718Skan@c Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 290075Sobrien@c This is part of the GCC manual. 390075Sobrien@c For copying conditions, see the file gcc.texi. 490075Sobrien 590075Sobrien@node Makefile 690075Sobrien@subsection Makefile Targets 790075Sobrien@cindex makefile targets 890075Sobrien@cindex targets, makefile 990075Sobrien 1090075Sobrien@table @code 1190075Sobrien@item all 1290075SobrienThis is the default target. Depending on what your build/host/target 1390075Sobrienconfiguration is, it coordinates all the things that need to be built. 1490075Sobrien 1590075Sobrien@item doc 16132718SkanProduce info-formatted documentation and man pages. Essentially it 17132718Skancalls @samp{make man} and @samp{make info}. 1890075Sobrien 19132718Skan@item dvi 20132718SkanProduce DVI-formatted documentation. 21132718Skan 22132718Skan@item man 23132718SkanGenerate man pages. 24132718Skan 25132718Skan@item info 26132718SkanGenerate info-formatted pages. 27132718Skan 2890075Sobrien@item mostlyclean 2990075SobrienDelete the files made while building the compiler. 3090075Sobrien 3190075Sobrien@item clean 32117395SkanThat, and all the other files built by @samp{make all}. 3390075Sobrien 3490075Sobrien@item distclean 35117395SkanThat, and all the files created by @command{configure}. 3690075Sobrien 3790075Sobrien@item maintainer-clean 3890075SobrienDistclean plus any file that can be generated from other files. Note 3990075Sobrienthat additional tools may be required beyond what is normally needed to 4090075Sobrienbuild gcc. 4190075Sobrien 42132718Skan@item srcextra 43132718SkanGenerates files in the source directory that do not exist in CVS but 44132718Skanshould go into a release tarball. One example is @file{gcc/c-parse.c} 45132718Skanwhich is generated from the CVS source file @file{gcc/c-parse.in}. 46132718Skan 47132718Skan@item srcinfo 48132718Skan@itemx srcman 49132718SkanCopies the info-formatted and manpage documentation into the source 50132718Skandirectory usually for the purpose of generating a release tarball. 51132718Skan 5290075Sobrien@item install 5390075SobrienInstalls gcc. 5490075Sobrien 5590075Sobrien@item uninstall 5690075SobrienDeletes installed files. 5790075Sobrien 5890075Sobrien@item check 5990075SobrienRun the testsuite. This creates a @file{testsuite} subdirectory that 6090075Sobrienhas various @file{.sum} and @file{.log} files containing the results of 61117395Skanthe testing. You can run subsets with, for example, @samp{make check-gcc}. 6290075SobrienYou can specify specific tests by setting RUNTESTFLAGS to be the name 6390075Sobrienof the @file{.exp} file, optionally followed by (for some tests) an equals 6490075Sobrienand a file wildcard, like: 6590075Sobrien 66103445Skan@smallexample 6790075Sobrienmake check-gcc RUNTESTFLAGS="execute.exp=19980413-*" 68103445Skan@end smallexample 6990075Sobrien 7090075SobrienNote that running the testsuite may require additional tools be 7190075Sobrieninstalled, such as TCL or dejagnu. 7290075Sobrien 7390075Sobrien@item bootstrap 74132718SkanBuilds GCC three times---once with the native compiler, once with the 7590075Sobriennative-built compiler it just built, and once with the compiler it built 7690075Sobrienthe second time. In theory, the last two should produce the same 77117395Skanresults, which @samp{make compare} can check. Each step of this process 7890075Sobrienis called a ``stage'', and the results of each stage @var{N} 7990075Sobrien(@var{N} = 1@dots{}3) are copied to a subdirectory @file{stage@var{N}/}. 8090075Sobrien 8190075Sobrien@item bootstrap-lean 8290075SobrienLike @code{bootstrap}, except that the various stages are removed once 8390075Sobrienthey're no longer needed. This saves disk space. 8490075Sobrien 8590075Sobrien@item bubblestrap 86132718SkanThis incrementally rebuilds each of the three stages, one at a time. 87132718SkanIt does this by ``bubbling'' the stages up from their subdirectories 88132718Skan(if they had been built previously), rebuilding them, and copying them 89132718Skanback to their subdirectories. This will allow you to, for example, 90132718Skancontinue a bootstrap after fixing a bug which causes the stage2 build 91132718Skanto crash. 9290075Sobrien 9390075Sobrien@item quickstrap 9490075SobrienRebuilds the most recently built stage. Since each stage requires 95132718Skanspecial invocation, using this target means you don't have to keep 96132718Skantrack of which stage you're on or what invocation that stage needs. 9790075Sobrien 9890075Sobrien@item cleanstrap 99117395SkanRemoved everything (@samp{make clean}) and rebuilds (@samp{make bootstrap}). 10090075Sobrien 101132718Skan@item restrap 102132718SkanLike @code{cleanstrap}, except that the process starts from the first 103132718Skanstage build, not from scratch. 104132718Skan 10590075Sobrien@item stage@var{N} (@var{N} = 1@dots{}4) 10690075SobrienFor each stage, moves the appropriate files to the @file{stage@var{N}} 10790075Sobriensubdirectory. 10890075Sobrien 10990075Sobrien@item unstage@var{N} (@var{N} = 1@dots{}4) 11090075SobrienUndoes the corresponding @code{stage@var{N}}. 11190075Sobrien 11290075Sobrien@item restage@var{N} (@var{N} = 1@dots{}4) 11390075SobrienUndoes the corresponding @code{stage@var{N}} and rebuilds it with the 11490075Sobrienappropriate flags. 11590075Sobrien 11690075Sobrien@item compare 11790075SobrienCompares the results of stages 2 and 3. This ensures that the compiler 11890075Sobrienis running properly, since it should produce the same object files 11990075Sobrienregardless of how it itself was compiled. 12090075Sobrien 121132718Skan@item profiledbootstrap 122132718SkanBuilds a compiler with profiling feedback information. For more 123132718Skaninformation, see 124132718Skan@ref{Building,,Building with profile feedback,gccinstall,Installing GCC}. 125132718SkanThis is actually a target in the top-level directory, which then 126132718Skanrecurses into the @file{gcc} subdirectory multiple times. 127132718Skan 12890075Sobrien@end table 129