📄 makefile.in
字号:
# It may not be quite desirable to delete unprotoize.c here,# but the spec for `make clean' requires it.# Using unprotoize.c is not quite right in the first place, # but what better way is there? -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready libgcc1.null -rm -f *.dvi# Delete all files that users would normally create# while building and installing GCC.distclean: clean -rm -f tm.h aux-output.c config.h md config.status tconfig.h hconfig.h -rm -f Makefile *.oaux -rm -fr stage1 stage2 stage3 stage4# Delete anything likely to be found in the source directory# that shouldn't be in the distribution.extraclean: distclean -rm -rf =* #* *~* config/=* config/#* config/*~* -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej -rm -f *.dvi *.oaux *.d *.Z *.tar *.xtar *diff -rm -f *lose config/*lose -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog# Get rid of every file that's generated from some other file.# Most of these files ARE PRESENT in the GCC distribution.realclean: distclean -rm -f c-parse.y objc-parse.y -rm -f cp-parse.c cp-parse.h cp-parse.output -rm -f objc-parse.c objc-parse.output -rm -f c-parse.c c-parse.h c-parse.output -rm -f cexp.c cexp.output TAGS -rm -f cpp.info* cpp.??s cpp.*aux -rm -f gcc.info* gcc.??s gcc.*aux -rm -f gplus.info* gplus.??s gplus.*aux# Entry points `install' and `uninstall'.# Also temporarily `install-fixincludes' could replace `install-headers'.# Also use `install-collect2' to install collect2 when the config files don't.# The semicolon is to prevent the install.sh -> install default rule# from doing anything.install: $(INSTALL_TARGET) ;# Copy the files of native compiler into directories where they will be run.install-native: install-common install-man install-libgcc# Copy the files of cross compiler into directories where they will be run.install-cross: install-common install-common-headers \ install-man install-cross-tools install-libgcc# Do nothing while making gcc with a cross-compiler. The person who# makes gcc for the target machine has to know how to put a complete# gcc together by hand.install-build: force @echo You have to install gcc on your target machine by hand.# Install the tools, libraries and header files for the target machine# where cross-compilation will look for them.# Use tooldir to find them.install-cross-tools: install-dir# The first if makes this a no-op except for a cross compiler.# The /. after the dirname causes test to follow symlinks.# Before making a link or an indirection script, # we verify the desired file does not already exist.# If a symlink does exist, then making a symlink would certainly fail, # leading us to overwrite the real file through the symlink. -if [ -f gcc-cross ] ; \ then \ if [ -d $(tooldir)/. ] ; \ then \ for file in as ld ar nm ranlib; do \ if [ -f $(libsubdir)/$$file ] ; \ then true; \ else \ rm -rf $(libsubdir)/$$file; \ $(SYMLINK) $(tooldir)/bin/$$file $(libsubdir)/$$file \ || (echo "#!/bin/sh"; echo $(tooldir)/bin/$$file "$$@") > $(libsubdir)/$$file; \ fi; \ done; \ for file in $(tooldir)/lib/*; do \ if [ -f $$file ] ; \ then \ if [ -f $(libsubdir)/`basename $$file` ] ; \ then true; \ else \ rm -rf $(libsubdir)/`basename $$file`; \ $(SYMLINK) $$file $(libsubdir)/`basename $$file` \ || $(INSTALL_DATA) $$file $(libsubdir)/`basename $$file`; \ fi; \ else true; \ fi; \ done; \ if [ -d $(tooldir)/include/. ] ; then \ rm -rf $(libsubdir)/sys-include; \ $(SYMLINK) $(tooldir)/include $(libsubdir)/sys-include \ || (if [ -d $(libsubdir)/sys-include ] ; then true ; else mkdir $(libsubdir)/sys-include ; fi; \ (cd $(tooldir)/include; tar cf - .) | (cd $(libsubdir)/sys-include; tar xpf -)); \ else true; fi; \ else true; \ fi; \ else true; \ fi;# Run this on the target machine# to finish installation of cross compiler.install-cross-rest: install-float-h-cross# Install float.h for cross compiler.# Run this on the target machine!install-float-h-cross:# I don't see what this line is for.# If you see what good it does, please tell me. -- rms. if [ -f enquire ] ; then true; else false; fi -./enquire -f > $(tmpdir)/float.h -rm -f $(libsubdir)/include/float.h $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h -rm -f $(tmpdir)/float.h chmod a-x $(libsubdir)/include/float.h# Create the installation directory.install-dir: -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; fi -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; fi -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; fi -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; fi -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; fi -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi -if [ -f gcc-cross ] ; \ then \ if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi ; \ if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi ; \ else true; \ fi# We don't use mkdir -p to create the parents of mandir,# because some systems don't support it.# Instead, we use this technique to create the immediate parent of mandir. -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \ if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi# Install the compiler executables built during cross compilation.# Deps on $(srcdir)/g++ $(srcdir)/c++ would be natural here,# but the latter would get confused with the target `c++'.#install-common: native install-dir xgcc $(EXTRA_PARTS)install-common: install-dir xgcc $(EXTRA_PARTS) for file in $(COMPILERS); do \ if [ -f $$file ] ; then \ rm -f $(libsubdir)/$$file; \ $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ else true; \ fi; \ done for file in $(EXTRA_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \ if [ x"$$file" != x.. ]; then \ rm -f $(libsubdir)/$$file; \ $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ else true; fi; \ done# Don't mess with specs if it doesn't exist yet. -if [ -f specs ] ; then \ rm -f $(libsubdir)/specs; \ $(INSTALL_DATA) specs $(libsubdir)/specs; \ fi# Install the driver program as gcc-$(target)# and also as either gcc (if native) or $(tooldir)/bin/gcc. -if [ -f gcc-cross ] ; then \ $(INSTALL_PROGRAM) gcc-cross $(bindir)/gcc-$(target); \ if [ -d $(tooldir)/bin/. ] ; then \ rm -f $(tooldir)/bin/gcc; \ $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \ else true; fi; \ else \ rm -f $(bindir)/gcc; \ $(INSTALL_PROGRAM) xgcc $(bindir)/gcc-2.3.3; \ ln -s /usr/bin/gcc $(bindir)/gcc-2.3.3 \ rm -f $(bindir)/gcc-$(target)-1; \ ln $(bindir)/gcc-2.3.3 $(bindir)/gcc-$(target)-1; \ mv $(bindir)/gcc-$(target)-1 $(bindir)/gcc-$(target); \ fi# Install protoize if it was compiled. -if [ -f protoize ]; \ then \ rm -f $(bindir)/protoize-2.3.3; \ $(INSTALL_PROGRAM) protoize $(bindir)/protoize-2.3.3; \ rm -f $(bindir)/unprotoize; \ $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize-2.3.3; \ rm -f $(libsubdir)/SYSCALLS.c.X; \ $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ -chmod a-x $(libsubdir)/SYSCALLS.c.X; \ fi -rm -f $(bindir)/c++-2.3.3 $(INSTALL_PROGRAM) $(srcdir)/c++ $(bindir)/c++-2.3.3 -rm -f $(bindir)/g++-2.3.3 $(INSTALL_PROGRAM) $(srcdir)/g++ $(bindir)/g++-2.3.3 -rm -f $(libsubdir)/cpp $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp# Install the man pages.install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 $(srcdir)/g++.1 -rm -f $(mandir)/gcc$(manext) $(GROFF) gcc.1 > gcc.0 $(GROFF) cccp.1 > cccp.0 $(GROFF) g++.1 > g++.0 -$(INSTALL_DATA) $(srcdir)/gcc.0 $(mandir)/gcc$(manext) -chmod a-x $(mandir)/gcc$(manext) -rm -f $(mandir)/cccp$(manext) $(mandir)/cpp$(manext) -$(INSTALL_DATA) $(srcdir)/cccp.0 $(mandir)/cccp$(manext) -chmod a-x $(mandir)/cccp$(manext) ln -s $(mandir)/cccp$(manext) $(mandir)/cpp$(manext) -$(INSTALL_DATA) $(srcdir)/g++.0 $(mandir)/g++$(manext) -chmod a-x $(mandir)/g++$(manext)# Install the library.install-libgcc: libgcc.a install-dir -if [ -f libgcc.a ] ; then \ rm -f $(libsubdir)/libgcc.a; \ $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \ if $(RANLIB_TEST) ; then \ (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \ chmod a-x $(libsubdir)/libgcc.a; \ else true; fi# Install the objc run time library.install-libobjc: libobjc.a install-dir -if [ -f libobjc.a ] ; then \ rm -f $(libsubdir)/libobjc.a; \ $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \ if $(RANLIB_TEST) ; then \ (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \ chmod a-x $(libsubdir)/libobjc.a; \ else true; fi# Install all the header files for native compiler.install-headers: install-common-headers install-float-h install-limits-h# Install float.h for native compiler.install-float-h: float.h install-dir -rm -f $(libsubdir)/include/float.h $(INSTALL_DATA) float.h $(libsubdir)/include/float.h -chmod a-x $(libsubdir)/include/float.h# Install limits.h.install-limits-h: xlimits.h install-dir -rm -f $(libsubdir)/include/limits.h $(INSTALL_DATA) xlimits.h $(libsubdir)/include/limits.h -chmod a-x $(libsubdir)/include/limits.h# Install the fixed headers that are the same for all machines.install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h gstddef.h gsyslimits.h assert.h -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi -chmod ugo+rx $(libsubdir)/include# Must compute $(libsubdir) before the cd; the awk script won't work after. -shelllibsubdir=$(libsubdir); \ cd $(srcdir); \ for file in $(USER_H); do \ rm -f $$shelllibsubdir/include/`basename $$file`; \ $(INSTALL_DATA) `basename $$file` $$shelllibsubdir/include/`basename $$file`; \ chmod a-x $$shelllibsubdir/include/`basename $$file`; \ done# Put assert.h in /usr/local/include, so it won't override GNU libc's assert.h.# Don't replace the assert.h already there if it is not from GCC.# This code would be simpler if it tested for -f ... && ! grep ...# but supposedly the ! operator is missing in sh on some systems. -if [ -f $(assertdir)/assert.h ]; \ then \ if grep "__eprintf" $(assertdir)/assert.h; \ then \ rm -f $(assertdir)/assert.h; \ $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \ chmod a-x $(assertdir)/assert.h; \ else true; \ fi; \ else \ rm -f $(assertdir)/assert.h; \ $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \ chmod a-x $(assertdir)/assert.h; \ fi -rm -f $(libsubdir)/include/syslimits.h $(INSTALL_DATA) $(srcdir)/gsyslimits.h $(libsubdir)/include/syslimits.h -chmod a-x $(libsubdir)/include/syslimits.h -rm -f $(libsubdir)/include/varargs.h $(INSTALL_DATA) $(srcdir)/gvarargs.h $(libsubdir)/include/varargs.h -chmod a-x $(libsubdir)/include/varargs.h -rm -f $(libsubdir)/include/stdarg.h $(INSTALL_DATA) $(srcdir)/gstdarg.h $(libsubdir)/include/stdarg.h -chmod a-x $(libsubdir)/include/stdarg.h -rm -f $(libsubdir)/include/stddef.h $(INSTALL_DATA) $(srcdir)/gstddef.h $(libsubdir)/include/stddef.h -chmod a-x $(libsubdir)/include/stddef.h# This is turned off because fixinc.svr4 can now get it directly from srcdir.## Copy byteorder.h into the object file directory ## so that fixinc.svr4 can get at it if necessary.## If the dirs are the same, this won't do anything.## Delete file first in case it is read-only# -if [ x`cd $(srcdir);pwd` != x`pwd` ]; then rm -f byteorder.h; else true; fi# -cp $(srcdir)/byteorder.h . > /dev/null 2>&1# $(libsubdir)/include:# -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi# -chmod ugo+rx $(libsubdir)/include# This appears not to work. It isn't clear how to fix it.# $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/$(FIXINCLUDES)# LIB=$(libsubdir)/include $(srcdir)/$(FIXINCLUDES)# $(INSTALL_DATA) $(srcdir)/fixincludes-README $@# chmod a-x $@# Run fixincludes in the proper directory.install-fixincludes: install-headers rm -rf $(libsubdir)/tmp mkdir $(libsubdir)/tmp# Move aside the headers that come from GCC; delete all else.# The sed command gets just the last file name component;# this is necessary because VPATH could add a dirname.# Using basename would be simpler, but some systems don't have it. cd $(libsubdir)/include; \ for file in $(INSTALLED_H); do \ realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ mv $$realfile ../tmp; \ done; \ rm -rf *# Install fixed copies of system files. for dir in $(SYSTEM_HEADER_DIR) $(O
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -