home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / NeXT / GnuSource / cc-61.0.1 / cc / Makefile.in < prev    next >
Makefile  |  1992-02-07  |  50KB  |  1,311 lines

  1. # Makefile for GNU C compiler.
  2. #   Copyright (C) 1987, 1988, 1990, 1991 Free Software Foundation, Inc.
  3.  
  4. #This file is part of GNU CC.
  5.  
  6. #GNU CC is free software; you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation; either version 2, or (at your option)
  9. #any later version.
  10.  
  11. #GNU CC is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. #GNU General Public License for more details.
  15.  
  16. #You should have received a copy of the GNU General Public License
  17. #along with GNU CC; see the file COPYING.  If not, write to
  18. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # The targets for external use include:
  21. # all, doc, proto, install, install-cross, install-cross-rest,
  22. # uninstall, includes, TAGS,
  23. # mostlyclean, clean, cleanconfig, realclean,
  24. # stage1, stage2, stage3, stage4.
  25.  
  26. # Variables that exist for you to override.
  27. # See below for how to change them for certain systems.
  28.  
  29. # Selection of languages to be made.
  30. LANGUAGES = c c++ objc
  31.  
  32. ALLOCA =
  33. ALLOCA_FLAGS = -S -Demacs
  34. ALLOCA_FINISH = as -o alloca.o alloca.s
  35. CFLAGS = -g $(XCFLAGS)
  36. # Make it possible to specify additional options for use
  37. # when compiling something with the GCC that was just built.
  38. GCC_CFLAGS = $(ALL_CFLAGS)
  39. # Delete the MERGED flag entirely when version 1 is done with.
  40. INTERNAL_CFLAGS = -DMERGED=1 $(CROSS)
  41. CC = cc
  42. BISON = bison
  43. BISONFLAGS = -v
  44. AR = ar
  45. OLDAR_FLAGS = qc
  46. AR_FLAGS = rc
  47. SHELL = /bin/sh
  48. # on sysV, define this as cp.
  49. INSTALL = install -c
  50. # These permit overriding just for certain files.
  51. INSTALL_PROGRAM = $(INSTALL)
  52. INSTALL_DATA = $(INSTALL)
  53. SYMLINK = ln -s
  54.  
  55. # Define this as & to perform parallel make on a Sequent.
  56. # Note that this has some bugs, and it seems currently necessary 
  57. # to compile all the gen* files first by hand to avoid erroneous results.
  58. P =
  59.  
  60. # How to invoke ranlib.
  61. RANLIB = ranlib
  62. # Test to use to see whether ranlib exists on the system.
  63. RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
  64.  
  65. # Compiler to use for compiling gnulib1.
  66. # OLDCC should not be the GNU C compiler,
  67. # since that would compile typical gnulib1 functions such as mulsi3
  68. # into infinite recursions.
  69. OLDCC = cc
  70.  
  71. # CFLAGS for use with OLDCC, for compiling gnulib1.
  72. # NOTE: -O does not work on some Unix systems!
  73. CCLIBFLAGS = -O
  74.  
  75. # Version of ar to use when compiling gnulib1. 
  76. OLDAR = ar
  77.  
  78. # The GCC to use for compiling GNULIB2.  Usually the one we just built.
  79. GCC_FOR_TARGET = ./gcc -B./
  80.  
  81. # Special flags for compiling enquire.
  82. ENQUIRE_CFLAGS = -DNO_SC -DNO_MEM -DNO_STDDEF $(CFLAGS)
  83. ENQUIRE_LDFLAGS = $(LDFLAGS)
  84.  
  85. # Tools to use when building a cross-compiler.
  86. # These are used because `configure' appends `cross-make'
  87. # to the makefile when making a cross-compiler.
  88.  
  89. TARGET_TOOLPREFIX = $(tooldir)/bin/
  90. AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
  91. AR_FOR_TARGET_FLAGS = rc
  92. RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
  93. RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
  94. CROSS_TOOLS =
  95.  
  96. target= ... `configure' substitutes actual target name here.
  97. host_make_var_file= ... `configure' substitutes actual make- file name here.
  98. version=`awk '{print substr ($$4, 2, length ($$4) - 3); }' $(srcdir)/version.c`
  99.  
  100. # Directory where sources are, from where we are.
  101. srcdir = .
  102. # Common prefix for installation directories.
  103. # NOTE: This directory must exist when you start installation.
  104. prefix = /usr/local
  105. # Directory in which to put the executable for the command `gcc'
  106. bindir = $(prefix)/bin
  107. # Directory in which to put the directories used by the compiler.
  108. libdir = $(prefix)/lib
  109. # Directory in which the compiler finds executables, libraries, etc.
  110. libsubdir = $(libdir)/gcc/$(target)/$(version)
  111. # Number to put in man-page filename.
  112. manext = .1
  113. # Directory in which to put man pages.
  114. mandir = $(prefix)/man/man1
  115. # Directory in which to find other cross-compilation tools and headers.
  116. # Used in install-cross.
  117. tooldir = $(prefix)/$(target)
  118.  
  119. # Additional system libraries to link with.
  120. CLIB=-lsys_s
  121.  
  122. # Change this to a null string if obstacks are installed in the
  123. # system library.
  124. OBSTACK=obstack.o
  125.  
  126. # Specify the rule for actually making gnulib1.
  127. GNULIB1 = gnulib1
  128.  
  129. # Specify the rule for actually making gnulib2.
  130. GNULIB2 = gnulib2
  131.  
  132. # Options to use when compiling gnulib2.
  133. GNULIB2_CFLAGS = -O2
  134.  
  135. # List of extra executables that should be compiled for this target machine.
  136. # The rules for compiling them should be in the make-* file for the machine.
  137. EXTRA_PASSES =
  138.  
  139. # List of extra C and assembler files to add to gnulib1.
  140. # Assembler files should have names ending in `.asm'.
  141. LIB1FUNCS_EXTRA = 
  142.  
  143. # List of extra C and assembler files to add to gnulib2.
  144. # Assembler files should have names ending in `.asm'.
  145. LIB2FUNCS_EXTRA = 
  146.  
  147. # Program to convert libraries.
  148. LIBCONVERT = 
  149.  
  150. # Control whether header files are installed.
  151. INSTALL_HEADERS=install-headers
  152.  
  153. # Change this to empty to prevent installing limits.h
  154. LIMITS_H = limits.h
  155.  
  156. # Directory to link to, when using the target `maketest'.
  157. DIR = ../gcc
  158.  
  159. # Flags to use when cross-building GCC.
  160. # Prefix to apply to names of object files when using them
  161. # to run on the machine we are compiling on.
  162. HOST_PREFIX=
  163. # Prefix to apply to names of object files when compiling them
  164. # to run on the machine we are compiling on.
  165. # The default for this variable is chosen to keep these rules 
  166. # out of the way of the other rules for compiling the same source files.
  167. HOST_PREFIX_1=loser-
  168. HOST_CC=$(CC)
  169. HOST_CFLAGS=$(ALL_CFLAGS)
  170. HOST_LDFLAGS=$(LDFLAGS)
  171. HOST_CPPFLAGS=$(CPPFLAGS)
  172.  
  173. # Choose the real default target.
  174. ALL=all.internal
  175.  
  176. # Choose the real install target.
  177. INSTALL_TARGET=install-native
  178.  
  179. # End of variables for you to override.
  180.  
  181. # Definition of `all' is here so that new rules inserted by sed
  182. # do not specify the default target.
  183. # The real definition is under `all.internal' (for native compilers)
  184. # or `all.cross' (for cross compilers).
  185. all: $(ALL)
  186.  
  187. # sed inserts variable overrides after the following line.
  188. ####
  189.  
  190. # Now figure out from those variables how to compile and link.
  191.  
  192. # This is the variable actually used when we compile.
  193. ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CFLAGS)
  194.  
  195. # Even if ALLOCA is set, don't use it if compiling with GCC.
  196. USE_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" ] ; then echo ${ALLOCA}; else true; fi`
  197. USE_HOST_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" -a x"${ALLOCA}" != x ] ; then echo ${HOST_PREFIX}${ALLOCA}; else true; fi`
  198. USE_HOST_MALLOC= `if [ x"${MALLOC}" != x ] ; then echo ${HOST_PREFIX}${MALLOC}; else true; fi`
  199. USE_HOST_OBSTACK= `if [ x"${OBSTACK}" != x ] ; then echo ${HOST_PREFIX}${OBSTACK}; else true; fi`
  200.  
  201. COMMON_OBJS = makeUser.o make_support.o
  202.  
  203. makeUser.o : make.h
  204.  
  205. makeUser.c make.h : make.defs
  206.     mig make.defs
  207.  
  208. # Dependency on obstack, alloca, malloc or whatever library facilities
  209. # are not installed in the system libraries.
  210. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  211. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC) $(COMMON_OBJS)
  212.  
  213. # Likewise, for use in the tools that must run on this machine
  214. # even if we are cross-building GCC.
  215. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  216. HOST_LIBDEPS= $(HOST_PREFIX)$(OBSTACK) $(HOST_PREFIX)$(ALLOCA) $(HOST_PREFIX)$(MALLOC)
  217.  
  218. # How to link with both our special library facilities
  219. # and the system's installed libraries.
  220. LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(COMMON_OBJS) $(CLIB)
  221.  
  222. # Likewise, for use in the tools that must run on this machine
  223. # even if we are cross-building GCC.
  224. HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC) $(CLIB)
  225.  
  226. HOST_RTL = $(HOST_PREFIX)rtl.o
  227. HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
  228.  
  229. # Specify the directories to be searched for header files.
  230. # Both . and srcdir are used, in that order,
  231. # so that tm.h and config.h will be found in the compilation
  232. # subdirectory rather than in the source directory.
  233. INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
  234. SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
  235.  
  236. # Always use -I$(srcdir)/config when compiling.
  237. .c.o:
  238.     $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
  239.  
  240. # This tells GNU make version 3 not to export all the variables
  241. # defined in this file into the environment.
  242. .NOEXPORT:
  243.  
  244. # Lists of files for various purposes.
  245.  
  246. # A list of all the language-specific executables.
  247. COMPILERS = cc1 cc1plus cc1obj
  248.  
  249. # Language-specific object files for C.
  250. C_OBJS = c-parse.tab.o c-decl.o c-typeck.o c-lang.o c-convert.o \
  251.    c-aux-info.o c-common.o dbxout.o
  252.  
  253. # Language-specific object files for Objectionable C.
  254. OBJC_OBJS = objc-parse.o objc-actions.o \
  255.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o dbxout.o
  256.  
  257. # Language-specific object files for C++.
  258. CPLUS_OBJS = cplus-lang.o cplus-tab.o cplus-decl.o cplus-decl2.o \
  259.    cplus-typeck.o cplus-type2.o cplus-tree.o cplus-ptree.o \
  260.    cplus-cvt.o cplus-search.o cplus-lex.o cplus-gc.o cplus-call.o \
  261.    cplus-class.o cplus-init.o cplus-method.o cplus-except.o \
  262.    cplus-expr.o cplus-pt.o cplus-edsel.o cplus-xref.o c-common.o \
  263.    cplus-dbxout.o $(CPLUS_INPUT)
  264.  
  265. # Language-independent object files.
  266. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  267.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  268.  rtl.o rtlanal.o sdbout.o dwarfout.o emit-rtl.o insn-emit.o \
  269.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  270.  regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
  271.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  272.  insn-recog.o insn-extract.o insn-output.o \
  273.  insn-attrtab.o aux-output.o
  274.  
  275. # GEN files are listed separately, so they can be built before doing parallel
  276. #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
  277. #  them before rtl.o is compiled.
  278. GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
  279.  
  280. # Files to be copied away after each stage in building.
  281. STAGE_GCC=gcc
  282. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  283.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  284.  insn-attr.h insn-attrtab.c \
  285.  stamp-flags stamp-config stamp-codes \
  286.  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
  287.  stamp-attr stamp-attrtab \
  288.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  289.  genattrtab genattr \
  290.  cpp cccp cc1 cc1plus cc1obj enquire protoize unprotoize 
  291.  
  292. # Members of gnulib1.
  293. LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
  294.    _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
  295.    _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
  296.    _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
  297.    _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
  298.    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
  299.    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
  300.  
  301. # Library members defined in gnulib2.c.
  302. LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
  303.      _lshrdi3 _lshldi3 _ashldi3 _ashrdi3  \
  304.     _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
  305.     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
  306.     _varargs _eprintf _builtin_new _builtin_New _builtin_del \
  307.     _bb _shtab _clear_cache _trampoline
  308.  
  309. # Header files that are made available to programs compiled with gcc.
  310. USER_H = stddef.h assert.h va-i860.h va-mips.h va-pyr.h va-sparc.h \
  311.     va-spur.h va-m88k.h $(LIMIT_H) proto.h
  312.  
  313. # The files that "belong" in CONFIG_H are deliberately omitted
  314. # because having them there would not be useful in actual practice.
  315. # All they would do is cause complete recompilation every time
  316. # one of the machine description files is edited.
  317. # That may or may not be what one wants to do.
  318. # If it is, rm *.o is an easy way to do it.
  319. # CONFIG_H = config.h tm.h
  320. CONFIG_H =
  321. RTL_H = rtl.h rtl.def machmode.h machmode.def
  322. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  323. CPLUS_TREE_H = $(TREE_H) cplus-tree.h cplus-tree.def
  324.  
  325. Makefile: $(srcdir)/Makefile.in $(srcdir)/configure \
  326.    $(srcdir)/config/$(host_make_var_file)
  327.     sh config.status
  328.  
  329. all.internal: start.encap rest.encap
  330. # This is what to compile if making a cross-compiler.
  331. all.cross: native gcc-cross
  332. # This is what must be made before installing GCC and converting libraries.
  333. start.encap: native gcc $(GNULIB1_TARGET)
  334. # Use this to make a GCC that will be used only to recompile GCC.
  335. for-bootstrap: start.encap gnulib
  336. # These can't be made, with COFF encapsulation, until after GCC can run.
  337. rest.encap: gnulib float.h proto
  338. # This is what is made with the host's compiler
  339. # whether making a cross compiler or not.
  340. native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES)
  341.  
  342. # Define the names for selecting languages in LANGUAGES.
  343. c: cc1
  344. c++: cc1plus
  345. objc: cc1obj
  346. class-c: cc1obj
  347. objective-c: cc1obj
  348.  
  349. config.status:
  350.     @echo You must configure gcc.  Look at the INSTALL file for details.
  351.     @false
  352.  
  353. compilations: ${OBJS}
  354.  
  355. gcc: gcc.o version.o $(LIBDEPS)
  356.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
  357. # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
  358.     mv -f gccnew gcc
  359. # Dump a specs file to make -B./ read these specs over installed ones
  360.     -rm -f specs
  361.     ./gcc -dumpspecs > specs
  362.  
  363. # We do want to create an executable named `gcc', so we can use it to
  364. # compile gnulib2.
  365. # Also create gcc-cross, so that install-common will install properly.
  366. gcc-cross: gcc
  367.     -rm -f gcc-cross
  368.     cp gcc gcc-cross
  369.  
  370. cc1:$(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
  371.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(LIBS)
  372.  
  373. cc1plus:$(P) $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
  374.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS)
  375.  
  376. cc1obj:$(P) $(OBJC_OBJS) $(OBJS) $(LIBDEPS)
  377.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(LIBS) \
  378.     -sectorder __TEXT __text $(srcdir)/gmon.order -e start
  379.  
  380. float.h: enquire
  381.     -./enquire -f > float.h
  382.  
  383. # Used to compile enquire with standard cc, but have forgotten why.
  384. # Let's try with GCC.
  385. enquire: enquire.o gnulib
  386.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
  387. enquire.o: $(srcdir)/enquire.c gcc cc1 cpp
  388.     -cp $(srcdir)/enquire.c . > /dev/null 2>&1
  389.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CPPFLAGS) $(ENQUIRE_CFLAGS) -I. \
  390.         -c enquire.c
  391.  
  392. # Build gnulib.
  393. # This is done in two parts because some functions, in gnulib1.c,
  394. # must be compiled with something other than gcc,
  395. # while the rest, in gnulib2.c, must be compiled with gcc.
  396. # That means we can't do gnulib2.c until after gcc, cc1, etc.
  397.  
  398. # Use this as value of GNULIB1 to cause conversion to GNU library format.
  399. # LIBCONVERT should put its output in gnulib1.conv.
  400. gnulib1.conv: gnulib1
  401.     $(LIBCONVERT) gnulib1 gnulib1.conv
  402.  
  403. # Use this as value of GNULIB1 to inhibit use of gnulib1.c entirely.
  404. # Make an empty file instead.
  405. gnulib1.null: $(CROSS_TOOLS)
  406.     echo "__foo () {}" > dummy.c
  407.     $(GCC_FOR_TARGET) $(CCLIBFLAGS) -c dummy.c
  408.     $(OLDAR) $(OLDAR_FLAGS) gnulib1.null dummy.o
  409.  
  410. # Compile the library of arithmetic subroutines with the native compiler.
  411. # Don't compile it with gcc!
  412. # (That would cause most arithmetic functions to call themselves.)
  413. gnulib1: gnulib1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
  414.     -rm -f tmpgnulib1
  415. # Actually build it in tmpgnulib1, then rename at end,
  416. # so that gnulib1 itself remains nonexistent if compilation is aborted.
  417. # -e causes any failing command to make this rule fail.
  418. # -e doesn't work in certain shells, so we test $$? as well.
  419.     set -e; \
  420.     for name in $(LIB1FUNCS); \
  421.     do \
  422.       echo $${name}; \
  423.       rm -f $${name}.c; \
  424.       cp $(srcdir)/gnulib1.c $${name}.c; \
  425.       $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $${name}.c; \
  426.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  427.       $(OLDAR) $(OLDAR_FLAGS) tmpgnulib1 $${name}.o; \
  428.       rm -f $${name}.[co]; \
  429.     done
  430. # Some shells crash when a loop has no items.
  431. # So make sure there is always at least one--`..'.
  432. # Then ignore it.
  433. # We don't use -e here because there are if statements
  434. # that should not make the command give up when the if condition is false.
  435. # Instead, we test for failure after each command where it matters.
  436.     for file in .. $(LIB1FUNCS_EXTRA); \
  437.     do \
  438.       if [ x$${file} != x.. ]; then \
  439.         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  440.         echo $${name}; \
  441.         if [ $${name}.asm = $${file} ]; then \
  442.           cp $${file} $${name}.s; file=$${name}.s; \
  443.           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  444.         else true; fi; \
  445.         $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
  446.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  447.         $(OLDAR) $(OLDAR_FLAGS) tmpgnulib1 $${name}.o; \
  448.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  449.         rm -f $${name}.[so]; \
  450.       else true; \
  451.       fi; \
  452.     done
  453.     mv tmpgnulib1 gnulib1
  454.  
  455. # Compiling gnulib2 requires making sure that cc1, etc. have been compiled.
  456. # But recompiling cc1 should not force recompilation of gnulib2.
  457. # If you want to force recompilation, delete gnulib2.
  458. # Depend on install-cross-tools to make sure we set up properly 
  459. # to run the assembler before we try compiling anything.
  460. # install-cross-tools does nothing if not cross compiling.
  461. gnulib2.ready: gcc cpp cc1 $(CROSS_TOOLS)
  462.     -if [ -f gnulib2.ready ] ; then \
  463.         true; \
  464.     else \
  465.         touch gnulib2.ready; \
  466.     fi
  467.  
  468. gnulib2: gnulib2.c gnulib2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) longlong.h config.status
  469. # Actually build it in tmpgnulib2, then rename at end,
  470. # so that gnulib2 itself remains nonexistent if compilation is aborted.
  471.     -rm -f tmpgnulib2
  472. # -e causes any failing command to make this rule fail.
  473. # -e doesn't work in certain shells, so we test $$? as well.
  474.     set -e; \
  475.     for name in $(LIB2FUNCS); \
  476.     do \
  477.       echo $${name}; \
  478.       $(GCC_FOR_TARGET) -fstrength-reduce -O $(INCLUDES) \
  479.           $(GNULIB2_CFLAGS) -c -DL$${name} \
  480.           $(srcdir)/gnulib2.c -o $${name}.o; \
  481.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  482.       $(AR) $(AR_FLAGS) tmpgnulib2 $${name}.o; \
  483.       rm -f $${name}.o; \
  484.     done
  485. # Some shells crash when a loop has no items.
  486. # So make sure there is always at least one--`..'.
  487. # Then ignore it.
  488. # We don't use -e here because there are if statements
  489. # that should not make the command give up when the if condition is false.
  490. # Instead, we test for failure after each command where it matters.
  491.     for file in .. $(LIB2FUNCS_EXTRA); \
  492.     do \
  493.       if [ x$${file} != x.. ]; then \
  494.         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  495.         echo $${name}; \
  496.         if [ $${name}.asm = $${file} ]; then \
  497.           cp $${file} $${name}.s; file=$${name}.s; \
  498.           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  499.         else true; fi; \
  500.         $(GCC_FOR_TARGET) -fstrength-reduce -O $(INCLUDES) \
  501.         $(GNULIB2_CFLAGS) -c $${file}; \
  502.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  503.         $(AR) $(AR_FLAGS) tmpgnulib2 $${name}.o; \
  504.         rm -f $${name}.[so]; \
  505.       else true; \
  506.       fi; \
  507.     done
  508.     mv tmpgnulib2 gnulib2
  509. # These lines were deleted from above the mv command
  510. # because ranlibing gnulib itself should suffice.
  511. #    -if [ x${HPUX_GAS} = x ] ; then \
  512. #      if $(RANLIB_TEST) ; then $(RANLIB) tmpgnulib2; else true; fi \
  513. #    else true; fi
  514.  
  515. # Combine the various libraries into a single library, gnulib.
  516. gnulib: $(GNULIB1) $(GNULIB2)
  517.     -rm -rf tmpgnulib gnulib tmpcopy
  518.     mkdir tmpcopy
  519.     (cd tmpcopy; $(AR) x ../$(GNULIB1))
  520.     (cd tmpcopy; $(AR) x ../$(GNULIB2))
  521.     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmpgnulib *.o)
  522.     rm -rf tmpcopy
  523.     -if $(RANLIB_TEST) ; then $(RANLIB) tmpgnulib; else true; fi
  524. # Actually build it in tmpgnulib, then rename at end,
  525. # so that gnulib itself remains nonexistent if compilation is aborted.
  526.     mv tmpgnulib gnulib
  527.  
  528. # Compiling object files from source files.
  529.  
  530. # Note that dependencies on obstack.h are not written
  531. # because that file is not part of GCC.
  532. # Dependencies on gvarargs.h are not written
  533. # because all that file does, when not compiling with GCC,
  534. # is include the system varargs.h.
  535.  
  536. # C language specific files.
  537.  
  538. c-parse.tab.o : c-parse.tab.c $(CONFIG_H) $(TREE_H) c-parse.h c-tree.h input.h flags.h
  539.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c c-parse.tab.c
  540. c-parse.tab.c : $(srcdir)/c-parse.y
  541.     $(BISON) $(BISONFLAGS) $(srcdir)/c-parse.y -o $@
  542.  
  543. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h flags.h
  544. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  545. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  546. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  547. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H)
  548.  
  549. # C++ language specific files.
  550.  
  551. cplus-tab.o : cplus-tab.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  552.     $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) \
  553.   -DPARSE_OUTPUT=\"$(PWD)/cplus-tab.output\" \
  554.   `echo cplus-tab.c | sed 's,^\./,,'`
  555.  
  556. cplus-tab.c cplus-tab.h : $(srcdir)/cplus-parse.y
  557.     @echo expect 29 shift/reduce conflicts and 14 reduce/reduce conflicts
  558.     $(BISON) $(BISONFLAGS) -d $(srcdir)/cplus-parse.y -o $@
  559.  
  560. cplus-lex.o : cplus-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
  561.    cplus-tab.h $(srcdir)/cplus-input.c flags.h
  562. cplus-decl.o : cplus-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  563.   cplus-parse.h cplus-decl.h stack.h
  564. cplus-decl2.o : cplus-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  565.   cplus-parse.h cplus-decl.h
  566. cplus-type2.o : cplus-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  567. cplus-typeck.o : cplus-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  568. cplus-class.o : cplus-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \
  569.     cplus-class.h flags.h
  570. cplus-call.o : cplus-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cplus-class.h \
  571.     flags.h
  572. cplus-init.o : cplus-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  573. cplus-method.o : cplus-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  574. cplus-cvt.o : cplus-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  575. cplus-search.o : cplus-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  576. cplus-tree.o : cplus-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  577. cplus-ptree.o : cplus-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
  578. cplus-gc.o : cplus-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  579. cplus-except.o : cplus-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  580. cplus-expr.o : cplus-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
  581.   expr.h insn-codes.h
  582. cplus-edsel.o : cplus-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  583. cplus-xref.o : cplus-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
  584. cplus-pt.o : cplus-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-decl.h cplus-tab.h
  585.  
  586. collect2: collect2.o gnulib
  587.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) collect2.o -o $@
  588. collect2.o : $(srcdir)/collect2.c $(CONFIG_H) gcc cc1 cpp
  589.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CPPFLAGS) $(INCLUDES) \
  590.         -c $(srcdir)/collect2.c -o collect2.o
  591.  
  592. # Objectionable C language specific files.
  593.  
  594. objc-parse.o : objc-parse.c $(CONFIG_H) $(TREE_H) c-parse.h \
  595.    c-tree.h input.h flags.h objc-actions.h
  596.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c objc-parse.c
  597. objc-parse.c : $(srcdir)/objc-parse.y
  598.     $(BISON) $(BISONFLAGS) $(srcdir)/objc-parse.y -o $@
  599.  
  600. objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h \
  601.    flags.h objc-actions.h
  602.  
  603. # A file used by all variants of C.
  604.  
  605. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h flags.h
  606.  
  607. # Language-independent files.
  608.  
  609. gcc.o: gcc.c $(CONFIG_H) gvarargs.h obstack.h
  610.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) \
  611.   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  612.   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
  613.   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  614.   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
  615.  
  616. dumpvers: dumpvers.c
  617.  
  618. version.o: version.c
  619. obstack.o: obstack.c
  620.  
  621. tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
  622. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  623. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
  624. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  625. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h insn-attr.h
  626.  
  627. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  628.  
  629. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  630.  
  631. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h \
  632.    insn-codes.h expr.h hard-reg-set.h regs.h
  633. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  634.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  635.    recog.h output.h
  636. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  637.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h recog.h
  638. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h  \
  639.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h typeclass.h
  640. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-flags.h
  641. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  642.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h
  643. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  644.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  645. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  646.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h
  647. # symout.o : symout.c $(CONFIG_H) $(TREE_H) $(RTL_H) symseg.h gdbfiles.h
  648. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h
  649. cplus-dbxout.o : cplus-dbxout.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h
  650. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h
  651. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h
  652.  
  653. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) gvarargs.h function.h  \
  654.    regs.h insn-config.h real.h expr.h
  655.  
  656. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  657.    insn-flags.h insn-config.h expr.h real.h function.h
  658.  
  659. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  660.    insn-config.h insn-flags.h expr.h real.h
  661. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  662.  
  663. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  664.    insn-config.h recog.h
  665. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h \
  666.    insn-config.h insn-flags.h regs.h hard-reg-set.h recog.h expr.h real.h
  667. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h integrate.h regs.h \
  668.    flags.h expr.h loop.h
  669. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  670.    basic-block.h regs.h hard-reg-set.h output.h
  671. combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h  \
  672.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  673.    basic-block.h recog.h real.h
  674. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  675.    basic-block.h regs.h insn-config.h recog.h 
  676. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  677.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  678. global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
  679.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  680.  
  681. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  682.    reload.h recog.h hard-reg-set.h insn-config.h regs.h real.h
  683. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h  \
  684.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h basic-block.h \
  685.    recog.h output.h
  686. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  687.    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h
  688. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  689.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  690.    flags.h output.h
  691. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  692.    flags.h insn-config.h insn-attr.h
  693. final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \
  694.    recog.h conditions.h \
  695.    gdbfiles.h insn-config.h insn-attr.h real.h output.h hard-reg-set.h
  696. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  697.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  698.    insn-flags.h insn-codes.h real.h
  699. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  700.    regs.h hard-reg-set.h flags.h
  701.    
  702. aux-output.o : aux-output.c $(CONFIG_H) \
  703.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  704.    insn-flags.h output.h insn-attr.h
  705.  
  706. # Normally this target is not used; but it is used if you
  707. # define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
  708. # from the GNU Emacs distribution.
  709. # Note some machines won't allow $(CC) without -S on this source file.
  710. alloca.o:    alloca.c
  711. # sed is used to strip the comments from the assembler output.
  712.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
  713.       `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
  714.     $(ALLOCA_FINISH)
  715.  
  716. # Generate header and source files from the machine description, 
  717. # and compile them.
  718.  
  719. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  720.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  721.   insn-attr.h insn-attrtab.c
  722.  
  723. # The following pair of rules has this effect:
  724. # genconfig is run only if the md has changed since genconfig was last run;
  725. # but the file insn-config.h is touched only when its contents actually change.
  726.  
  727. # Each of the other insn-* files is handled by a similar pair of rules.
  728.  
  729. # Each of the insn-*.[ch] rules has a semicolon at the end,
  730. # for otherwise the system Make on SunOS 4.1 never tries
  731. # to recompile insn-*.o.
  732.  
  733. insn-config.h: stamp-config ;
  734. stamp-config : md genconfig $(srcdir)/move-if-change
  735.     ./genconfig md > tmp-config.h
  736.     $(srcdir)/move-if-change tmp-config.h insn-config.h
  737.     touch -f stamp-config
  738.  
  739. insn-flags.h: stamp-flags ;
  740. stamp-flags : md genflags $(srcdir)/move-if-change
  741.     ./genflags md > tmp-flags.h
  742.     $(srcdir)/move-if-change tmp-flags.h insn-flags.h
  743.     touch -f stamp-flags
  744.  
  745. insn-codes.h: stamp-codes ;
  746. stamp-codes : md gencodes $(srcdir)/move-if-change
  747.     ./gencodes md > tmp-codes.h
  748.     $(srcdir)/move-if-change tmp-codes.h insn-codes.h
  749.     touch -f stamp-codes
  750.  
  751. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
  752.   insn-config.h insn-flags.h insn-codes.h
  753.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-emit.c
  754.  
  755. insn-emit.c: stamp-emit ;
  756. stamp-emit : md genemit $(srcdir)/move-if-change
  757.     ./genemit md > tmp-emit.c
  758.     $(srcdir)/move-if-change tmp-emit.c insn-emit.c
  759.     touch -f stamp-emit
  760.  
  761. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
  762.   real.h output.h flags.h
  763.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-recog.c
  764.  
  765. insn-recog.c: stamp-recog ;
  766. stamp-recog : md genrecog $(srcdir)/move-if-change
  767.     ./genrecog md > tmp-recog.c
  768.     $(srcdir)/move-if-change tmp-recog.c insn-recog.c
  769.     touch -f stamp-recog
  770.  
  771. insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
  772.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-extract.c
  773.  
  774. insn-extract.c: stamp-extract ;
  775. stamp-extract : md genextract $(srcdir)/move-if-change
  776.     ./genextract md > tmp-extract.c
  777.     $(srcdir)/move-if-change tmp-extract.c insn-extract.c
  778.     touch -f stamp-extract
  779.  
  780. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
  781.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-peep.c
  782.  
  783. insn-peep.c: stamp-peep ;
  784. stamp-peep : md genpeep $(srcdir)/move-if-change
  785.     ./genpeep md > tmp-peep.c
  786.     $(srcdir)/move-if-change tmp-peep.c insn-peep.c
  787.     touch -f stamp-peep
  788.  
  789. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  790.      insn-attr.h insn-config.h
  791.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
  792.  
  793. insn-attr.h: stamp-attr ;
  794. stamp-attr : md genattr $(srcdir)/move-if-change
  795.     ./genattr md > tmp-attr.h
  796.     $(srcdir)/move-if-change tmp-attr.h insn-attr.h
  797.     touch -f stamp-attr
  798.  
  799. insn-attrtab.c: stamp-attrtab ;
  800. stamp-attrtab : md genattrtab $(srcdir)/move-if-change
  801.     ./genattrtab md > tmp-attrtab.c
  802.     $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
  803.     touch -f stamp-attrtab
  804.  
  805. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
  806.     hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
  807.     insn-codes.h
  808.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-output.c
  809.  
  810. insn-output.c: stamp-output ;
  811. stamp-output : md genoutput $(srcdir)/move-if-change
  812.     ./genoutput md > tmp-output.c
  813.     $(srcdir)/move-if-change tmp-output.c insn-output.c
  814.     touch -f stamp-output
  815.  
  816. # Compile the programs that generate insn-* from the machine description.
  817. # They are compiled with $(HOST_CC), and associated libraries,
  818. # since they need to run on this machine
  819. # even if GCC is being compiled to run on some other machine.
  820.  
  821. # $(CONFIG_H) is omitted from the deps of the gen*.o
  822. # because these programs don't really depend on anything 
  823. # about the target machine.  They do depend on config.h itself,
  824. # since that describes the host machine.
  825.  
  826. genconfig : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
  827.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \
  828.       genconfig.o $(HOST_RTL) $(HOST_LIBS)
  829.  
  830. genconfig.o : genconfig.c $(RTL_H) config.h
  831.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
  832.  
  833. genflags : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
  834.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \
  835.      genflags.o $(HOST_RTL) $(HOST_LIBS)
  836.  
  837. genflags.o : genflags.c $(RTL_H) config.h
  838.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
  839.  
  840. gencodes : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
  841.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \
  842.      gencodes.o $(HOST_RTL) $(HOST_LIBS)
  843.  
  844. gencodes.o : gencodes.c $(RTL_H) config.h
  845.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
  846.  
  847. genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
  848.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \
  849.      genemit.o $(HOST_RTL) $(HOST_LIBS)
  850.  
  851. genemit.o : genemit.c $(RTL_H) config.h
  852.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
  853.  
  854. genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
  855.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \
  856.      genrecog.o $(HOST_RTL) $(HOST_LIBS)
  857.  
  858. genrecog.o : genrecog.c $(RTL_H) config.h
  859.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
  860.  
  861. genextract : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
  862.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \
  863.      genextract.o $(HOST_RTL) $(HOST_LIBS)
  864.  
  865. genextract.o : genextract.c $(RTL_H) config.h
  866.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
  867.  
  868. genpeep : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
  869.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \
  870.      genpeep.o $(HOST_RTL) $(HOST_LIBS)
  871.  
  872. genpeep.o : genpeep.c $(RTL_H) config.h
  873.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
  874.  
  875. genattr : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
  876.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \
  877.      genattr.o $(HOST_RTL) $(HOST_LIBS)
  878.  
  879. genattr.o : genattr.c $(RTL_H) config.h
  880.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
  881.  
  882. genattrtab : genattrtab.o $(HOST_RTL) $(HOST_RTLANAL) $(HOST_LIBDEPS)
  883.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \
  884.      genattrtab.o $(HOST_RTL) $(HOST_RTLANAL) $(HOST_LIBS)
  885.  
  886. genattrtab.o : genattrtab.c $(RTL_H) config.h insn-config.h
  887.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
  888.  
  889. genoutput : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
  890.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \
  891.      genoutput.o $(HOST_RTL) $(HOST_LIBS)
  892.  
  893. genoutput.o : genoutput.c $(RTL_H) config.h
  894.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
  895.  
  896. # Compile the libraries to be used by gen*.
  897. # If we are not cross-building, gen* use the same .o's that cc1 will use,
  898. # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
  899. # with the rules for rtl.o, alloca.o, etc.
  900. $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
  901.     rm -f $(HOST_PREFIX)rtl.c
  902.     cp $(srcdir)/rtl.c $(HOST_PREFIX)rtl.c
  903.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
  904.  
  905. $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
  906.     rm -f $(HOST_PREFIX)rtlanal.c
  907.     cp $(srcdir)/rtlanal.c $(HOST_PREFIX)rtlanal.c
  908.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
  909.  
  910. $(HOST_PREFIX_1)alloca.o: alloca.c
  911.     rm -f $(HOST_PREFIX)alloca.c
  912.     cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
  913.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
  914.  
  915. $(HOST_PREFIX_1)obstack.o: obstack.c
  916.     rm -f $(HOST_PREFIX)obstack.c
  917.     cp $(srcdir)/obstack.c $(HOST_PREFIX)obstack.c
  918.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
  919.  
  920. $(HOST_PREFIX_1)malloc.o: malloc.c
  921.     rm -f $(HOST_PREFIX)malloc.c
  922.     cp $(srcdir)/malloc.c $(HOST_PREFIX)malloc.c
  923.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
  924.  
  925. # This satisfies the dependency that we get if you cross-compile a compiler
  926. # that does not need to compile alloca, malloc or whatever.
  927. $(HOST_PREFIX_1): 
  928.     touch $(HOST_PREFIX_1)
  929.  
  930. # Remake cpp and protoize.
  931.  
  932. # Making the preprocessor
  933. cpp: cccp
  934.     -rm -f cpp
  935.     ln cccp cpp
  936. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  937.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  938. cexp.o: cexp.c $(CONFIG_H)
  939.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c cexp.c
  940. cexp.c: $(srcdir)/cexp.y
  941.     $(BISON) $(BISON_FLAGS) $(srcdir)/cexp.y -o $@
  942. cccp.o: cccp.c $(CONFIG_H) pcp.h version.c
  943.     $(CC) $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) \
  944.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  945.           -DGPLUSPLUS_INCLUDE_DIR=\"$(libsubdir)/g++-include\" \
  946.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  947.       -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
  948.  
  949. proto: config.status protoize unprotoize SYSCALLS.c.X protoize.1 unprotoize.1
  950.  
  951. protoize: protoize.o $(MALLOC)
  952.     ./gcc -B./ $(GCC_CFLAGS) $(LDFLAGS) protoize.o $(MALLOC) -o $@
  953. protoize.o:    $(srcdir)/protoize.c gcc cc1 cpp
  954.     ./gcc -B./ -c $(GCC_CFLAGS) $(CPPFLAGS) $(INCLUDES) \
  955.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  956.       $(srcdir)/protoize.c -I$(srcdir)
  957.  
  958. unprotoize: unprotoize.o $(MALLOC)
  959.     ./gcc -B./ $(GCC_CFLAGS) $(LDFLAGS) unprotoize.o $(MALLOC) -o $@
  960. unprotoize.o:    $(srcdir)/protoize.c gcc cc1 cpp
  961.     ./gcc -B./ -c $(GCC_CFLAGS) $(CPPFLAGS) $(INCLUDES) \
  962.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  963.       -DUNPROTOIZE $(srcdir)/protoize.c -I$(srcdir) -o $@
  964.  
  965. protoize.1:    $(srcdir)/proto-man ./cpp
  966.     ./cpp -traditional $(srcdir)/proto-man \
  967.         | grep -v '^#' \
  968.             | awk 'NF > 0 {print}' > protoize.1
  969.  
  970. unprotoize.1:    $(srcdir)/proto-man ./cpp
  971.     ./cpp -traditional -DUNPRO $(srcdir)/proto-man \
  972.         | grep -v '^#' \
  973.             | awk 'NF > 0 {print}' > unprotoize.1
  974.  
  975. SYSCALLS.c.X:    SYSCALLS.c ./gcc ./cc1 ./cpp
  976.     ./gcc -B./ $(GCC_CFLAGS) -fgen-aux-info -S -o /dev/null \
  977.    $(srcdir)/SYSCALLS.c
  978.  
  979. test-protoize:
  980.     -rm -f tmp-protoize.*
  981.     cp protoize.c tmp-protoize.c
  982.     chmod u+w tmp-protoize.c
  983.     ./unprotoize -N -c "-B./ -Wall -Wwrite-strings $(CFLAGS)" tmp-protoize.c
  984.     ./protoize -N -B ./ -c "-B./ -Wall -Wwrite-strings $(CFLAGS)" tmp-protoize.c
  985.     @echo Expect exactly one one line difference for visit_each_hash_node.
  986.     -diff protoize.c tmp-protoize.c
  987.     -rm -f tmp-protoize.*
  988.  
  989. # Remake the info files.
  990.  
  991. doc: $(srcdir)/cpp.info $(srcdir)/gplus.info $(srcdir)/gcc.info
  992.  
  993. $(srcdir)/cpp.info: $(srcdir)/cpp.texinfo
  994.     makeinfo `echo $(srcdir)/cpp.texinfo | sed 's,^\./,,'`
  995.  
  996. $(srcdir)/gplus.info: $(srcdir)/gplus.texinfo
  997.     makeinfo `echo $(srcdir)/gplus.texinfo | sed 's,^\./,,'`
  998.  
  999. $(srcdir)/gcc.info: $(srcdir)/gcc.texinfo
  1000.     makeinfo `echo $(srcdir)/gcc.texinfo | sed 's,^\./,,'`
  1001.  
  1002. # Deletion of files made during compilation.
  1003. # There are four levels of this:
  1004. #   `mostlyclean', `clean', `cleanconfig' and `realclean'.
  1005. # `mostlyclean' is useful while working on a particular type of machine.
  1006. # It does not delete gnulib or its parts, so it won't have to be recompiled.
  1007. # `clean' deletes what you want to delete ordinarily to save space.
  1008. # This is most, but not all, of the files made by compilation.
  1009. # `cleanconfig' also deletes the files made by config.
  1010. # `realclean' also deletes everything that could be regenerated automatically.
  1011.  
  1012. mostlyclean:
  1013.     -rm -f $(STAGESTUFF) $(STAGE_GCC) 
  1014. # Delete the temporary source copies for cross compilation.
  1015.     -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
  1016.     -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
  1017.     -rm -f $(HOST_PREFIX_1)obstack.c 
  1018. # Delete the temp files made in the course of building gnulib.
  1019.     -rm -f tmpgnulib* tmpcopy
  1020.     for name in $(LIB1FUNCS); do rm -f $${name}.c; done
  1021. # Delete the stamp files.
  1022.     -rm -f stamp-* tmp-*
  1023.     -rm -f *.s *.s[0-9] *.co
  1024.     -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  1025.     -rm -f *.dbr *.jump2 *.sched *.cse2 *.cpp *.sched2
  1026.     -rm -f gccnew specs core float.h enquire SYSCALLS.c.X
  1027.  
  1028. # delete all files made by compilation.
  1029. clean: mostlyclean
  1030.     -rm -f gnulib gnulib1 gnulib2 gnulib2.ready
  1031.     -rm -fr stage1 stage2 stage3 stage4
  1032.  
  1033. # Like clean but also delete the links and files made to configure gcc.
  1034. cleanconfig: clean
  1035.     -rm -f tm.h aux-output.c config.h md config.status
  1036.     -rm -f Makefile aux-output2.c
  1037.  
  1038. # Get rid of every file that's generated from some other file.
  1039. # Most of these files ARE PRESENT in the GCC distribution.
  1040. realclean: cleanconfig
  1041.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  1042.     -rm -f cplus-tab.c cplus-tab.h cplus-tab.output
  1043.     -rm -f objc-parse.c objc-parse.output
  1044.     -rm -f protoize.1 unprotoize.1
  1045.     -rm -f c-parse.tab.c c-parse.output c-parse.tab.output
  1046.     -rm -f objc-parse.output
  1047.     -rm -f cexp.c cexp.output TAGS 
  1048.     -rm -f cpp.info* cpp.?? cpp.??s cpp.log cpp.toc cpp.*aux
  1049.     -rm -f gcc.info* gcc.?? gcc.??s gcc.log gcc.toc gcc.*aux
  1050.     -rm -f gplus.info* gplus.?? gplus.??s gplus.log gplus.toc gplus.*aux
  1051.     -rm -f *.dvi
  1052.  
  1053. # Entry points `install', `includes' and `uninstall'.
  1054.  
  1055. install: $(INSTALL_TARGET)
  1056.  
  1057. # Copy the files of native compiler into directories where they will be run.
  1058. install-native: install-common install-gnulib $(INSTALL_HEADERS) \
  1059.    install-man install-proto
  1060.  
  1061. # Copy the files of cross compiler into directories where they will be run.
  1062. install-cross: install-common install-common-headers \
  1063.    install-man install-cross-tools install-gnulib
  1064.  
  1065. # Install the tools, libraries and header files for the target machine
  1066. # where cross-compilation will look for them.
  1067. # Use tooldir to find them.
  1068. install-cross-tools: install-dir
  1069. # The first if makes this a no-op except for a cross compiler.
  1070. # The /. after the dirname causes test to follow symlinks.
  1071.     -if [ -f gcc-cross ] ; \
  1072.     then \
  1073.       if [ -d $(tooldir)/. ] ; \
  1074.       then \
  1075.         for file in as ld ar ranlib; do \
  1076.           $(SYMLINK) $(tooldir)/bin/$$file $(libsubdir)/$$file \
  1077.           || (echo "#!/bin/sh"; echo $(tooldir)/bin/$$file "$@") > $(libsubdir)/$$file; \
  1078.         done; \
  1079.         for file in $(tooldir)/lib/*; do \
  1080.           $(SYMLINK) $$file $(libsubdir)/`basename $$file` \
  1081.           || $(INSTALL_DATA) $$file $(libsubdir)/`basename $$file`; \
  1082.         done; \
  1083.         if [ -d $(tooldir)/include/. ] ; then \
  1084.           $(SYMLINK) $(tooldir)/include $(libsubdir)/sys-include \
  1085.           || (if [ -d $(libsubdir)/sys-include ] ; then true ; else mkdir $(libsubdir)/sys-include ; fi; \
  1086.           cd $(tooldir)/include; tar cf - . | (cd $(libsubdir)/sys-include; tar xpf -)); \
  1087.         else true; fi; \
  1088.       else true; \
  1089.       fi; \
  1090.     else true; \
  1091.     fi;
  1092. # Run this on the target machine
  1093. # to finish installation of cross compiler.
  1094. install-cross-rest: install-float-h-cross
  1095.  
  1096. # Install float.h for cross compiler.
  1097. # Run this on the target machine!
  1098. install-float-h-cross:
  1099.     if [ -f enquire ] ; then true; else false; done
  1100.     -./enquire -f > float.h
  1101.     $(INSTALL_DATA) float.h $(libsubdir)/include/float.h
  1102.     chmod a-x $(libsubdir)/include/float.h
  1103.  
  1104. # Create the installation directory.
  1105. install-dir:
  1106.     if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
  1107.     if [ -d $(libdir)/gcc ] ; then true ; else mkdir $(libdir)/gcc ; fi
  1108.     if [ -d $(libdir)/gcc/$(target) ] ; then true ; else mkdir $(libdir)/gcc/$(target) ; fi
  1109.     if [ -d $(libdir)/gcc/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc/$(target)/$(version) ; fi
  1110.     if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
  1111. # On some systems, even /man does not exist, so this will fail.
  1112. # Eventually we can use mkdir -p to create it, 
  1113. # but that isn't safe yet.
  1114.     -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi
  1115.  
  1116. # Install the compiler executables built during cross compilation.
  1117. install-common: native install-dir
  1118.     for file in $(COMPILERS) collect; do \
  1119.       if [ -f $$file ] ; \
  1120.       then $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  1121.       else true; \
  1122.       fi; \
  1123.     done
  1124.     for file in $(EXTRA_PASSES) ..; do \
  1125.       if [ x"$$file" != x.. ]; then \
  1126.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  1127.       else true; fi; \
  1128.     done
  1129.     $(INSTALL_DATA) specs $(libsubdir)/specs
  1130.     -if [ -f gcc-cross ] ; \
  1131.     then if [ -d $(tooldir)/bin/. ] ; \
  1132.       then $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
  1133.       else true; fi; \
  1134.     else $(INSTALL_PROGRAM) gcc $(bindir)/gcc; \
  1135.     fi
  1136.     $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
  1137.  
  1138. # Install protoize.
  1139. install-proto: proto install-dir
  1140.     $(INSTALL_PROGRAM) protoize $(bindir)/protoize
  1141.     $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize
  1142.     $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X
  1143.     chmod a-x $(libsubdir)/SYSCALLS.c.X
  1144.  
  1145. # Install the man pages.
  1146. install-man: install-dir $(srcdir)/gcc.1 protoize.1 unprotoize.1
  1147.     $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext)
  1148.     chmod a-x $(mandir)/gcc$(manext)
  1149.     $(INSTALL_DATA) protoize.1 $(mandir)/protoize$(manext)
  1150.     chmod a-x $(mandir)/protoize$(manext)
  1151.     $(INSTALL_DATA) unprotoize.1 $(mandir)/unprotoize$(manext)
  1152.     chmod a-x $(mandir)/unprotoize$(manext)
  1153.  
  1154. # Install the library.
  1155. install-gnulib: gnulib
  1156.     -if [ -f gnulib ] ; then \
  1157.       $(INSTALL_DATA) gnulib $(libsubdir)/gnulib; \
  1158.       if $(RANLIB_TEST) ; then \
  1159.         (cd $(libsubdir); $(RANLIB) gnulib); else true; fi; \
  1160.       chmod a-x $(libsubdir)/gnulib; \
  1161.     else true; fi
  1162.  
  1163. # Install all the header files for native compiler.
  1164. install-headers: install-common-headers install-float-h
  1165.  
  1166. # Install float.h for native compiler.
  1167. install-float-h: float.h
  1168.     $(INSTALL_DATA) float.h $(libsubdir)/include/float.h
  1169.     chmod a-x $(libsubdir)/include/float.h
  1170.  
  1171. # Install the fixed headers that are the same for all machines.
  1172. install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h
  1173.     if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
  1174.     -chmod ugo+rx $(libsubdir)/include
  1175. # Must compute $(libsubdir) before the cd; the awk script won't work after.
  1176.     shelllibsubdir=$(libsubdir); \
  1177.     cd $(srcdir); \
  1178.     for file in $(USER_H); do \
  1179.        $(INSTALL_DATA) `basename $$file` $$shelllibsubdir/include; \
  1180.        chmod a-x $$shelllibsubdir/include/`basename $${file}`; \
  1181.     done
  1182.     $(INSTALL_DATA) $(srcdir)/gvarargs.h $(libsubdir)/include/varargs.h
  1183.     $(INSTALL_DATA) $(srcdir)/gstdarg.h $(libsubdir)/include/stdarg.h
  1184.     chmod a-x $(libsubdir)/include/varargs.h
  1185.  
  1186. # $(libsubdir)/include:
  1187. #    if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
  1188. #    -chmod ugo+rx $(libsubdir)/include
  1189.  
  1190. # This appears not to work.  It isn't clear how to fix it.
  1191. # $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/fixincludes
  1192. #    LIB=$(libsubdir)/include $(srcdir)/fixincludes
  1193. #    $(INSTALL_DATA) $(srcdir)/fixincludes-README $@
  1194. #    chmod a-x $@
  1195.  
  1196. # Cancel installation by deleting the installed files.
  1197. uninstall:
  1198.     -rm -rf $(libsubdir)
  1199.     -rm -rf $(bindir)/gcc
  1200.     -rm -rf $(bindir)/protoize
  1201.     -rm -rf $(bindir)/unprotoize
  1202.     -rm -rf $(mandir)/gcc.$(manext)
  1203.  
  1204. # Run fixincludes in the proper directory.
  1205. includes: force
  1206.     export LIB; LIB=$(libsubdir)/include $(srcdir)/fixincludes
  1207.  
  1208. # These exist for maintenance purposes.
  1209.  
  1210. TAGS: force
  1211.     etags *.y *.h *.c
  1212.  
  1213. # do make -f ../gcc/Makefile maketest DIR=../gcc
  1214. # in the intended test directory to make it a suitable test directory.
  1215. # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  1216. maketest:
  1217.     ln -s $(DIR)/*.[chy] .
  1218.     ln -s $(DIR)/configure .
  1219.     ln -s $(DIR)/*.def .
  1220.     -rm -f =*
  1221.     ln -s $(DIR)/.gdbinit .
  1222.     ln -s $(DIR)/fixincludes .
  1223.     -ln -s $(DIR)/bison.simple .
  1224.     ln -s $(DIR)/config .
  1225.     ln -s $(DIR)/move-if-change .
  1226. # The then and else were swapped to avoid a problem on Ultrix.
  1227.     if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
  1228.     -rm tm.h aux-output.c config.h md
  1229.     make clean
  1230. # You must then run config to set up for compilation.
  1231.  
  1232. bootstrap: all force
  1233.     $(MAKE) stage1
  1234.     $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ALLOCA=
  1235.     $(MAKE) stage2
  1236.     $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ALLOCA=
  1237.  
  1238. bootstrap2: force
  1239.     $(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ALLOCA=
  1240.     $(MAKE) stage2
  1241.     $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ALLOCA=
  1242.  
  1243. bootstrap3: force
  1244.     $(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="-O $(CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)" ALLOCA=
  1245.  
  1246. # Copy the object files from a particular stage into a subdirectory.
  1247. stage1: force
  1248.     if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  1249.     -mv $(STAGESTUFF) $(STAGE_GCC) stage1
  1250.     -rm -f stage1/gnulib
  1251.     -cp gnulib stage1
  1252.     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/gnulib; else true; fi
  1253.  
  1254. stage2: force
  1255.     if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  1256.     -mv $(STAGESTUFF) $(STAGE_GCC) stage2
  1257.     -rm -f stage2/gnulib
  1258.     -cp gnulib stage2
  1259.     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/gnulib; else true; fi
  1260.  
  1261. stage3: force
  1262.     if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  1263.     -mv $(STAGESTUFF) $(STAGE_GCC) stage3
  1264.     -rm -f stage3/gnulib
  1265.     -cp gnulib stage3
  1266.     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/gnulib; else true; fi
  1267.  
  1268. stage4: force
  1269.     if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  1270.     -mv $(STAGESTUFF) $(STAGE_GCC) stage4
  1271.     -rm -f stage4/gnulib
  1272.     -cp gnulib stage4
  1273.     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/gnulib; else true; fi
  1274.  
  1275. # Copy just the executable files from a particular stage into a subdirectory,
  1276. # and delete the object files.  Use this if you're just verifying a version
  1277. # that is pretty sure to work, and you are short of disk space.
  1278. risky-stage1: force
  1279.     if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  1280.     -mv cc1 cpp cccp gcc stage1
  1281.     -rm -f stage1/gnulib
  1282.     -cp gnulib stage1 && $(RANLIB) stage1/gnulib
  1283.     -make clean
  1284.  
  1285. risky-stage2: force
  1286.     if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  1287.     -mv cc1 cpp cccp gcc stage2
  1288.     -rm -f stage2/gnulib
  1289.     -cp gnulib stage2 && $(RANLIB) stage2/gnulib
  1290.     -make clean
  1291.  
  1292. risky-stage3: force
  1293.     if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  1294.     -mv cc1 cpp cccp gcc stage3
  1295.     -rm -f stage3/gnulib
  1296.     -cp gnulib stage3 && $(RANLIB) stage3/gnulib
  1297.     -make clean
  1298.  
  1299. risky-stage4: force
  1300.     if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  1301.     -mv cc1 cpp cccp gcc stage4
  1302.     -rm -f stage4/gnulib
  1303.     -cp gnulib stage4 && $(RANLIB) stage4/gnulib
  1304.     -make clean
  1305.  
  1306. #In GNU Make, ignore whether `stage*' exists.
  1307. .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
  1308. .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
  1309.  
  1310. force:
  1311.