makefile.texi revision 103445
190075Sobrien@c Copyright (C) 2001, 2002 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 1690075SobrienProduce info-formatted documentation. Also, @code{make dvi} is 1790075Sobrienavailable for DVI-formatted documentation, and @code{make 1890075Sobriengenerated-manpages} to generate man pages. 1990075Sobrien 2090075Sobrien@item mostlyclean 2190075SobrienDelete the files made while building the compiler. 2290075Sobrien 2390075Sobrien@item clean 2490075SobrienThat, and all the other files built by @code{make all}. 2590075Sobrien 2690075Sobrien@item distclean 2790075SobrienThat, and all the files created by @code{configure}. 2890075Sobrien 2990075Sobrien@item extraclean 3090075SobrienThat, and any temporary or intermediate files, like emacs backup files. 3190075Sobrien 3290075Sobrien@item maintainer-clean 3390075SobrienDistclean plus any file that can be generated from other files. Note 3490075Sobrienthat additional tools may be required beyond what is normally needed to 3590075Sobrienbuild gcc. 3690075Sobrien 3790075Sobrien@item install 3890075SobrienInstalls gcc. 3990075Sobrien 4090075Sobrien@item uninstall 4190075SobrienDeletes installed files. 4290075Sobrien 4390075Sobrien@item check 4490075SobrienRun the testsuite. This creates a @file{testsuite} subdirectory that 4590075Sobrienhas various @file{.sum} and @file{.log} files containing the results of 4690075Sobrienthe testing. You can run subsets with, for example, @code{make check-gcc}. 4790075SobrienYou can specify specific tests by setting RUNTESTFLAGS to be the name 4890075Sobrienof the @file{.exp} file, optionally followed by (for some tests) an equals 4990075Sobrienand a file wildcard, like: 5090075Sobrien 51103445Skan@smallexample 5290075Sobrienmake check-gcc RUNTESTFLAGS="execute.exp=19980413-*" 53103445Skan@end smallexample 5490075Sobrien 5590075SobrienNote that running the testsuite may require additional tools be 5690075Sobrieninstalled, such as TCL or dejagnu. 5790075Sobrien 5890075Sobrien@item bootstrap 5990075SobrienBuilds gcc three times---once with the native compiler, once with the 6090075Sobriennative-built compiler it just built, and once with the compiler it built 6190075Sobrienthe second time. In theory, the last two should produce the same 6290075Sobrienresults, which @code{make compare} can check. Each step of this process 6390075Sobrienis called a ``stage'', and the results of each stage @var{N} 6490075Sobrien(@var{N} = 1@dots{}3) are copied to a subdirectory @file{stage@var{N}/}. 6590075Sobrien 6690075Sobrien@item bootstrap-lean 6790075SobrienLike @code{bootstrap}, except that the various stages are removed once 6890075Sobrienthey're no longer needed. This saves disk space. 6990075Sobrien 7090075Sobrien@item bubblestrap 7190075SobrienOnce bootstrapped, this incrementally rebuilds each of the three stages, 7290075Sobrienone at a time. It does this by ``bubbling'' the stages up from their 7390075Sobriensubdirectories, rebuilding them, and copying them back to their 7490075Sobriensubdirectories. This will allow you to, for example, quickly rebuild a 7590075Sobrienbootstrapped compiler after changing the sources, without having to do a 7690075Sobrienfull bootstrap. 7790075Sobrien 7890075Sobrien@item quickstrap 7990075SobrienRebuilds the most recently built stage. Since each stage requires 8090075Sobrienspecial invocation, using this target means you don't have to keep track 8190075Sobrienof which stage you're on or what invocation that stage needs. 8290075Sobrien 8390075Sobrien@item cleanstrap 8490075SobrienRemoved everything (@code{make clean}) and rebuilds (@code{make bootstrap}). 8590075Sobrien 8690075Sobrien@item stage@var{N} (@var{N} = 1@dots{}4) 8790075SobrienFor each stage, moves the appropriate files to the @file{stage@var{N}} 8890075Sobriensubdirectory. 8990075Sobrien 9090075Sobrien@item unstage@var{N} (@var{N} = 1@dots{}4) 9190075SobrienUndoes the corresponding @code{stage@var{N}}. 9290075Sobrien 9390075Sobrien@item restage@var{N} (@var{N} = 1@dots{}4) 9490075SobrienUndoes the corresponding @code{stage@var{N}} and rebuilds it with the 9590075Sobrienappropriate flags. 9690075Sobrien 9790075Sobrien@item compare 9890075SobrienCompares the results of stages 2 and 3. This ensures that the compiler 9990075Sobrienis running properly, since it should produce the same object files 10090075Sobrienregardless of how it itself was compiled. 10190075Sobrien 10290075Sobrien@end table 103