home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / Makefile.in < prev    next >
Makefile  |  1997-01-18  |  103KB  |  2,601 lines

  1. # Makefile for GNU C compiler.
  2. #   Copyright (C) 1987, 88, 90-94, 1995 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, 59 Temple Place - Suite 330,
  19. #Boston MA 02111-1307, USA.
  20.  
  21. # The targets for external use include:
  22. # all, doc, proto, install, install-cross, install-cross-rest,
  23. # uninstall, TAGS, mostlyclean, clean, distclean, maintainer-clean,
  24. # stage1, stage2, stage3, stage4.
  25.  
  26. # Suppress smart makes who think they know how to automake Yacc files
  27. .y.c:
  28.  
  29. # Variables that exist for you to override.
  30. # See below for how to change them for certain systems.
  31.  
  32. # List of language subdirectories.
  33. # This is overridden by configure.
  34. SUBDIRS =
  35.  
  36. # Selection of languages to be made.
  37. # This is overridden by configure.
  38. LANGUAGES = c objective-c proto
  39.  
  40. %if next-pdo
  41. OBJC_HEADERS=
  42. %else next-pdo
  43. OBJC_HEADERS=objc-headers
  44. %endif next-pdo
  45.  
  46. ALLOCA =
  47. ALLOCA_FLAGS =
  48. ALLOCA_FINISH = true
  49.  
  50. # Various ways of specifying flags for compilations:  
  51. # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
  52. # BOOT_CFLAGS is the value of CFLAGS to pass
  53. # to the stage2 and stage3 compilations
  54. # XCFLAGS is used for most compilations but not when using the GCC just built.
  55. XCFLAGS =
  56. CFLAGS = -g
  57. BOOT_CFLAGS = -O $(CFLAGS)
  58. # These exists to be overridden by the x-* and t-* files, respectively.
  59. X_CFLAGS =
  60. T_CFLAGS =
  61.  
  62. X_CPPFLAGS =
  63. T_CPPFLAGS =
  64.  
  65. CC = cc
  66. BISON = bison
  67. BISONFLAGS =
  68. LEX = flex
  69. LEXFLAGS =
  70. AR = ar
  71. OLDAR_FLAGS = qc
  72. AR_FLAGS = rc
  73. SHELL = /bin/sh
  74. # on sysV, define this as cp.
  75. INSTALL = install -c
  76. # These permit overriding just for certain files.
  77. INSTALL_PROGRAM = $(INSTALL)
  78. INSTALL_DATA = $(INSTALL)
  79. MAKEINFO = makeinfo
  80. TEXI2DVI = texi2dvi
  81. # For GNUmake: let us decide what gets passed to recursive makes.
  82. MAKEOVERRIDES =
  83.  
  84. # Define this as & to perform parallel make on a Sequent.
  85. # Note that this has some bugs, and it seems currently necessary 
  86. # to compile all the gen* files first by hand to avoid erroneous results.
  87. P =
  88.  
  89. # How to invoke ranlib.
  90. RANLIB = ranlib
  91. # Test to use to see whether ranlib exists on the system.
  92. RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
  93.  
  94. # Compiler to use for compiling libgcc1.a.
  95. # OLDCC should not be the GNU C compiler,
  96. # since that would compile typical libgcc1.a functions such as mulsi3
  97. # into infinite recursions.
  98. OLDCC = cc
  99.  
  100. # CFLAGS for use with OLDCC, for compiling libgcc1.a.
  101. # NOTE: -O does not work on some Unix systems!
  102. CCLIBFLAGS = -O
  103.  
  104. # Version of ar to use when compiling libgcc1.a.
  105. OLDAR = ar
  106.  
  107. # Target to use when installing include directory.  Either
  108. # install-headers-tar or install-headers-cpio.
  109. INSTALL_HEADERS_DIR = install-headers-tar
  110.  
  111. # Header files that are made available under the same name
  112. # to programs compiled with GCC.
  113. USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
  114.     $(srcdir)/ginclude/varargs.h $(srcdir)/ginclude/va-alpha.h \
  115.     $(srcdir)/ginclude/va-h8300.h $(srcdir)/ginclude/va-i860.h \
  116.     $(srcdir)/ginclude/va-i960.h $(srcdir)/ginclude/va-mips.h \
  117.     $(srcdir)/ginclude/va-m88k.h $(srcdir)/ginclude/va-pa.h \
  118.     $(srcdir)/ginclude/va-pyr.h $(srcdir)/ginclude/va-sparc.h \
  119.     $(srcdir)/ginclude/va-clipper.h $(srcdir)/ginclude/va-spur.h \
  120.     $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
  121.     $(srcdir)/ginclude/proto.h $(EXTRA_HEADERS)
  122.  
  123. # Target to use whe installing assert.h.  Some systems may
  124. # want to set this empty.
  125. INSTALL_ASSERT_H = install-assert-h
  126.  
  127. # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
  128. # Usually the one we just built.
  129. # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  130. GCC_FOR_TARGET = ./xgcc -B./
  131.  
  132. # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  133. # It omits XCFLAGS, and specifies -B./.
  134. # It also specifies -I./include to find, e.g., stddef.h.
  135. GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include
  136.  
  137. # Special flags for compiling enquire.
  138. # We disable optimization to make floating point more reliable.
  139. ENQUIRE_CFLAGS = -DNO_MEM -DNO_LONG_DOUBLE_IO -O0
  140. ENQUIRE_LDFLAGS = $(LDFLAGS)
  141.  
  142. # Sed command to transform gcc to installed name.  Overwritten by configure.
  143. program_transform_name = -e s,x,x,
  144. program_transform_cross_name = -e s,^,$(target)-,
  145.  
  146. # Tools to use when building a cross-compiler.
  147. # These are used because `configure' appends `cross-make'
  148. # to the makefile when making a cross-compiler.
  149.  
  150. TARGET_TOOLPREFIX = $(tooldir)/bin/
  151. AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
  152. AR_FOR_TARGET_FLAGS = rc
  153. RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
  154. RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
  155.  
  156. # Dir to search for system headers.  Overridden by cross-make.
  157. SYSTEM_HEADER_DIR = /usr/include
  158.  
  159. # Control whether to run fixproto.
  160. STMP_FIXPROTO = stmp-fixproto
  161.  
  162. # Test to see whether <limits.h> exists in the system header files.
  163. LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
  164.  
  165. # There may be a premade insn-attrtab.c for this machine.
  166. # (You could rebuild it with genattrtab as usual, but it takes a long time.)
  167. # PREMADE_ATTRTAB is the file name of the file to use.
  168. # PREMADE_ATTRTAB_MD is the md file it corresponds to.
  169. PREMADE_ATTRTAB_MD = Makefile  # Guaranteed not to cmp equal to md.
  170. PREMADE_ATTRTAB = 
  171.  
  172. target= ... `configure' substitutes actual target name here.
  173. xmake_file= ... `configure' substitutes actual x- file name here.
  174. tmake_file= ... `configure' substitutes actual t- file name here.
  175. out_file= ... `configure' substitutes actual out file name here.
  176. out_object_file= ... `configure' substitutes actual out object file name here.
  177. md_file= ... `configure' substitutes actual md file name here.
  178. tm_file= ... `configure' substitutes actual tm file name here.
  179. build_xm_file= ... `configure' substitutes actual build xm- file name here.
  180. host_xm_file= ... `configure' substitutes actual host xm- file name here.
  181. lang_specs_files= ... `configure' substitutes actual lang spec file names here.
  182. lang_options_files= ... `configure' puts actual lang options file names here.
  183. version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
  184. mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
  185.  
  186. # Directory where sources are, from where we are.
  187. srcdir = .
  188. # Common prefix for installation directories.
  189. # NOTE: This directory must exist when you start installation.
  190. prefix = /usr/local
  191. # Directory in which to put localized header files. On the systems with
  192. # gcc as the native cc, `local_prefix' may not be `prefix' which is
  193. # `/usr'.
  194. # NOTE: local_prefix *should not* default from prefix.
  195. local_prefix = /usr/local
  196. # Directory in which to put host dependent programs and libraries
  197. exec_prefix = $(prefix)
  198. # Directory in which to put the executable for the command `gcc'
  199. bindir = $(exec_prefix)/bin
  200. # Directory in which to put the directories used by the compiler.
  201. libdir = $(exec_prefix)/lib
  202. # Directory in which the compiler finds executables, libraries, etc.
  203. libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
  204. # Directory in which the compiler finds g++ includes.
  205. gxx_include_dir= $(libdir)/g++-include
  206. # Directory to search for site-specific includes.
  207. includedir = $(local_prefix)/include
  208. # assertdir is overridden in cross-make.
  209. # (But this currently agrees with what is in cross-make.)
  210. assertdir = $(tooldir)/include
  211. # where the info files go
  212. infodir = $(prefix)/info
  213. # Extension (if any) to put in installed man-page filename.
  214. manext = .1
  215. objext = .o
  216. exeext =
  217.  
  218. # Directory in which to put man pages.
  219. mandir = $(prefix)/man/man1
  220. # Directory in which to find other cross-compilation tools and headers.
  221. # Used in install-cross.
  222. tooldir = $(exec_prefix)/$(target)
  223. # Dir for temp files.
  224. tmpdir = /tmp
  225.  
  226. # Additional system libraries to link with.
  227. CLIB=
  228.  
  229. # Change this to a null string if obstacks are installed in the
  230. # system library.
  231. OBSTACK=obstack.o
  232.  
  233. # Specify the rule for actually making libgcc.a,
  234. LIBGCC = libgcc.a
  235. # and the rule for installing it.
  236. INSTALL_LIBGCC = install-libgcc
  237.  
  238. # Specify the rule for actually making libgcc1.a.
  239. # The value may be empty; that means to do absolutely nothing
  240. # with or for libgcc1.a.
  241. LIBGCC1 = libgcc1.a
  242.  
  243. # Specify the rule for making libgcc1.a for a cross-compiler.
  244. # The default rule assumes that libgcc1.a is supplied by the user.
  245. CROSS_LIBGCC1 = libgcc1.cross
  246.  
  247. # Specify the rule for actually making libgcc2.a.
  248. LIBGCC2 = libgcc2.a
  249.  
  250. # Options to use when compiling libgcc2.a.
  251. # -g1 causes output of debug info only for file-scope entities.
  252. # we use this here because that should be enough, and also
  253. # so that -g1 will be tested.
  254. LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) -g1
  255.  
  256. # Additional options to use when compiling libgcc2.a.
  257. # Some targets override this to -Iinclude
  258. LIBGCC2_INCLUDES =
  259.  
  260. # Additional target-dependent options for compiling libgcc2.a.
  261. TARGET_LIBGCC2_CFLAGS = 
  262.  
  263. # Things which must be built before building libgcc2.a.
  264. # Some targets override this to stmp-int-hdrs
  265. LIBGCC2_DEPS =
  266.  
  267. # Enquire target (This is a variable so that a target can choose not to
  268. # build it.)
  269. ENQUIRE = enquire
  270.  
  271. # libgcc1-test target (must also be overridable for a target)
  272. LIBGCC1_TEST = libgcc1-test
  273.  
  274. # List of extra executables that should be compiled for this target machine
  275. # that are used for compiling from source code to object code.
  276. # The rules for compiling them should be in the t-* file for the machine.
  277. EXTRA_PASSES =
  278.  
  279. # Like EXTRA_PASSES, but these are used when linking.
  280. EXTRA_PROGRAMS = 
  281.  
  282. # List of extra object files that should be compiled for this target machine.
  283. # The rules for compiling them should be in the t-* file for the machine.
  284. EXTRA_PARTS =
  285.  
  286. # List of extra object files that should be compiled and linked with
  287. # compiler proper (cc1, cc1obj, cc1plus).
  288. EXTRA_OBJS =
  289.  
  290. # List of extra object files that should be compiled and linked with
  291. # the gcc driver.
  292. EXTRA_GCC_OBJS =
  293.  
  294. # List of additional header files to install.
  295. # Often this is edited directly by `configure'.
  296. EXTRA_HEADERS =
  297.  
  298. # Set this to `ld' to enable use of collect2.
  299. # USE_COLLECT2 =
  300. # It is convenient for configure to add the assignment at the beginning,
  301. # so don't override it here.
  302.  
  303. # List of extra C and assembler files to add to libgcc1.a.
  304. # Assembler files should have names ending in `.asm'.
  305. LIB1FUNCS_EXTRA = 
  306.  
  307. # List of extra C and assembler files to add to libgcc2.a.
  308. # Assembler files should have names ending in `.asm'.
  309. LIB2FUNCS_EXTRA = 
  310.  
  311. # Default float.h source to use for cross-compiler.
  312. CROSS_FLOAT_H=float.h-cross
  313.  
  314. # Program to convert libraries.
  315. LIBCONVERT = 
  316.  
  317. # Control whether header files are installed.
  318. INSTALL_HEADERS=install-headers
  319.  
  320. # Options for tar when copying trees.  So HPUX can override it.
  321. TAROUTOPTS = xpBf
  322.  
  323. # Select which version of fixincludes to use (I.E. regular versus SVR4)
  324. # This value is overridden directly by configure.
  325. FIXINCLUDES=fixincludes
  326.  
  327. # Additional directories of header files to run fixincludes on.
  328. # These should be directories searched automatically by default
  329. # just as /usr/include is.
  330. # *Do not* use this for directories that happen to contain 
  331. # header files, but are not searched automatically by default.
  332. # On most systems, this is empty.
  333. OTHER_FIXINCLUDES_DIRS=
  334.  
  335. # List of things which should already be built whenever we try to use xgcc
  336. # to compile anything (without linking).
  337. GCC_PASSES=xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES)
  338.  
  339. # List of things which should already be built whenever we try to use xgcc
  340. # to link anything.
  341. GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
  342.  
  343. # Directory to link to, when using the target `maketest'.
  344. DIR = ../gcc
  345.  
  346. # Guaranteed to not exist when not passing md through cpp.
  347. # This value is overridden directly by configure.
  348. MD_FILE = md-cpp-not-used
  349.  
  350. # Flags to use when cross-building GCC.
  351. # Prefix to apply to names of object files when using them
  352. # to run on the machine we are compiling on.
  353. HOST_PREFIX=
  354. # Prefix to apply to names of object files when compiling them
  355. # to run on the machine we are compiling on.
  356. # The default for this variable is chosen to keep these rules 
  357. # out of the way of the other rules for compiling the same source files.
  358. HOST_PREFIX_1=loser-
  359. HOST_CC=$(CC)
  360. HOST_CFLAGS=$(ALL_CFLAGS)
  361. HOST_CLIB=$(CLIB)
  362. HOST_LDFLAGS=$(LDFLAGS)
  363. HOST_CPPFLAGS=$(ALL_CPPFLAGS)
  364. HOST_ALLOCA=$(ALLOCA)
  365. HOST_MALLOC=$(MALLOC)
  366. HOST_OBSTACK=$(OBSTACK)
  367.  
  368. # Actual name to use when installing a native compiler.
  369. GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed $$t`
  370.  
  371. # Actual name to use when installing a cross-compiler.
  372. GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed $$t`
  373.  
  374. # Choose the real default target.
  375. ALL=all.internal
  376.  
  377. # Choose the real install target.
  378. INSTALL_TARGET=install-normal
  379.  
  380. # Source for float.h.  Overridden by cross-make.
  381. FLOAT_H=float.h-nat
  382.  
  383. # Extra symbols for fixproto to define when parsing headers.
  384. FIXPROTO_DEFINES = 
  385.  
  386. # Extra flags to use when compiling crt{begin,end}.o.
  387. CRTSTUFF_T_CFLAGS = 
  388.  
  389. # Name of null device
  390. NULL = /dev/null
  391.  
  392. # End of variables for you to override.
  393.  
  394. # Definition of `all' is here so that new rules inserted by sed
  395. # do not specify the default target.
  396. # The real definition is under `all.internal' (for native compilers)
  397. # or `all.cross' (for cross compilers).
  398. all: all.indirect
  399.  
  400. # This tells GNU Make version 3 not to put all variables in the environment.
  401. .NOEXPORT:
  402.  
  403. # sed inserts variable overrides after the following line.
  404. ####target overrides
  405. ####host overrides
  406. ####cross overrides
  407. ####build overrides
  408.  
  409. # Now figure out from those variables how to compile and link.
  410.  
  411. all.indirect: $(ALL)
  412.  
  413. # IN_GCC tells obstack.h that we are using gcc's <stddef.h> file.
  414. # ??? IN_GCC should be obsolete now.
  415. INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
  416.  
  417. # This is the variable actually used when we compile.
  418. ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
  419.  
  420. # Likewise.
  421. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
  422.  
  423. # Even if ALLOCA is set, don't use it if compiling with GCC.
  424. USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo "${ALLOCA}" ;; esac `
  425. USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
  426. USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
  427. USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
  428.  
  429. # Dependency on obstack, alloca, malloc or whatever library facilities
  430. # are not installed in the system libraries.
  431. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  432. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC) $(COMMON_OBJS)
  433.  
  434. # Likewise, for use in the tools that must run on this machine
  435. # even if we are cross-building GCC.
  436. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  437. HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
  438.  
  439. # How to link with both our special library facilities
  440. # and the system's installed libraries.
  441. LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB) $(COMMON_OBJS)
  442.  
  443. # Likewise, for use in the tools that must run on this machine
  444. # even if we are cross-building GCC.
  445. HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC)  \
  446.         $(HOST_CLIB)
  447.  
  448. HOST_RTL = $(HOST_PREFIX)rtl.o
  449. HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
  450. HOST_PRINT = $(HOST_PREFIX)print-rtl.o
  451.  
  452. # Specify the directories to be searched for header files.
  453. # Both . and srcdir are used, in that order,
  454. # so that tm.h and config.h will be found in the compilation
  455. # subdirectory rather than in the source directory.
  456. INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
  457.  
  458. # Always use -I$(srcdir)/config when compiling.
  459. .c.o:
  460.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
  461.  
  462. # This tells GNU make version 3 not to export all the variables
  463. # defined in this file into the environment.
  464. .NOEXPORT:
  465.  
  466. # Support for additional languages (other than c and objc).
  467. # ??? objc can be supported this way too (leave for later).
  468.  
  469. # These next lines are overridden by configure.
  470. LANG_MAKEFILES =
  471. LANG_STAGESTUFF =
  472. LANG_DIFF_EXCLUDES =
  473.  
  474. # Flags to pass to recursive makes.
  475. # CC is set by configure.  Hosts without symlinks need special handling
  476. # because we need CC="stage1/xgcc -Bstage1/" to work in the language
  477. # subdirectories.
  478. # ??? The choices here will need some experimenting with.
  479. FLAGS_TO_PASS = \
  480.     "AR_FLAGS=$(AR_FLAGS)" \
  481.     "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
  482.     "BISON=$(BISON)" \
  483.     "BISONFLAGS=$(BISONFLAGS)" \
  484.     "CC=set-by-configure" \
  485.     "CFLAGS=$(CFLAGS)" \
  486.     "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
  487.     "LDFLAGS=$(LDFLAGS)" \
  488.     "LEX=$(LEX)" \
  489.     "LEXFLAGS=$(LEXFLAGS)" \
  490.     "MAKEINFO=$(MAKEINFO)" \
  491.     "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
  492.     "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
  493.     "RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
  494.     "SHELL=$(SHELL)" \
  495.     "exeext=$(exeext)" \
  496.     "objext=$(objext)" \
  497.     "exec_prefix=$(exec_prefix)" \
  498.     "prefix=$(prefix)" \
  499.     "tooldir=$(tooldir)" \
  500.     "bindir=$(bindir)" \
  501.     "libsubdir=$(libsubdir)"
  502.  
  503. # Lists of files for various purposes.
  504.  
  505. # A list of all the language-specific executables.
  506. # This is overridden by configure.
  507. COMPILERS = cc1$(exeext) cc1obj$(exeext)
  508.  
  509. # Language-specific object files for C.
  510. C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
  511.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  512.  
  513. # Language-specific object files for Objective C.
  514. OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
  515.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  516.  
  517. # Files specific to the C interpreter bytecode compiler(s).
  518. BC_OBJS = bc-emit.o bc-optab.o
  519.  
  520. # Bytecode header files constructed at build time; vmsconfig.com wants this.
  521. BC_ALL = bc-arity.h bc-opcode.h bc-opname.h
  522.  
  523. # Language-independent object files.
  524. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  525.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  526.  rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  527.  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  528.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  529.  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  530.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  531.  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  532.  insn-attrtab.o $(out_object_file) getpwd.o convert.o $(EXTRA_OBJS)
  533.  
  534. # GEN files are listed separately, so they can be built before doing parallel
  535. #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
  536. #  them before rtl.o is compiled.
  537. GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
  538.  
  539. CCCP=cccp
  540. # Uncomment this line if you want to use cppmain (w/cpplib) as cpp.
  541. #CCCP=cppmain
  542.  
  543. # Files to be copied away after each stage in building.
  544. STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
  545.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  546.  insn-attr.h insn-attrtab.c insn-opinit.c \
  547.  stamp-flags stamp-config stamp-codes \
  548.  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
  549.  stamp-attr stamp-attrtab stamp-opinit stamp-proto stamp-crt stamp-crtS \
  550.  genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \
  551.  genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \
  552.  genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \
  553.  $(BC_ALL) \
  554.  stamp-bcarity stamp-bcopcode stamp-bcopname \
  555.  bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \
  556.  $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
  557.  $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
  558.  protoize$(exeext) unprotoize$(exeext) \
  559.  specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
  560.  *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
  561.  *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack \
  562.  *.[si] \
  563.  $(LANG_STAGESTUFF)
  564.  
  565. # Members of libgcc1.a.
  566. LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
  567.    _lshrsi3 _ashrsi3 _ashlsi3 \
  568.    _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
  569.    _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
  570.    _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
  571.    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
  572.    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
  573.  
  574. # Library members defined in libgcc2.c.
  575. LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
  576.      _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 \
  577.     _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
  578.     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
  579.     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
  580.     _fixtfdi _fixunstfdi _floatditf \
  581.     __gcc_bcmp _varargs _eprintf _op_new _op_vnew _new_handler _op_delete \
  582.     _op_vdel _bb _shtab _clear_cache _trampoline __main _exit _ctors _eh \
  583.     _pure
  584.  
  585. # The files that "belong" in CONFIG_H are deliberately omitted
  586. # because having them there would not be useful in actual practice.
  587. # All they would do is cause complete recompilation every time
  588. # one of the machine description files is edited.
  589. # That may or may not be what one wants to do.
  590. # If it is, rm *.o is an easy way to do it.
  591. # CONFIG_H = $(host_xm_file) $(tm_file)
  592. CONFIG_H =
  593. RTL_H = rtl.h rtl.def machmode.h machmode.def
  594. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  595. BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
  596.  
  597. # Language makefile fragments.
  598.  
  599. # The following targets define the interface between us and the languages.
  600. #
  601. # all.build, all.cross, start.encap, rest.encap,
  602. # info, dvi,
  603. # install-normal, install-common, install-info, install-man,
  604. # uninstall, distdir,
  605. # mostlyclean, clean, distclean, extraclean, maintainer-clean,
  606. # stage1, stage2, stage3, stage4
  607. #
  608. # Each language is linked in with a series of hooks (since we can't use `::'
  609. # targets).  The name of each hooked is "lang.${target_name}" (eg: lang.info).
  610. # Configure computes and adds these here.
  611.  
  612. ####language hooks
  613.  
  614. # sed inserts language fragments after the following line.
  615. ####language fragments
  616.  
  617. # End of language makefile fragments.
  618.  
  619. # Avoid a lot of time thinking about remaking Makefile.in and *.def.
  620. .SUFFIXES: .in .def
  621.  
  622. Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
  623.    $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file) \
  624.    $(LANG_MAKEFILES)
  625.     cp config.status config.run
  626.     $(SHELL) config.run
  627.     rm -f config.run
  628.  
  629. all.internal: start.encap rest.encap
  630. # This is what to compile if making a cross-compiler.
  631. # Note that we can compile enquire using the cross-compiler just built,
  632. # although we can't run it on this machine.
  633. all.cross: native gcc-cross specs stmp-headers $(LIBGCC) $(STMP_FIXPROTO) \
  634.     $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
  635. # This is what to compile if making gcc with a cross-compiler.
  636. all.build: native xgcc$(exeext) $(EXTRA_PARTS) lang.all.build
  637. # This is what must be made before installing GCC and converting libraries.
  638. start.encap: native xgcc$(exeext) specs $(LIBGCC1) xlimits.h lang.start.encap
  639. # These can't be made until after GCC can run.
  640. rest.encap: stmp-headers $(LIBGCC) $(STMP_FIXPROTO) $(EXTRA_PARTS) lang.rest.encap
  641. # This is what is made with the host's compiler
  642. # whether making a cross compiler or not.
  643. native: config.status cpp$(exeext) $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
  644.  
  645. # Define the names for selecting languages in LANGUAGES.
  646. C c: cc1$(exeext)
  647. OBJC objc: cc1obj$(exeext) objc-runtime
  648. OBJECTIVE-C objective-c: cc1obj$(exeext) objc-runtime
  649. PROTO: proto
  650.  
  651. # Tell GNU make these are phony targets.
  652. .PHONY: C c OBJC objc OBJECTIVE-C objective-c PROTO proto
  653.  
  654. # Really, really stupid make features, such as SUN's KEEP_STATE, may force
  655. # a target to build even if it is up-to-date.  So we must verify that
  656. # config.status does not exist before failing.
  657. config.status:
  658.     @if [ ! -f config.status ] ; then \
  659.       echo You must configure gcc.  Look at the INSTALL file for details.; \
  660.       false; \
  661.     else \
  662.       true; \
  663.     fi
  664.  
  665. # On the target machine, finish building a cross compiler.
  666. # This does the things that can't be done on the host machine.
  667. rest.cross: $(LIBGCC) gfloat.h specs
  668.  
  669. # Verify that it works to compile and link libgcc1-test.
  670. # If it does, then there are sufficient replacements for libgcc1.a.
  671. libgcc1-test: libgcc1-test.o native $(GCC_PARTS)
  672.     @echo "Testing libgcc1.  Ignore linker warning messages."
  673.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) libgcc1-test.o -o libgcc1-test \
  674.       -nostartfiles -nostdlib `$(GCC_FOR_TARGET) --print-libgcc-file-name`
  675. libgcc1-test.o: libgcc1-test.c native xgcc$(exeext)
  676.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/libgcc1-test.c
  677.  
  678. # Recompile all the language-independent object files.
  679. # This is used only if the user explicitly asks for it.
  680. compilations: ${OBJS}
  681.  
  682. # Create a list of the language-independent object files so the language
  683. # subdirectories needn't mention their names explicitly.
  684. stamp-objlist: Makefile $(OBJS) $(BC_OBJS) $(COMMON_OBJS)
  685.     echo " $(OBJS) $(BC_OBJS) $(COMMON_OBJS)" | sed -e 's, \([a-z]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist
  686.  
  687. # We call this executable `xgcc' rather than `gcc'
  688. # to avoid confusion if the current directory is in the path
  689. # and CC is `gcc'.  It is renamed to `gcc' when it is installed.
  690. xgcc$(exeext): gcc.o version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
  691.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
  692.  
  693. # Dump a specs file to make -B./ read these specs over installed ones.
  694. specs: xgcc$(exeext)
  695.     $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
  696.     mv tmp-specs specs
  697.  
  698. # We do want to create an executable named `xgcc', so we can use it to
  699. # compile libgcc2.a.
  700. # Also create gcc-cross, so that install-common will install properly.
  701. gcc-cross: xgcc
  702.     cp xgcc$(exeext) gcc-cross$(exeext)
  703.  
  704. cc1$(exeext): $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  705.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  706.  
  707. cc1obj$(exeext): $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  708.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  709.  
  710. # Copy float.h from its source.
  711. gfloat.h: $(FLOAT_H)
  712.     -rm -f gfloat.h
  713.     cp $(FLOAT_H) gfloat.h
  714.  
  715. # Create float.h source for the native machine.
  716. float.h-nat: enquire
  717.     -./enquire -f > tmp-float.h
  718.     mv tmp-float.h float.h-nat
  719.  
  720. # Create a dummy float.h source for a cross-compiler.
  721. float.h-cross:
  722.     echo "#error float.h values not known for cross-compiler" > t-float.h-cross
  723.     mv t-float.h-cross float.h-cross
  724.  
  725. # Used to compile enquire with standard cc, but have forgotten why.
  726. # Let's try with GCC.
  727. enquire$(exeext): enquire.o $(GCC_PARTS)
  728.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
  729. enquire.o: $(srcdir)/enquire.c $(GCC_PASSES) stmp-int-hdrs
  730. # Breaking this line caused a problem with one version of GNU make.
  731.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
  732.  
  733. # Build the version of limits.h that we will install.
  734. xlimits.h: glimits.h limitx.h limity.h
  735.     if $(LIMITS_H_TEST) ; then \
  736.       cat $(srcdir)/limitx.h $(srcdir)/glimits.h $(srcdir)/limity.h > tmp-xlimits.h; \
  737.     else \
  738.       cat $(srcdir)/glimits.h > tmp-xlimits.h; \
  739.     fi
  740.     mv tmp-xlimits.h xlimits.h
  741.  
  742. # Build libgcc.a.
  743. # This is done in two parts because some functions, in libgcc1.c,
  744. # must be compiled with something other than GCC,
  745. # while the rest, in libgcc2.c, must be compiled with xgcc.
  746. # That means we can't do libgcc2.c until after xgcc, cc1, etc.
  747.  
  748. # Use this as value of LIBGCC1 to cause conversion to GNU library format.
  749. # LIBCONVERT should put its output in libgcc1.conv.
  750. libgcc1.conv: libgcc1.a
  751.     $(LIBCONVERT) libgcc1.a libgcc1.conv
  752.  
  753. # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
  754. # Make an empty file instead.
  755. libgcc1.null: $(GCC_PASSES)
  756.     echo "__foo () {}" > dummy.c
  757.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
  758.     $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
  759.     rm -f dummy$(objext) dummy.c
  760.  
  761. # This is $(LIBGCC1) for a cross-compiler.
  762. # We have no automatic way of building libgcc1.a, 
  763. # so it's up to the installer to find a way to do that.
  764. # This rule deliberately does not depend on libgcc1.a
  765. # so that it will fail if the installer hasn't provided it.
  766. libgcc1.cross:
  767.     mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
  768.  
  769. # Compile the library of arithmetic subroutines with the native compiler.
  770. # Don't compile it with GCC!
  771. # (That would cause most arithmetic functions to call themselves.)
  772. libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
  773.     -rm -f tmplibgcc1.a
  774. # Actually build it in tmplibgcc1.a, then rename at end,
  775. # so that libgcc1.a itself remains nonexistent if compilation is aborted.
  776. # -e causes any failing command to make this rule fail.
  777. # -e doesn't work in certain shells, so we test $$? as well.
  778. # lynx has a broken ar, it always complains when the initial library is
  779. # empty, thus this command works only if we don't do -e
  780. # There is a trailing backslash (\) deleted from the following line.
  781. #    set -e;
  782.     for name in $(LIB1FUNCS); \
  783.     do \
  784.       echo $${name}; \
  785.       rm -f $${name}$(objext); \
  786.       $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
  787.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  788.       mv libgcc1$(objext) $${name}$(objext); \
  789.       $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
  790.       rm -f $${name}$(objext); \
  791.     done
  792. # Some shells crash when a loop has no items.
  793. # So make sure there is always at least one--`..'.
  794. # Then ignore it.
  795. # We don't use -e here because there are if statements
  796. # that should not make the command give up when the if condition is false.
  797. # Instead, we test for failure after each command where it matters.
  798.     for file in .. $(LIB1FUNCS_EXTRA); \
  799.     do \
  800.       if [ x$${file} != x.. ]; then \
  801.         name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
  802.         echo $${name}; \
  803.         if [ $${name}.asm = $${file} ]; then \
  804.           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  805.         else true; fi; \
  806.         $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
  807.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  808.         $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \
  809.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  810.         rm -f $${name}.s $${name}$(objext); \
  811.       else true; \
  812.       fi; \
  813.     done
  814.     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
  815.     mv tmplibgcc1.a libgcc1.a
  816.  
  817. # Build libgcc1.a from assembler source.  LIB1ASMFUNCS is the list of
  818. # functions.  LIB1ASMSRC is the name of the source file in the config
  819. # subdirectory.
  820. libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
  821.     -rm -f tmplibgcc1.a libgcc1.S
  822.     cp $(srcdir)/config/$(LIB1ASMSRC) libgcc1.S
  823. # Actually build it in tmplibgcc1.a, then rename at end,
  824. # so that libgcc1-asm.a itself remains nonexistent if compilation is aborted.
  825. # -e causes any failing command to make this rule fail.
  826. # -e doesn't work in certain shells, so we test $$? as well.
  827. # lynx has a broken ar, it always complains when the initial library is
  828. # empty, thus this command works only if we don't do -e
  829. # There is a trailing backslash (\) deleted from the following line.
  830. #    set -e;
  831.     for name in $(LIB1ASMFUNCS); \
  832.     do \
  833.       echo $${name}; \
  834.       $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
  835.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  836.       mv libgcc1$(objext) $${name}$(objext); \
  837.       $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
  838.       rm -f $${name}$(objext); \
  839.     done
  840.     -rm -f libgcc1.S
  841.     mv tmplibgcc1.a libgcc1-asm.a
  842.  
  843. # Generate assembly versions of the functions required for libgcc1.
  844. # You'll still need to massage the code by hand (possibly hacking
  845. # underscores and local labels) but this will get you started.
  846. libgcc1.S: libgcc1.c $(CONFIG_H) config.status
  847.     -rm -f libgcc1.S
  848.     touch libgcc1.S
  849.     for name in $(LIB1FUNCS); \
  850.     do \
  851.       echo $${name}; \
  852.       $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -S -DL$${name} $(srcdir)/libgcc1.c; \
  853.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  854.       echo '#ifdef ' L$${name} >> libgcc1.S; \
  855.       cat  libgcc1.s >> libgcc1.S; \
  856.       echo '#endif /*' L$${name} '*/' >> libgcc1.S; \
  857.       echo "" >> libgcc1.S; \
  858.     done
  859.  
  860. # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
  861. # But recompiling cc1 should not force recompilation of libgcc2.a.
  862. # If you want to force recompilation, delete libgcc2.a.
  863. libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
  864.     -if [ -f libgcc2.ready ] ; then \
  865.         true; \
  866.     else \
  867.         touch libgcc2.ready; \
  868.     fi
  869.  
  870. libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
  871.    machmode.h longlong.h gbl-ctors.h config.status
  872. # Actually build it in tmplibgcc2.a, then rename at end,
  873. # so that libgcc2.a itself remains nonexistent if compilation is aborted.
  874.     -rm -f tmplibgcc2.a
  875. # -e causes any failing command to make this rule fail.
  876. # -e doesn't work in certain shells, so we test $$? as well.
  877. # lynx has a broken ar, it always complains when the initial library is
  878. # empty, thus this command works only if we don't do -e
  879. # There is a trailing backslash (\) deleted from the following line.
  880. #    set -e;
  881.     for name in $(LIB2FUNCS); \
  882.     do \
  883.       echo $${name}; \
  884.       $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  885.           $(srcdir)/libgcc2.c -o $${name}$(objext); \
  886.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  887.       $(AR) $(AR_FLAGS) \
  888.       `case "$(target)" in i*86-nextpdo-winnt3*) \
  889.           (echo /out:tmplibgcc2.a; \
  890.            if [ -s tmplibgcc2.a ]; then echo tmplibgcc2.a; fi) ;; \
  891.        *) echo tmplibgcc2.a ;; esac` \
  892.       $${name}$(objext); \
  893.       rm -f $${name}$(objext); \
  894.     done
  895. # Some shells crash when a loop has no items.
  896. # So make sure there is always at least one--`..'.
  897. # Then ignore it.
  898. # We don't use -e here because there are if statements
  899. # that should not make the command give up when the if condition is false.
  900. # Instead, we test for failure after each command where it matters.
  901.     for file in .. $(LIB2FUNCS_EXTRA); \
  902.     do \
  903.       if [ x$${file} != x.. ]; then \
  904.         name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
  905.         oname=` echo $${name} | sed -e 's,.*/,,'`; \
  906.         echo $${name}; \
  907.         if [ $${name}.asm = $${file} ]; then \
  908.           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  909.         else true; fi; \
  910.         $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  911.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  912.         $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
  913.         rm -f $${name}.s $${oname}$(objext); \
  914.       else true; \
  915.       fi; \
  916.     done
  917.     mv tmplibgcc2.a libgcc2.a
  918. # These lines were deleted from above the mv command
  919. # because ranlibing libgcc.a itself should suffice.
  920. #    -if [ x${HPUX_GAS} = x ] ; then \
  921. #      if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
  922. #    else true; fi
  923.  
  924. # Combine the various libraries into a single library, libgcc.a.
  925. libgcc.a: $(LIBGCC1) $(LIBGCC2)
  926.     -rm -rf tmplibgcc.a libgcc.a tmpcopy
  927. %if win32-pdo
  928.     lib /OUT:tmplibgcc.a $(LIBGCC1) $(LIBGCC2)
  929. %else win32-pdo
  930.     mkdir tmpcopy
  931.     -if [ x$(LIBGCC1) != x ];            \
  932.     then (cd tmpcopy; $(AR) x ../$(LIBGCC1));    \
  933.     else true;                    \
  934.     fi
  935. # Some versions of ar (specifically the one in RISC/os 5.x), create an
  936. # unwritable table of contents file, and then print an error message when
  937. # the second ar command tries to overwrite this file.  To avoid the error
  938. # message from ar, we make sure all files are writable.
  939.     -(cd tmpcopy; chmod +w * > $(NULL) 2>&1)
  940.     (cd tmpcopy; $(AR) x ../$(LIBGCC2))
  941.     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
  942.     rm -rf tmpcopy
  943.     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  944. %endif win32-pdo
  945. # Actually build it in tmplibgcc.a, then rename at end,
  946. # so that libgcc.a itself remains nonexistent if compilation is aborted.
  947.     mv tmplibgcc.a libgcc.a
  948.  
  949. # Use the genmultilib shell script to generate the information the gcc
  950. # driver program needs to select the library directory based on the
  951. # switches.
  952. multilib.h: $(srcdir)/genmultilib Makefile
  953.     $(SHELL) $(srcdir)/genmultilib "$(MULTILIB_OPTIONS)" \
  954.       "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" > multilib.h
  955.  
  956. # Build multiple copies of libgcc.a, one for each target switch.
  957. stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
  958.    $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
  959.     for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
  960.       dir=`echo $$i | sed -e 's/;.*$$//'`; \
  961.       flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
  962.       $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
  963.         AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
  964.         RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
  965.         HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
  966.         LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
  967.         LIBGCC1="$(LIBGCC1)" LIBGCC2="$(LIBGCC2)" \
  968.         dir="$${dir}" stmp-multilib-sub; \
  969.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  970.     done
  971.     touch stmp-multilib
  972.  
  973. # Subroutine of stmp-multilib so make -n works.
  974. stmp-multilib-sub:
  975.     rm -f $(dir)/libgcc.a $(LIBGCC2)
  976.     $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
  977.       AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
  978.       HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
  979.       LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
  980.     if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
  981.     then true; \
  982.     else rm -f $(LIBGCC1); \
  983.     fi
  984.     if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \
  985.     then true; \
  986.     else \
  987.       $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
  988.         AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
  989.         HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
  990.         LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
  991.     fi
  992.     rm -rf tmplibgcc.a tmpcopy
  993.     mkdir tmpcopy
  994.     if [ x$(LIBGCC1) != x ]; \
  995.     then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
  996.     else true; \
  997.     fi
  998.     (cd tmpcopy; $(AR) x ../$(LIBGCC2))
  999.     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
  1000.     rm -rf libgcc2.a tmpcopy
  1001.     if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  1002.     if [ -d $(dir) ]; then true; else mkdir $(dir); fi
  1003.     mv tmplibgcc.a $(dir)/libgcc.a
  1004.  
  1005. objc-runtime: #libobjc.a
  1006.  
  1007. # Build the Objective C runtime library.
  1008. libobjc.a: cc1obj$(exeext) stmp-int-hdrs libgcc2.ready $(USE_COLLECT2) $(EXTRA_PARTS)
  1009.     if [ -d objc ]; then true; else mkdir objc; fi
  1010.     thisdir1=`pwd`; \
  1011.     srcdir1=`cd $(srcdir); pwd`; \
  1012.     cd objc; \
  1013.     $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  1014.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  1015.       GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  1016.       GCC_CFLAGS="$(GCC_CFLAGS)"
  1017.     -rm -f libobjc.a
  1018.     ln objc/libobjc.a . >$(NULL) 2>&1 || cp objc/libobjc.a .
  1019.     -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  1020.  
  1021. # This is used by objc/Makefile if the user runs that directly.
  1022. sublibobjc.a: cc1obj$(exeext) stmp-int-hdrs libgcc2.ready
  1023.     thisdir1=`pwd`; \
  1024.     srcdir1=`cd $(srcdir); pwd`; \
  1025.     cd objc; \
  1026.     $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  1027.       srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  1028.       GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
  1029.       GCC_CFLAGS="$(GCC_CFLAGS)"
  1030.  
  1031. # Compile two additional files that are linked with every program
  1032. # linked using GCC on systems using COFF or ELF, for the sake of C++
  1033. # constructors.
  1034. crtbegin.o: stamp-crt ; @true
  1035. crtend.o: stamp-crt; @true
  1036.  
  1037. stamp-crt:    crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
  1038.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
  1039.       -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
  1040.       -g0 -c $(srcdir)/crtstuff.c
  1041.     mv crtstuff$(objext) crtbegin$(objext)
  1042.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
  1043.       -DCRT_END -finhibit-size-directive -fno-inline-functions \
  1044.       -g0 -c $(srcdir)/crtstuff.c
  1045.     mv crtstuff$(objext) crtend$(objext)
  1046.     touch stamp-crt
  1047.  
  1048. # On some systems we also want to install versions of these files
  1049. # compiled using PIC for use in shared libraries.
  1050. crtbeginS.o crtendS.o: stamp-crtS ; @true
  1051.  
  1052. stamp-crtS:    crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
  1053.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
  1054.       -DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
  1055.       -g0 -c $(srcdir)/crtstuff.c -fPIC
  1056.     mv crtstuff$(objext) crtbeginS$(objext)
  1057.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS) \
  1058.       -DCRT_END -finhibit-size-directive -fno-inline-functions \
  1059.       -g0 -c $(srcdir)/crtstuff.c -fPIC
  1060.     mv crtstuff$(objext) crtendS$(objext)
  1061.     touch stamp-crtS
  1062.  
  1063. # Compiling object files from source files.
  1064.  
  1065. # Note that dependencies on obstack.h are not written
  1066. # because that file is not part of GCC.
  1067.  
  1068. # C language specific files.
  1069.  
  1070. c-parse.o : c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  1071.     c-parse.h c-tree.h input.h flags.h
  1072.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c c-parse.c
  1073. c-parse.h: c-parse.c
  1074. c-parse.c: c-parse.y
  1075.     $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
  1076. c-parse.y: c-parse.in
  1077.     sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
  1078.       -e "/^ifc$$/d" -e "/^end ifc$$/d" \
  1079.       `case "$(target)" in i*86-nextpdo-winnt3*) \
  1080.           echo " -e /^ifwin32$$/d" ;; esac ` \
  1081.           -e "`case "$(target)" in i*86-nextpdo-winnt3*) \
  1082.           echo '/^end ifwin32$$/d' ;; \
  1083.            *) echo '/^ifwin32$$/,/^end ifwin32$$/d' ;; esac`" \
  1084.       $(srcdir)/c-parse.in >tmp-c-parse.y
  1085.     $(srcdir)/move-if-change tmp-c-parse.y c-parse.y
  1086.  
  1087. $(srcdir)/c-gperf.h $(C_GPERF_H): c-parse.gperf $(C_GPERF)
  1088.     cat $(srcdir)/c-parse.gperf $(C_GPERF) | \
  1089.     gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,`case "$(target)" in i*86-nextpdo-winnt3*) \
  1090.            echo 4 ;; \
  1091.         *) echo 3 ;; esac`,$$ >tmp-gperf.h
  1092.      $(srcdir)/move-if-change tmp-gperf.h $(C_GPERF_H) \
  1093.         `if [ "x$(C_GPERF_H)" = x ]; then echo c-gperf.h; fi`
  1094.  
  1095. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h output.h
  1096. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h output.h
  1097. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  1098. c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
  1099.     input.h flags.h c-gperf.h $(C_GPERF_H) c-pragma.h
  1100. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  1101. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
  1102. c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H) c-pragma.h
  1103. c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
  1104.  
  1105. # To make a configuration always use collect2, set USE_COLLECT2 to ld.
  1106. ld: collect2$(exeext)
  1107.     rm -f ld$(exeext)
  1108.     ln collect2$(exeext) ld$(exeext) > $(NULL) 2>&1 \
  1109.        || cp collect2$(exeext) ld$(exeext)
  1110.  
  1111. collect2$(exeext) : collect2.o cplus-dem.o underscore.o version.o $(LIBDEPS)
  1112. # Don't try modifying collect2 (aka ld) in place--it might be linking this.
  1113.     -rm -f collect2$(exeext)
  1114.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o \
  1115.       cplus-dem.o underscore.o version.o $(LIBS)
  1116.  
  1117. collect2.o : collect2.c $(CONFIG_H) gstab.h obstack.h demangle.h
  1118.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
  1119.     -DTARGET_MACHINE=\"$(target)\" $(MAYBE_USE_COLLECT2) \
  1120.     -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
  1121.  
  1122. cplus-dem.o: cplus-dem.c demangle.h
  1123.  
  1124. underscore.c: stamp-under ; @true
  1125.  
  1126. stamp-under: $(GCC_PASSES)
  1127. %if next-pdo
  1128. %else next-pdo
  1129.     # This is a workaround for a bug in Mach's /bin/sh.
  1130.     # (Actually, the bug may be in the kernel.)
  1131.     touch tmp-dum.c
  1132. %endif next-pdo
  1133.     echo "int xxy_us_dummy;" >tmp-dum.c
  1134.     $(GCC_FOR_TARGET) -S tmp-dum.c
  1135.     echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
  1136.     if grep _xxy_us_dummy tmp-dum.s > $(NULL) ; then \
  1137.       echo "int prepends_underscore = 1;" >>tmp-under.c; \
  1138.     else \
  1139.       echo "int prepends_underscore = 0;" >>tmp-under.c; \
  1140.     fi
  1141.     $(srcdir)/move-if-change tmp-under.c underscore.c
  1142.     -rm -f tmp-dum.c tmp-dum.s
  1143.     touch stamp-under
  1144.  
  1145. # Objective C language specific files.
  1146.  
  1147. objc-parse.o : objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  1148.    c-tree.h input.h flags.h objc-act.h
  1149.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c objc-parse.c
  1150. objc-parse.c objc-parse.h : objc-parse.y
  1151.     $(BISON) $(BISONFLAGS) -d objc-parse.y -o objc-parse.c
  1152. objc-parse.y: $(srcdir)/c-parse.in
  1153.     -rm -f  objc-parse.y
  1154.     echo "/* This file is generated from c-parse.in.  DO NOT EDIT.  */" \
  1155.          > tmp-objc-prs.y
  1156.     sed -e "/^ifc$$/,/^end ifc$$/d" \
  1157.       -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
  1158.       `case "$(target)" in i*86-nextpdo-winnt3*) \
  1159.           echo " -e /^ifwin32$$/d" ;; esac ` \
  1160.           -e "`case "$(target)" in i*86-nextpdo-winnt3*) \
  1161.           echo '/^end ifwin32$$/d' ;; \
  1162.            *) echo '/^ifwin32$$/,/^end ifwin32$$/d' ;; esac `" \
  1163.       $(srcdir)/c-parse.in >>tmp-objc-prs.y
  1164.     $(srcdir)/move-if-change tmp-objc-prs.y objc-parse.y
  1165.  
  1166. objc-act.o : objc-act.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h c-lex.h \
  1167.    flags.h objc-act.h input.h function.h objc-parse.h
  1168.  
  1169. # A file used by all variants of C.
  1170.  
  1171. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  1172.  
  1173. # Language-independent files.
  1174.  
  1175. gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files)
  1176.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1177.   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  1178.   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  1179.   -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  1180.   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  1181.   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  1182.   $(MAYBE_TARGET_DEFAULT) \
  1183.   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
  1184.  
  1185. dumpvers: dumpvers.c
  1186.  
  1187. version.o: version.c
  1188. obstack.o: obstack.c
  1189.  
  1190. convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
  1191.  
  1192. tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h function.h
  1193. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  1194. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h
  1195. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  1196. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) bytecode.h bc-emit.h \
  1197.    flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
  1198.    $(lang_options_files)
  1199.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1200.       $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \
  1201.       -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
  1202.  
  1203. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  1204.  
  1205. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  1206. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  1207.  
  1208. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
  1209.    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h \
  1210.    output.h bytecode.h c-pragma.h
  1211. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  1212.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  1213.    recog.h output.h bytecode.h
  1214. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  1215.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
  1216.    recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
  1217.    bc-emit.h
  1218. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h regs.h \
  1219.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
  1220.    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
  1221.    bc-emit.h modemap.def
  1222. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  1223.    insn-flags.h
  1224. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  1225.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  1226. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  1227.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  1228. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  1229.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
  1230. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  1231.    insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
  1232. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  1233.    insn-config.h reload.h
  1234. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  1235.    insn-config.h reload.h output.h defaults.h
  1236. xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
  1237. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
  1238.    function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
  1239.    bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
  1240. real.o : real.c $(CONFIG_H) $(TREE_H)
  1241. getpwd.o : getpwd.c $(CONFIG_H)
  1242.  
  1243. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  1244.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
  1245.    bytecode.h
  1246.  
  1247. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  1248.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  1249. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  1250.  
  1251. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  1252.    insn-config.h recog.h
  1253. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  1254.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  1255. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  1256.    integrate.h regs.h flags.h expr.h loop.h
  1257. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  1258.    basic-block.h regs.h hard-reg-set.h output.h
  1259. combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
  1260.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  1261.    basic-block.h recog.h real.h hard-reg-set.h
  1262. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  1263.    basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
  1264. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  1265.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  1266. global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
  1267.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  1268.  
  1269. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h output.h \
  1270.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  1271. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) real.h flags.h expr.h \
  1272.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  1273.    basic-block.h recog.h output.h
  1274. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  1275.    regs.h hard-reg-set.h insn-codes.h insn-config.h basic-block.h recog.h \
  1276.    reload.h expr.h
  1277. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  1278.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  1279.    flags.h output.h
  1280. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  1281.    flags.h insn-config.h insn-attr.h
  1282. final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h regs.h \
  1283.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  1284.    hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
  1285. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  1286.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  1287.    insn-flags.h insn-codes.h real.h
  1288. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  1289.    regs.h hard-reg-set.h flags.h insn-config.h
  1290.  
  1291. $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
  1292.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  1293.    insn-flags.h output.h insn-attr.h insn-codes.h
  1294.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
  1295.  
  1296. # Build auxiliary files that support ecoff format.
  1297. mips-tfile: mips-tfile.o version.o $(LIBDEPS)
  1298.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
  1299.  
  1300. mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
  1301.  
  1302. mips-tdump: mips-tdump.o version.o $(LIBDEPS)
  1303.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
  1304.  
  1305. mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
  1306.  
  1307. # Build file to support OSF/rose half-pic format.
  1308. halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H)
  1309.  
  1310. # Normally this target is not used; but it is used if you
  1311. # define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
  1312. # from the GNU Emacs distribution.
  1313. alloca.o:    alloca.c
  1314.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
  1315.       -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
  1316.     $(ALLOCA_FINISH)
  1317.  
  1318. # Generate header and source files from the machine description, 
  1319. # and compile them.
  1320.  
  1321. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  1322.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  1323.   insn-attr.h insn-attrtab.c
  1324.  
  1325. # The following pair of rules has this effect:
  1326. # genconfig is run only if the md has changed since genconfig was last run;
  1327. # but the file insn-config.h is touched only when its contents actually change.
  1328.  
  1329. # Each of the other insn-* files is handled by a similar pair of rules.
  1330.  
  1331. # This causes an anomaly in the results of make -n
  1332. # because insn-* is older than stamp-*
  1333. # and thus make -n thinks that insn-* will be updated
  1334. # and force recompilation of things that depend on it.
  1335. # We use move-if-change precisely to avoid such recompilation.
  1336. # But there is no way to teach make -n that it will be avoided.
  1337.  
  1338. # Each of the insn-*.[ch] rules has a semicolon at the end,
  1339. # for otherwise the system Make on SunOS 4.1 never tries
  1340. # to recompile insn-*.o.  To avoid problems and extra noise from
  1341. # versions of make which don't like empty commands (nothing after the
  1342. # trailing `;'), we call true for each.
  1343.  
  1344. insn-config.h: stamp-config ; @true
  1345. stamp-config : $(md_file) genconfig$(exeext) $(srcdir)/move-if-change
  1346.     ./genconfig $(md_file) > tmp-config.h
  1347.     $(srcdir)/move-if-change tmp-config.h insn-config.h
  1348.     touch stamp-config
  1349.  
  1350. insn-flags.h: stamp-flags ; @true
  1351. stamp-flags : $(md_file) genflags$(exeext) $(srcdir)/move-if-change
  1352.     ./genflags $(md_file) > tmp-flags.h
  1353.     $(srcdir)/move-if-change tmp-flags.h insn-flags.h
  1354.     touch stamp-flags
  1355.  
  1356. insn-codes.h: stamp-codes ; @true
  1357. stamp-codes : $(md_file) gencodes$(exeext) $(srcdir)/move-if-change
  1358.     ./gencodes $(md_file) > tmp-codes.h
  1359.     $(srcdir)/move-if-change tmp-codes.h insn-codes.h
  1360.     touch stamp-codes
  1361.  
  1362. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
  1363.   insn-config.h insn-flags.h insn-codes.h
  1364.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
  1365.  
  1366. insn-emit.c: stamp-emit ; @true
  1367. stamp-emit : $(md_file) genemit$(exeext) $(srcdir)/move-if-change
  1368.     ./genemit $(md_file) > tmp-emit.c
  1369.     $(srcdir)/move-if-change tmp-emit.c insn-emit.c
  1370.     touch stamp-emit
  1371.  
  1372. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
  1373.   real.h output.h flags.h
  1374.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
  1375.  
  1376. insn-recog.c: stamp-recog ; @true
  1377. stamp-recog : $(md_file) genrecog$(exeext) $(srcdir)/move-if-change
  1378.     ./genrecog $(md_file) > tmp-recog.c
  1379.     $(srcdir)/move-if-change tmp-recog.c insn-recog.c
  1380.     touch stamp-recog
  1381.  
  1382. insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
  1383.   insn-config.h flags.h rtl.h recog.h expr.h reload.h
  1384.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
  1385.  
  1386. insn-opinit.c: stamp-opinit ; @true
  1387. stamp-opinit : $(md_file) genopinit$(exeext) $(srcdir)/move-if-change
  1388.     ./genopinit $(md_file) > tmp-opinit.c
  1389.     $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
  1390.     touch stamp-opinit
  1391.  
  1392. insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
  1393.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
  1394.  
  1395. insn-extract.c: stamp-extract ; @true
  1396. stamp-extract : $(md_file) genextract$(exeext) $(srcdir)/move-if-change
  1397.     ./genextract $(md_file) > tmp-extract.c
  1398.     $(srcdir)/move-if-change tmp-extract.c insn-extract.c
  1399.     touch stamp-extract
  1400.  
  1401. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
  1402.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
  1403.  
  1404. insn-peep.c: stamp-peep ; @true
  1405. stamp-peep : $(md_file) genpeep$(exeext) $(srcdir)/move-if-change
  1406.     ./genpeep $(md_file) > tmp-peep.c
  1407.     $(srcdir)/move-if-change tmp-peep.c insn-peep.c
  1408.     touch stamp-peep
  1409.  
  1410. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  1411.      insn-attr.h insn-config.h
  1412.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
  1413.  
  1414. insn-attr.h: stamp-attr ; @true
  1415. stamp-attr : $(md_file) genattr$(exeext) $(srcdir)/move-if-change
  1416.     ./genattr $(md_file) > tmp-attr.h
  1417.     $(srcdir)/move-if-change tmp-attr.h insn-attr.h
  1418.     touch stamp-attr
  1419.  
  1420. insn-attrtab.c: stamp-attrtab ; @true
  1421. stamp-attrtab : $(md_file) genattrtab$(exeext) $(srcdir)/move-if-change
  1422.     if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file);    \
  1423.     then                    \
  1424.       echo Using $(PREMADE_ATTRTAB);    \
  1425.       cp $(PREMADE_ATTRTAB) tmp-attrtab.c;    \
  1426.     else                    \
  1427.       ./genattrtab $(md_file) > tmp-attrtab.c;    \
  1428.     fi
  1429.     $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
  1430.     touch stamp-attrtab
  1431.  
  1432. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
  1433.     hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
  1434.     insn-codes.h
  1435.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
  1436.  
  1437. insn-output.c: stamp-output ; @true
  1438. stamp-output : $(md_file) genoutput$(exeext) $(srcdir)/move-if-change
  1439.     ./genoutput $(md_file) > tmp-output.c
  1440.     $(srcdir)/move-if-change tmp-output.c insn-output.c
  1441.     touch stamp-output
  1442.  
  1443. # Compile the programs that generate insn-* from the machine description.
  1444. # They are compiled with $(HOST_CC), and associated libraries,
  1445. # since they need to run on this machine
  1446. # even if GCC is being compiled to run on some other machine.
  1447.  
  1448. # $(CONFIG_H) is omitted from the deps of the gen*.o
  1449. # because these programs don't really depend on anything 
  1450. # about the target machine.  They do depend on config.h itself,
  1451. # since that describes the host machine.
  1452.  
  1453. # Pass the md file through cpp if the target requests it.
  1454. $(MD_FILE): $(MD_DEPS)
  1455.     rm -f $@
  1456.     $(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
  1457.     mv tmp-$@ $@
  1458.  
  1459. genconfig$(exeext) : genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
  1460.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1461.       genconfig.o $(HOST_RTL) $(HOST_LIBS)
  1462.  
  1463. genconfig.o : genconfig.c $(RTL_H) $(build_xm_file)
  1464.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
  1465.  
  1466. genflags$(exeext) : genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
  1467.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1468.      genflags.o $(HOST_RTL) $(HOST_LIBS)
  1469.  
  1470. genflags.o : genflags.c $(RTL_H) $(build_xm_file)
  1471.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
  1472.  
  1473. gencodes$(exeext) : gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
  1474.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1475.      gencodes.o $(HOST_RTL) $(HOST_LIBS)
  1476.  
  1477. gencodes.o : gencodes.c $(RTL_H) $(build_xm_file)
  1478.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
  1479.  
  1480. genemit$(exeext) : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1481.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1482.      genemit.o $(HOST_RTL) $(HOST_LIBS)
  1483.  
  1484. genemit.o : genemit.c $(RTL_H) $(build_xm_file)
  1485.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
  1486.  
  1487. genopinit$(exeext) : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1488.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1489.      genopinit.o $(HOST_RTL) $(HOST_LIBS)
  1490.  
  1491. genopinit.o : genopinit.c $(RTL_H) $(build_xm_file)
  1492.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
  1493.  
  1494. genrecog$(exeext) : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
  1495.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1496.      genrecog.o $(HOST_RTL) $(HOST_LIBS)
  1497.  
  1498. genrecog.o : genrecog.c $(RTL_H) $(build_xm_file)
  1499.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
  1500.  
  1501. genextract$(exeext) : genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
  1502.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1503.      genextract.o $(HOST_RTL) $(HOST_LIBS)
  1504.  
  1505. genextract.o : genextract.c $(RTL_H) $(build_xm_file) insn-config.h
  1506.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
  1507.  
  1508. genpeep$(exeext) : genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
  1509.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1510.      genpeep.o $(HOST_RTL) $(HOST_LIBS)
  1511.  
  1512. genpeep.o : genpeep.c $(RTL_H) $(build_xm_file)
  1513.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
  1514.  
  1515. genattr$(exeext) : genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
  1516.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1517.      genattr.o $(HOST_RTL) $(HOST_LIBS)
  1518.  
  1519. genattr.o : genattr.c $(RTL_H) $(build_xm_file)
  1520.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
  1521.  
  1522. genattrtab$(exeext) : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
  1523.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1524.      genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
  1525.  
  1526. genattrtab.o : genattrtab.c $(RTL_H)  $(build_xm_file) insn-config.h
  1527.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
  1528.  
  1529. genoutput$(exeext) : genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
  1530.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1531.      genoutput.o $(HOST_RTL) $(HOST_LIBS)
  1532.  
  1533. genoutput.o : genoutput.c $(RTL_H) $(build_xm_file)
  1534.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
  1535.  
  1536. # Compile the libraries to be used by gen*.
  1537. # If we are not cross-building, gen* use the same .o's that cc1 will use,
  1538. # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
  1539. # with the rules for rtl.o, alloca.o, etc.
  1540. $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
  1541.     rm -f $(HOST_PREFIX)rtl.c
  1542.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
  1543.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
  1544.  
  1545. $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
  1546.     rm -f $(HOST_PREFIX)print-rtl.c
  1547.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
  1548.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
  1549.  
  1550. $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
  1551.     rm -f $(HOST_PREFIX)rtlanal.c
  1552.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
  1553.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
  1554.  
  1555. $(HOST_PREFIX_1)alloca.o: alloca.c
  1556.     rm -f $(HOST_PREFIX)alloca.c
  1557.     cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
  1558.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
  1559.  
  1560. $(HOST_PREFIX_1)obstack.o: obstack.c
  1561.     rm -f $(HOST_PREFIX)obstack.c
  1562.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
  1563.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
  1564.  
  1565. $(HOST_PREFIX_1)malloc.o: malloc.c
  1566.     rm -f $(HOST_PREFIX)malloc.c
  1567.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
  1568.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
  1569.  
  1570. # This satisfies the dependency that we get if you cross-compile a compiler
  1571. # that does not need to compile alloca, malloc or whatever.
  1572. $(HOST_PREFIX_1): 
  1573.     touch $(HOST_PREFIX_1)
  1574.  
  1575. # Remake bytecode files.
  1576. BI_OBJ=bi-parser.o bi-lexer.o bi-reverse.o
  1577.  
  1578. bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
  1579.    bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
  1580. bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
  1581.    bc-opcode.h bc-typecd.h bc-typecd.def
  1582.  
  1583. bi-arity$(exeext): bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
  1584.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1585.      bi-arity.o $(BI_OBJ) $(HOST_LIBS)
  1586. bi-opcode$(exeext): bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
  1587.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1588.      bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
  1589. bi-opname$(exeext): bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
  1590.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1591.      bi-opname.o $(BI_OBJ) $(HOST_LIBS)
  1592.  
  1593. $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.c
  1594. $(srcdir)/bi-parser.c: $(srcdir)/bi-parser.y
  1595.     cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
  1596.  
  1597. bi-parser.o: $(srcdir)/bi-parser.c bi-defs.h $(build_xm_file)
  1598.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1599.        $(srcdir)/bi-parser.c
  1600. bi-lexer.o: bi-lexer.c $(srcdir)/bi-parser.h $(build_xm_file)
  1601.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1602.        $(srcdir)/bi-lexer.c
  1603. bi-arity.o: bi-arity.c bi-defs.h $(build_xm_file)
  1604.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1605.        $(srcdir)/bi-arity.c
  1606. bi-opcode.o: bi-opcode.c bi-defs.h $(build_xm_file)
  1607.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1608.        $(srcdir)/bi-opcode.c
  1609. bi-opname.o: bi-opname.c bi-defs.h $(build_xm_file)
  1610.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1611.        $(srcdir)/bi-opname.c
  1612. bi-reverse.o: bi-reverse.c bi-defs.h
  1613.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1614.        $(srcdir)/bi-reverse.c
  1615.  
  1616. bc-arity.h: stamp-bcarity ; @true
  1617. stamp-bcarity : $(srcdir)/bytecode.def bi-arity$(exeext) $(srcdir)/move-if-change
  1618.     ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
  1619.     $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
  1620.     touch stamp-bcarity
  1621.  
  1622. bc-opcode.h: stamp-bcopcode ; @true
  1623. stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode$(exeext) $(srcdir)/move-if-change
  1624.     ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
  1625.     $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
  1626.     touch stamp-bcopcode
  1627.  
  1628. bc-opname.h: stamp-bcopname ; @true
  1629. stamp-bcopname : $(srcdir)/bytecode.def bi-opname$(exeext) $(srcdir)/move-if-change
  1630.     ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
  1631.     $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
  1632.     touch stamp-bcopname
  1633.  
  1634. bytecode.mostlyclean:
  1635.     -rm -f bc-arity.h bc-opcode.h bc-opname.h
  1636.  
  1637. bytecode.distclean bytecode.clean:    bytecode.mostlyclean
  1638.     -rm -f bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) bi-lexer$(exeext)
  1639.  
  1640. bytecode.maintainer-clean: bytecode.clean
  1641.     -rm -f bi-parser.c bi-parser.h
  1642.  
  1643.  
  1644. # Remake cpp and protoize.
  1645.  
  1646. # Making the preprocessor
  1647. cpp$(exeext): $(CCCP)$(exeext)
  1648.     -rm -f cpp$(exeext)
  1649.     ln $(CCCP)$(exeext) cpp$(exeext) > $(NULL) 2>&1 \
  1650.      || cp $(CCCP)$(exeext) cpp$(exeext)
  1651. cccp$(exeext): cccp.o cexp.o version.o $(LIBDEPS)
  1652.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o \
  1653.       version.o $(LIBS)
  1654. cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
  1655.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
  1656. $(srcdir)/cexp.c: $(srcdir)/cexp.y
  1657.     cd $(srcdir); $(BISON) -o cexp.c cexp.y
  1658.  
  1659. cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
  1660. # The reason we use $(libdir)/g++-include rather than using libsubdir
  1661. # is for compatibility with the current version of libg++.
  1662.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1663.       -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1664.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1665.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1666.       -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1667.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1668.       -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
  1669.  
  1670. cppmain: cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
  1671.   version.o $(LIBDEPS)
  1672.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
  1673.       cppalloc.o cpperror.o cppexp.o version.o $(LIBS)
  1674.  
  1675. cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status
  1676.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1677.       -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1678.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1679.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1680.       -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1681.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1682.       -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
  1683.  
  1684. cpperror.o: cpperror.c $(CONFIG_H) cpplib.h
  1685.  
  1686. cppexp.o: cppexp.c $(CONFIG_H) cpplib.h
  1687.  
  1688. cpphash.o: cpphash.c cpplib.h cpphash.h
  1689.  
  1690. cppalloc.o: cppalloc.c $(CONFIG_H)
  1691.  
  1692. # Note for the stamp targets, we run the program `true' instead of
  1693. # having an empty command (nothing following the semicolon).
  1694.  
  1695. proto: config.status protoize unprotoize SYSCALLS.c.X
  1696.  
  1697. protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1698.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
  1699.       protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS)
  1700. protoize.o: stamp-proto ; @true
  1701.  
  1702. unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1703.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
  1704.       unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS)
  1705. unprotoize.o:    stamp-proto ; @true
  1706.  
  1707. stamp-proto: protoize.c getopt.h $(CONFIG_H)
  1708.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1709.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1710.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1711.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1712.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1713.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1714.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1715.       -DUNPROTOIZE $(srcdir)/protoize.c
  1716.     mv protoize$(objext) unprotoize$(objext)
  1717.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1718.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1719.       -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
  1720.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1721.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1722.       -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  1723.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1724.       $(srcdir)/protoize.c
  1725.     touch stamp-proto
  1726.  
  1727. getopt.o: getopt.c getopt.h
  1728.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
  1729. getopt1.o: getopt1.c getopt.h
  1730.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
  1731.  
  1732. # This info describes the target machine, so compile with GCC just built.
  1733. SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
  1734.    stmp-int-hdrs
  1735.     -rm -f SYSCALLS.c tmp-SYSCALLS.s
  1736.     cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
  1737.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1738.       -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
  1739.     -rm -f SYSCALLS.c tmp-SYSCALLS.s
  1740.  
  1741.  
  1742. test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
  1743.     -rm -f tmp-proto.[cso]
  1744.     cp $(srcdir)/protoize.c tmp-proto.c
  1745.     chmod u+w tmp-proto.c
  1746.     ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1747.       $(CFLAGS) $(INCLUDES) \
  1748.       -DGCC_INCLUDE_DIR=0 \
  1749.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1750.       -DCROSS_INCLUDE_DIR=0 \
  1751.       -DTOOL_INCLUDE_DIR=0 \
  1752.       -DSTD_PROTO_DIR=0" tmp-proto.c
  1753.     @echo '**********' Expect 400 lines of differences.
  1754.     -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
  1755.     -wc -l tmp-proto.diff
  1756.     ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1757.       $(CFLAGS) $(INCLUDES) \
  1758.       -DGCC_INCLUDE_DIR=0 \
  1759.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1760.       -DCROSS_INCLUDE_DIR=0 \
  1761.       -DTOOL_INCLUDE_DIR=0 \
  1762.       -DSTD_PROTO_DIR=0" tmp-proto.c
  1763.     @echo Expect zero differences.
  1764.     diff $(srcdir)/protoize.c tmp-proto.c | cat
  1765.     -rm -f tmp-proto.[cs] tmp-proto$(objext)
  1766.  
  1767. # Build the include directory.  The stamp files are stmp-* rather than
  1768. # stamp-* so that mostlyclean does not force the include directory to
  1769. # be rebuilt.
  1770.  
  1771. # Build the include directory except for float.h (which depends upon
  1772. # enquire).
  1773. stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h $(OBJC_HEADERS)
  1774. # Copy in the headers provided with gcc.
  1775. # The sed command gets just the last file name component;
  1776. # this is necessary because VPATH could add a dirname.
  1777. # Using basename would be simpler, but some systems don't have it.
  1778.     objdir=`pwd`; \
  1779.     cd $(srcdir); \
  1780.     for file in .. $(USER_H); do \
  1781.       if [ X$$file != X.. ]; then \
  1782.         realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
  1783.         rm -f $$objdir/include/$$realfile; \
  1784.         cp ginclude/$$realfile $$objdir/include; \
  1785.         chmod a+r $$objdir/include/$$realfile; \
  1786.       fi; \
  1787.     done
  1788.     rm -f include/limits.h
  1789.     cp xlimits.h include/limits.h
  1790.     chmod a+r include/limits.h
  1791. # Install the README
  1792.     rm -f include/README
  1793.     cp $(srcdir)/README-fixinc include/README
  1794.     chmod a+r include/README
  1795.     touch stmp-int-hdrs
  1796.  
  1797. # Build the complete include directory.
  1798. stmp-headers: stmp-int-hdrs gfloat.h
  1799. %if next-headers
  1800.     if [ -d include/ansi ]; then true; \
  1801.       else mkdir include/ansi; \
  1802.     fi
  1803.     dir=include/ansi; \
  1804. %else next-headers
  1805.     dir=include; \
  1806. %endif next-headers
  1807.     rm -f $$dir/float.h; \
  1808.     cp gfloat.h $$dir/float.h; \
  1809.     chmod a+r $$dir/float.h
  1810.     touch stmp-headers
  1811.  
  1812. # Build fixed copies of system files.
  1813. stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
  1814.     rm -rf include
  1815.     mkdir include
  1816.     mkdir include/ansi;
  1817.     if [ x$(FIXINCLUDES) != xMakefile.in ]; \
  1818.     then \
  1819.       for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) include/ansi; do \
  1820.         if [ -d $$dir ]; \
  1821.         then \
  1822.           $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
  1823.         else true; fi; \
  1824.       done; \
  1825.     else true; \
  1826.     fi
  1827.     rm -f include/syslimits.h
  1828.     if [ -f include/limits.h ]; then \
  1829.       mv include/limits.h include/syslimits.h; \
  1830.     else \
  1831.       cp $(srcdir)/gsyslimits.h include/syslimits.h; \
  1832.     fi
  1833.     chmod a+r include/syslimits.h
  1834.     touch stmp-fixinc
  1835.  
  1836. # copy objc header files into build directory
  1837. objc-headers: stmp-fixinc
  1838.     if [ -d include ]; then true; else mkdir include; fi
  1839.     if [ -d objc ]; then true; else mkdir objc; fi
  1840.     thisdir1=`pwd`; \
  1841.     srcdir1=`cd $(srcdir); pwd`; \
  1842.     cd objc; \
  1843.     $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  1844.     srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  1845.     GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  1846.     GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  1847.     touch objc-headers
  1848.  
  1849. # Files related to the fixproto script.
  1850.  
  1851. deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
  1852. %if next-headers
  1853.     CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR} \
  1854.         -I${SYSTEM_HEADER_DIR}/bsd \
  1855.         -I${SYSTEM_HEADER_DIR}/ansi \
  1856.     "; \
  1857.       export CC; \
  1858.       $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
  1859. %else next-headers
  1860.     CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
  1861.       export CC; \
  1862.       $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h
  1863. %endif next-headers
  1864.     mv tmp-deduced.h deduced.h
  1865.  
  1866. gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
  1867.     ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
  1868.       gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
  1869.  
  1870. gen-protos.o: gen-protos.c scan.h $(build_xm_file)
  1871.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
  1872.  
  1873. scan.o: scan.c scan.h $(build_xm_file)
  1874.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
  1875.  
  1876. xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
  1877.     cat deduced.h $(srcdir)/sys-protos.h > tmp-fixtmp.c
  1878.     mv tmp-fixtmp.c fixtmp.c
  1879.     $(GCC_FOR_TARGET) fixtmp.c -w -U__SIZE_TYPE__ -U__PTRDIFF_TYPE__ -U__WCHAR_TYPE__ -E \
  1880.       | sed -e 's/    / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
  1881.       | ./gen-protos >xsys-protos.hT
  1882.     mv xsys-protos.hT xsys-protos.h
  1883.     rm -rf fixtmp.c
  1884.  
  1885. fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
  1886.    cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o version.o
  1887.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
  1888.        scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o version.o \
  1889.        cppexp.o $(HOST_LIBS)
  1890.  
  1891. fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file)
  1892.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
  1893.  
  1894. scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file)
  1895.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
  1896.  
  1897. # stmp-fixproto depends on this, not on fix-header directly.
  1898. # The idea is to make sure fix-header gets built,
  1899. # but not rerun fixproto after each stage
  1900. # just because fix-header's mtime has changed.
  1901. fixhdr.ready: fix-header
  1902.     -if [ -f fixhdr.ready ] ; then \
  1903.         true; \
  1904.     else \
  1905.         touch fixhdr.ready; \
  1906.     fi
  1907.  
  1908. # stmp-headers is to make sure fixincludes has already finished.
  1909. # The if statement is so that we don't run fixproto a second time
  1910. # if it has already been run on the files in `include'.
  1911. stmp-fixproto: fixhdr.ready fixproto stmp-headers
  1912.     @echo "Various warnings and error messages from fixproto are normal"
  1913.     -if [ -d include ] ; then true; else mkdir include; fi
  1914.     -if [ -f include/fixed ] ; then true; \
  1915.     else \
  1916.       : This line works around a 'make' bug in BSDI 1.1.; \
  1917.       FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
  1918.       $(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
  1919.       touch include/fixed; \
  1920.     fi
  1921.     touch stmp-fixproto
  1922.  
  1923. # Remake the info files.
  1924.  
  1925. doc: info
  1926. info: $(srcdir)/cpp.info $(srcdir)/gcc.info lang.info
  1927.  
  1928. $(srcdir)/cpp.info: cpp.texi
  1929.     cd $(srcdir); $(MAKEINFO) cpp.texi
  1930.  
  1931. $(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
  1932.         md.texi rtl.texi tm.texi 
  1933.     cd $(srcdir); $(MAKEINFO) gcc.texi
  1934.  
  1935. dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi lang.dvi
  1936.  
  1937. # This works with GNU Make's default rule.
  1938. $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
  1939.         md.texi rtl.texi tm.texi 
  1940.     $(TEXI2DVI) $<
  1941.  
  1942. # This works with GNU Make's default rule.
  1943. $(srcdir)/cpp.dvi: cpp.texi
  1944.     $(TEXI2DVI) $<
  1945.  
  1946. $(srcdir)/INSTALL: install1.texi install.texi
  1947.     $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
  1948.       `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
  1949.  
  1950. # Deletion of files made during compilation.
  1951. # There are four levels of this:
  1952. #   `mostlyclean', `clean', `distclean' and `maintainer-clean'.
  1953. # `mostlyclean' is useful while working on a particular type of machine.
  1954. # It deletes most, but not all, of the files made by compilation.
  1955. # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
  1956. # `clean' deletes everything made by running `make all'.
  1957. # `distclean' also deletes the files made by config.
  1958. # `maintainer-clean' also deletes everything that could be regenerated
  1959. # automatically.  We remove as much from the language subdirectories as we can
  1960. # (less duplicated code).
  1961.  
  1962.  
  1963. mostlyclean: bytecode.mostlyclean lang.mostlyclean
  1964.     -rm -f $(STAGESTUFF)
  1965. # Clean the objc subdir if we created one.
  1966.     if [ -d objc ]; then \
  1967.       srcdir1=`cd $(srcdir); pwd`; \
  1968.       cd objc; $(MAKE) -f $$srcdir1/objc/Makefile mostlyclean; \
  1969.     else true; fi
  1970.     -rm -f libobjc.a
  1971. # Delete the temporary source copies for cross compilation.
  1972.     -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
  1973.     -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
  1974.     -rm -f $(HOST_PREFIX_1)obstack.c 
  1975. # Delete the temp files made in the course of building libgcc.a.
  1976.     -rm -f tmplibgcc* tmpcopy xlimits.h
  1977.     for name in $(LIB1FUNCS); do rm -f $${name}.c; done
  1978. # Delete other temporary files.
  1979.     -rm -f tmp-float.h tmp-gcc.xtar.gz
  1980.     -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
  1981.     -rm -f tmp-c-parse.y tmp-objc-prs.y tmp-gperf.h
  1982.     -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
  1983.     -rm -f tmp-fixtmp.c xsys-protos.hT
  1984. # Delete the stamp files.
  1985.     -rm -f stamp-* tmp-*
  1986.     -rm -f */stamp-* */tmp-*
  1987. # Delete debugging dump files.
  1988.     -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  1989.     -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
  1990.     -rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
  1991.     -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
  1992.     -rm -f */*.sched2 */*.stack
  1993. # Delete some files made during installation.
  1994.     -rm -f specs gfloat.h float.h-* enquire$(exeext) SYSCALLS.c.X SYSCALLS.c
  1995.     -rm -f collect collect2$(exeext) mips-tfile mips-tdump alloca.s
  1996. # Delete files generated for fixproto
  1997.     -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
  1998.       gen-protos fixproto.list fixtmp.* fixhdr.ready
  1999. # Delete unwanted output files from TeX.
  2000.     -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
  2001.     -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg
  2002. # Delete sorted indices we don't actually use.
  2003.     -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
  2004. # Delete core dumps.
  2005.     -rm -f core */core
  2006.  
  2007. # Delete all files made by compilation
  2008. # that don't exist in the distribution.
  2009. clean: mostlyclean bytecode.clean lang.clean
  2010. # It may not be quite desirable to delete unprotoize.c here,
  2011. # but the spec for `make clean' requires it.
  2012. # Using unprotoize.c is not quite right in the first place, 
  2013. # but what better way is there?
  2014.     -rm -f libgcc.a libgcc1.a libgcc1-asm.a libgcc2.a libgcc2.ready
  2015.     -rm -f libgcc1.null
  2016.     -rm -f *.dvi
  2017.     -rm -f */*.dvi
  2018.     -if [ -f md.pre-cpp ]; then \
  2019.       rm -f md ; \
  2020.     fi
  2021. # Delete the include directory.
  2022.     -rm -rf stmp-* include objc-headers
  2023.     -rm -f */stmp-*
  2024. # Delete files used by the "multilib" facility (including libgcc subdirs).
  2025.     -rm -f multilib.h tmpmultilib*
  2026.     -if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
  2027.       rm -rf $(MULTILIB_DIRNAMES); \
  2028.     else if [ "x$(MULTILIB_OPTIONS)" != x ] ; then \
  2029.       rm -rf `echo $(MULTILIB_OPTIONS) | sed -e 's/\// /g'`; \
  2030.     fi ; fi
  2031.  
  2032. # Delete all files that users would normally create
  2033. # while building and installing GCC.
  2034. distclean: clean bytecode.distclean lang.distclean
  2035.     -rm -f tm.h config.h tconfig.h hconfig.h md
  2036.     -rm -f config.status config.run
  2037.     -rm -f Makefile specs.h options.h *.oaux
  2038.     -rm -fr stage1 stage2 stage3 stage4
  2039.     -rm -f */stage1 */stage2 */stage3 */stage4 */include
  2040.     -rm -f objc-parse.output
  2041.     -rm -f c-parse.output
  2042.     -rm -f *.asm
  2043.  
  2044. # Delete anything likely to be found in the source directory
  2045. # that shouldn't be in the distribution.
  2046. extraclean: distclean lang.extraclean
  2047.     -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
  2048.     -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
  2049.     -rm -f config/*/=* config/*/"#"* config/*/*~*
  2050.     -rm -f config/*/*.orig config/*/*.rej
  2051.     -rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
  2052.     -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
  2053.     -rm -f *lose config/*lose config/*/*lose
  2054.     -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
  2055.     -rm -f */=* */"#"* */*~*
  2056.     -rm -f */patch* */*.orig */*.rej
  2057.     -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
  2058.     -rm -f */*.tar */*.xtar */*diff */*.diff.* */*.tar.* */*.xtar.* */*diffs
  2059.     -rm -f */*lose */*.s */*.s[0-9] */*.i
  2060.  
  2061. # Get rid of every file that's generated from some other file.
  2062. # Most of these files ARE PRESENT in the GCC distribution.
  2063. maintainer-clean: distclean bytecode.maintainer-clean lang.maintainer-clean
  2064.     -rm -f c-parse.y c-gperf.h $(C_GPERF_H) objc-parse.y
  2065.     -rm -f objc-parse.c objc-parse.output
  2066.     -rm -f c-parse.c c-parse.h c-parse.output
  2067.     -rm -f cexp.c cexp.output TAGS 
  2068.     -rm -f cpp.info* cpp.??s cpp.*aux
  2069.     -rm -f gcc.info* gcc.??s gcc.*aux
  2070.  
  2071. # Entry points `install' and `uninstall'.
  2072. # Also use `install-collect2' to install collect2 when the config files don't.
  2073.  
  2074. # The semicolon is to prevent the install.sh -> install default rule
  2075. # from doing anything.  Having it run true helps avoid problems and
  2076. # noise from versions of make which don't like to have null commands.
  2077. install: $(INSTALL_TARGET) ; @true
  2078.  
  2079. # Copy the compiler files into directories where they will be run.
  2080. # Install the driver last so that the window when things are
  2081. # broken is small.
  2082. install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
  2083.     install-libobjc install-man install-info lang.install-normal install-driver
  2084.  
  2085. # Do nothing while making gcc with a cross-compiler. The person who
  2086. # makes gcc for the target machine has to know how to put a complete
  2087. # gcc together by hand.
  2088. install-build: force
  2089.     @echo You have to install gcc on your target machine by hand.
  2090.  
  2091. # Run this on the target machine
  2092. # to finish installation of cross compiler.
  2093. install-cross-rest: install-float-h-cross
  2094.  
  2095. # Install float.h for cross compiler.
  2096. # Run this on the target machine!
  2097. install-float-h-cross: install-dir
  2098. #    if [ -f enquire ] ; then true; else false; fi
  2099. # Note: don't use -.  We should fail right away if enquire was not made.
  2100.     ./enquire -f > $(tmpdir)/float.h
  2101.     -rm -f $(libsubdir)/include/float.h
  2102.     $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
  2103.     -rm -f $(tmpdir)/float.h
  2104.     chmod a-x $(libsubdir)/include/float.h
  2105.  
  2106. # Create the installation directory.
  2107. install-dir:
  2108.     -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
  2109.     -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
  2110. # This dir isn't currently searched by cpp.
  2111. #    -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
  2112.     -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; chmod a+rx $(libdir)/gcc-lib/$(target) ; fi
  2113.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version) ; fi
  2114.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
  2115.     -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
  2116.     -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
  2117.     -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
  2118.     -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
  2119.     -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
  2120. # We don't use mkdir -p to create the parents of mandir,
  2121. # because some systems don't support it.
  2122. # Instead, we use this technique to create the immediate parent of mandir.
  2123.     -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
  2124.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
  2125.     -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
  2126.  
  2127. # Install the compiler executables built during cross compilation.
  2128. install-common: native install-dir $(EXTRA_PARTS) lang.install-common
  2129.     for file in $(COMPILERS); do \
  2130.       if [ -f $$file ] ; then \
  2131.         rm -f $(libsubdir)/$$file; \
  2132.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  2133.       else true; \
  2134.       fi; \
  2135.     done
  2136.     for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
  2137.       if [ x"$$file" != x.. ]; then \
  2138.         rm -f $(libsubdir)/$$file; \
  2139.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  2140.       else true; fi; \
  2141.     done
  2142.     for file in $(EXTRA_PARTS) ..; do \
  2143.       if [ x"$$file" != x.. ]; then \
  2144.         rm -f $(libsubdir)/$$file; \
  2145.         $(INSTALL_DATA) $$file $(libsubdir)/$$file; \
  2146.       else true; fi; \
  2147.     done
  2148. # Don't mess with specs if it doesn't exist yet.
  2149.     -if [ -f specs ] ; then \
  2150.       rm -f $(libsubdir)/specs; \
  2151.       $(INSTALL_DATA) specs $(libsubdir)/specs; \
  2152.     fi
  2153. # Install protoize if it was compiled.
  2154.     -if [ -f protoize$(exeext) ]; \
  2155.     then \
  2156.         rm -f $(bindir)/protoize$(exeext); \
  2157.         $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/protoize$(exeext); \
  2158.         rm -f $(bindir)/unprotoize$(exeext); \
  2159.         $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/unprotoize$(exeext); \
  2160.         rm -f $(libsubdir)/SYSCALLS.c.X; \
  2161.         $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
  2162.         chmod a-x $(libsubdir)/SYSCALLS.c.X; \
  2163.     fi
  2164.     -rm -f $(libsubdir)/cpp$(exeext)
  2165.     $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
  2166.  
  2167. # Install the driver program as $(target)-gcc
  2168. # and also as either gcc (if native) or $(tooldir)/bin/gcc.
  2169. install-driver: xgcc$(exeext)
  2170.     -if [ -f gcc-cross$(exeext) ] ; then \
  2171.       rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
  2172.       $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
  2173.       if [ -d $(tooldir)/bin/. ] ; then \
  2174.         rm -f $(tooldir)/bin/gcc$(exeext); \
  2175.         $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
  2176.       else true; fi; \
  2177.     else \
  2178.       rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
  2179.       $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
  2180.       rm -f $(bindir)/$(target)-gcc-1$(exeext); \
  2181.       ln $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext) \
  2182.         > $(NULL) 2>&1 \
  2183.         || cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext); \
  2184.       mv $(bindir)/$(target)-gcc-1$(exeext) $(bindir)/$(target)-gcc$(exeext); \
  2185.     fi
  2186.  
  2187. # Install the info files.
  2188. %if next-pdo
  2189. install-info:
  2190. %else next-pdo
  2191. install-info: doc install-dir lang.install-info
  2192.     -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
  2193.     cd $(srcdir); for f in cpp.info* gcc.info*; \
  2194.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  2195.     -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
  2196. %endif next-pdo
  2197.  
  2198. # Install the man pages.
  2199. install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
  2200.     -if [ -f gcc-cross ] ; then \
  2201.       rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
  2202.       $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
  2203.       chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
  2204.     else \
  2205.       rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
  2206.       $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
  2207.       chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
  2208.     fi
  2209.     -rm -f $(mandir)/cccp$(manext)
  2210.     -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
  2211.     -chmod a-x $(mandir)/cccp$(manext)
  2212.  
  2213. # Install the library.
  2214. install-libgcc: libgcc.a install-dir
  2215.     -if [ -f libgcc.a ] ; then \
  2216.       rm -f $(libsubdir)/libgcc.a; \
  2217.       $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
  2218.       if $(RANLIB_TEST) ; then \
  2219.         (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
  2220.       chmod a-x $(libsubdir)/libgcc.a; \
  2221.     else true; fi
  2222.  
  2223. # Install multiple versions of libgcc.a.
  2224. install-multilib: stmp-multilib install-dir
  2225.     for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
  2226.       dir=`echo $$i | sed -e 's/;.*$$//'`; \
  2227.       if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \
  2228.       rm -f $(libsubdir)/$${dir}/libgcc.a; \
  2229.       $(INSTALL_DATA) $${dir}/libgcc.a $(libsubdir)/$${dir}/libgcc.a; \
  2230.       if $(RANLIB_TEST); then \
  2231.         (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
  2232.       chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
  2233.     done
  2234.  
  2235. # Install the objc run time library.
  2236. install-libobjc: install-dir
  2237.     -if [ -f libobjc.a ] ; then \
  2238.       rm -f $(libsubdir)/libobjc.a; \
  2239.       $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
  2240.       if $(RANLIB_TEST) ; then \
  2241.         (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \
  2242.       chmod a-x $(libsubdir)/libobjc.a; \
  2243.     else true; fi
  2244.  
  2245. # Install all the header files built in the include subdirectory.
  2246. install-headers: install-include-dir $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
  2247. # Fix symlinks to absolute paths in the installed include directory to
  2248. # point to the installed directory, not the build directory.
  2249.     -files=`cd $(libsubdir)/include; find . -type l -print 2>$(NULL)`; \
  2250.     if [ $$? -eq 0 ]; then \
  2251.       dir=`cd include; pwd`; \
  2252.       for i in $$files; do \
  2253.         dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
  2254.         if expr "$$dest" : "$$dir.*" > $(NULL); then \
  2255.           rm -f $(libsubdir)/include/$$i; \
  2256.           ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  2257.         fi; \
  2258.       done; \
  2259.     fi
  2260.  
  2261. # Create or recreate the gcc private include file directory.
  2262. install-include-dir: install-dir
  2263.     -rm -rf $(libsubdir)/include
  2264.     mkdir $(libsubdir)/include
  2265.     -chmod a+rx $(libsubdir)/include
  2266.  
  2267. # Install the include directory using tar.
  2268. install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
  2269.     (cd include; \
  2270.      tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
  2271. # /bin/sh on some systems returns the status of the first tar,
  2272. # and that can lose with GNU tar which always writes a full block.
  2273. # So use `exit 0' to ignore its exit status.
  2274.  
  2275. # Install the include directory using cpio.
  2276. install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
  2277.     (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
  2278.  
  2279. # Put assert.h where it won't override GNU libc's assert.h.
  2280. # It goes in a dir that is searched after GNU libc's headers;
  2281. # thus, the following conditionals are no longer needed.
  2282. # But it's not worth deleting them now.
  2283. ## Don't replace the assert.h already there if it is not from GCC.
  2284. ## This code would be simpler if it tested for -f ... && ! grep ...
  2285. ## but supposedly the ! operator is missing in sh on some systems.
  2286. install-assert-h: assert.h install-dir
  2287.     if [ -f $(assertdir)/assert.h ]; \
  2288.     then \
  2289.       if grep "__eprintf" $(assertdir)/assert.h >$(NULL); \
  2290.         then \
  2291.         rm -f $(assertdir)/assert.h; \
  2292.         $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  2293.         chmod a-x $(assertdir)/assert.h; \
  2294.       else true; \
  2295.       fi; \
  2296.     else \
  2297.       rm -f $(assertdir)/assert.h; \
  2298.       $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  2299.       chmod a-x $(assertdir)/assert.h; \
  2300.     fi
  2301.  
  2302. # Use this target to install the program `collect2' under the name `ld'.
  2303. install-collect2: collect2$(exeext) install-dir
  2304.     $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/ld$(exeext)
  2305. # Install the driver program as $(libsubdir)/gcc for collect2.
  2306.     $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
  2307.  
  2308. # Cancel installation by deleting the installed files.
  2309. uninstall: lang.uninstall
  2310.     -rm -rf $(libsubdir)
  2311.     -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
  2312.     -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
  2313.     -rm -rf $(bindir)/protoize$(exeext)
  2314.     -rm -rf $(bindir)/unprotoize$(exeext)
  2315.     -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
  2316.     -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
  2317.     -rm -rf $(mandir)/cccp$(manext)
  2318.     -rm -rf $(mandir)/protoize$(manext)
  2319.     -rm -rf $(mandir)/unprotoize$(manext)
  2320.  
  2321. # These exist for maintenance purposes.
  2322.  
  2323. # Update the tags table.
  2324. TAGS: force
  2325.     cd $(srcdir);                            \
  2326.     mkdir temp;                            \
  2327.     mv -f c-parse.[ch] objc-parse.c cexp.c =*.[chy] temp;        \
  2328.     etags *.y *.h *.c;                        \
  2329.     mv temp/* .;                            \
  2330.     rmdir temp
  2331.  
  2332. # Create the distribution tar file.
  2333. #dist: gcc-$(version).tar.gz
  2334. dist: gcc.xtar.gz
  2335.  
  2336. gcc.xtar.gz: gcc.xtar
  2337.     gzip --best < gcc.xtar > tmp-gcc.xtar.gz
  2338.     mv tmp-gcc.xtar.gz gcc.xtar.gz
  2339.  
  2340. #gcc-$(version).tar.gz: gcc-$(version).tar
  2341. #    gzip < gcc-$(version).tar > gcc-$(version).tar.gz
  2342.  
  2343. #gcc-$(version).tar:
  2344. gcc.xtar: distdir
  2345. # Make the distribution.
  2346.     tar -chf gcc.xtar gcc-$(version)
  2347.  
  2348. # This target exists to do the initial work before the language specific
  2349. # stuff gets done.
  2350. distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y c-gperf.h \
  2351.   $(srcdir)/objc-parse.y $(srcdir)/c-parse.c $(srcdir)/objc-parse.c \
  2352.   $(srcdir)/cexp.c
  2353.     @if grep -s "for version ${mainversion}" gcc.texi > $(NULL); \
  2354.     then true; \
  2355.     else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
  2356.     fi
  2357. # Update the version number in README
  2358.     awk '$$1 " " $$2 " " $$3 == "This directory contains" \
  2359.         { $$6 = version; print $$0 } \
  2360.          $$1 " " $$2 " " $$3 != "This directory contains"' \
  2361.       version=$(version) README > tmp.README
  2362.     mv tmp.README README
  2363.     -rm -rf gcc-$(version) tmp    
  2364. # Put all the files in a temporary subdirectory
  2365. # which has the name that we want to have in the tar file.
  2366.     mkdir tmp
  2367.     mkdir tmp/config
  2368.     mkdir tmp/ginclude
  2369.     mkdir tmp/objc
  2370.     for file in *[0-9a-zA-Z+]; do \
  2371.       ln $$file tmp > $(NULL) 2>&1 || cp $$file tmp; \
  2372.     done
  2373.     cd config; \
  2374.     for file in *[0-9a-zA-Z+]; do \
  2375.       if test -d $$file && test "$$file" != RCS; then \
  2376.         mkdir ../tmp/config/$$file; \
  2377.         cd $$file; \
  2378.         for subfile in *[0-9a-zA-Z+]; do \
  2379.           ln $$subfile ../../tmp/config/$$file >$(NULL) 2>&1 \
  2380.           || cp $$subfile ../../tmp/config/$$file; \
  2381.         done; \
  2382.         cd ..; \
  2383.       else \
  2384.         ln $$file ../tmp/config >$(NULL) 2>&1 \
  2385.         || cp $$file ../tmp/config; \
  2386.       fi; \
  2387.     done
  2388.     cd ginclude; \
  2389.     for file in *[0-9a-zA-Z+]; do \
  2390.       ln $$file ../tmp/ginclude >$(NULL) 2>&1 \
  2391.        || cp $$file ../tmp/ginclude; \
  2392.     done
  2393.     cd objc; \
  2394.     for file in *[0-9a-zA-Z+]; do \
  2395.       ln $$file ../tmp/objc >$(NULL) 2>&1 || cp $$file ../tmp/objc; \
  2396.     done
  2397.     ln .gdbinit tmp
  2398.  
  2399. # Finish making `distdir', after the languages have done their thing.
  2400. distdir-finish:
  2401.     mv tmp gcc-$(version)
  2402. # Get rid of everything we don't want in the distribution.  We'd want
  2403. # this to use Makefile.in, but it doesn't have the `lang.foo' targets
  2404. # expanded.
  2405.     cd gcc-$(version); make extraclean
  2406.  
  2407. distdir: distdir-start lang.distdir distdir-finish
  2408.  
  2409. # make diff oldversion=M.N 
  2410. # creates a diff file between an older distribution and this one.
  2411. # The -P option assumes this is GNU diff.
  2412. diff:
  2413.     diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
  2414.       -x cexp.c -x bi-parser.c -x objc-parse.y -x objc-parse.c \
  2415.       -x TAGS \
  2416.       -x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
  2417.       -x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
  2418.       $(LANG_DIFF_EXCLUDES) \
  2419.       gcc-$(oldversion) gcc-$(version) > diffs
  2420.  
  2421. bootstrap: force
  2422. # Only build the C compiler for stage1, because that is the only one that
  2423. # we can guarantee will build with the native compiler, and also it is the
  2424. # only thing useful for building stage2.
  2425.     $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES=c
  2426.     $(MAKE) stage1
  2427. # This used to define ALLOCA as empty, but that would lead to bad results
  2428. # for a subsequent `make install' since that would not have ALLOCA empty.
  2429. # To prevent `make install' from compiling alloca.o and then relinking cc1
  2430. # because alloca.o is newer, we permit these recursive makes to compile
  2431. # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  2432.     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  2433.     $(MAKE) stage2
  2434.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  2435.  
  2436. bootstrap2: force
  2437.     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  2438.     $(MAKE) stage2
  2439.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  2440.  
  2441. bootstrap3: force
  2442.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  2443.  
  2444. # Compare the object files in the current directory with those in the
  2445. # stage2 directory.
  2446.  
  2447. # ./ avoids bug in some versions of tail.
  2448. compare: force
  2449.     for file in *$(objext); do \
  2450.       tail +16c ./$$file > tmp-foo1; \
  2451.       tail +16c stage2/$$file > tmp-foo2 2>$(NULL) \
  2452.         && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
  2453.     done
  2454.     for dir in tmp-foo $(SUBDIRS); do \
  2455.       if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
  2456.         for file in $$dir/*$(objext); do \
  2457.           tail +16c ./$$file > tmp-foo1; \
  2458.           tail +16c stage2/$$file > tmp-foo2 2>$(NULL) \
  2459.             && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
  2460.         done; \
  2461.       fi; \
  2462.     done
  2463.     -rm -f tmp-foo*
  2464.  
  2465. # Similar, but compare with stage3 directory
  2466. compare3: force
  2467.     for file in *$(objext); do \
  2468.       tail +16c ./$$file > tmp-foo1; \
  2469.       tail +16c stage3/$$file > tmp-foo2 2>$(NULL) \
  2470.         && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
  2471.     done
  2472.     for dir in tmp-foo $(SUBDIRS); do \
  2473.       if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
  2474.         for file in $$dir/*$(objext); do \
  2475.           tail +16c ./$$file > tmp-foo1; \
  2476.           tail +16c stage3/$$file > tmp-foo2 2>$(NULL) \
  2477.             && (cmp tmp-foo1 tmp-foo2 || echo $$file differs) || true; \
  2478.         done; \
  2479.       fi; \
  2480.     done
  2481.     -rm -f tmp-foo*
  2482.  
  2483. # Compare the object files in the current directory with those in the
  2484. # stage2 directory.  Use gnu cmp (diffutils v2.4 or later) to avoid
  2485. # running tail and the overhead of twice copying each object file.
  2486.  
  2487. gnucompare: force
  2488.     for file in *$(objext); do \
  2489.       cmp --ignore-initial=16 $$file stage2/$$file || true ; \
  2490.     done
  2491.     for dir in tmp-foo $(SUBDIRS); do \
  2492.       if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
  2493.         for file in $$dir/*$(objext); do \
  2494.           cmp --ignore-initial=16 $$file stage2/$$file || true ; \
  2495.         done; \
  2496.       fi; \
  2497.     done
  2498.  
  2499. # Similar, but compare with stage3 directory
  2500. gnucompare3: force
  2501.     for file in *$(objext); do \
  2502.       cmp --ignore-initial=16 $$file stage3/$$file || true ; \
  2503.     done
  2504.     for dir in tmp-foo $(SUBDIRS); do \
  2505.       if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
  2506.         for file in $$dir/*$(objext); do \
  2507.           cmp --ignore-initial=16 $$file stage3/$$file || true ; \
  2508.         done; \
  2509.       fi; \
  2510.     done
  2511.  
  2512. # Copy the object files from a particular stage into a subdirectory.
  2513. stage1-start:
  2514.     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  2515.     -for dir in . $(SUBDIRS) ; \
  2516.      do \
  2517.        if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
  2518.      done
  2519.     -mv $(STAGESTUFF) stage1
  2520. # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  2521. # dir will work properly.
  2522.     -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
  2523.     -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
  2524.     -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
  2525.     -rm -f stage1/libgcc.a
  2526.     -cp libgcc.a stage1
  2527.     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
  2528. stage1: force stage1-start lang.stage1
  2529.  
  2530. stage2-start:
  2531.     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  2532.     -for dir in . $(SUBDIRS) ; \
  2533.      do \
  2534.        if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
  2535.      done
  2536.     -mv $(STAGESTUFF) stage2
  2537. # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  2538. # dir will work properly.
  2539.     -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
  2540.     -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
  2541.     -if [ -f collect-ld ] ; then ln -s ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
  2542.     -rm -f stage2/libgcc.a
  2543.     -cp libgcc.a stage2
  2544.     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
  2545. stage2: force stage2-start lang.stage2
  2546.  
  2547. stage3-start:
  2548.     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  2549.     -for dir in . $(SUBDIRS) ; \
  2550.      do \
  2551.        if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
  2552.      done
  2553.     -mv $(STAGESTUFF) stage3
  2554. # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  2555. # dir will work properly.
  2556.     -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
  2557.     -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
  2558.     -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
  2559.     -rm -f stage3/libgcc.a
  2560.     -cp libgcc.a stage3
  2561.     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
  2562. stage3: force stage3-start lang.stage3
  2563.  
  2564. stage4-start:
  2565.     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  2566.     -for dir in . $(SUBDIRS) ; \
  2567.      do \
  2568.        if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
  2569.      done
  2570.     -mv $(STAGESTUFF) stage4
  2571. # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  2572. # dir will work properly.
  2573.     -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
  2574.     -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
  2575.     -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
  2576.     -rm -f stage4/libgcc.a
  2577.     -cp libgcc.a stage4
  2578.     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
  2579. stage4: force stage4-start lang.stage4
  2580.  
  2581. # Copy just the executable files from a particular stage into a subdirectory,
  2582. # and delete the object files.  Use this if you're just verifying a version
  2583. # that is pretty sure to work, and you are short of disk space.
  2584. risky-stage1: stage1
  2585.     - make clean
  2586.  
  2587. risky-stage2: stage2
  2588.     -make clean
  2589.  
  2590. risky-stage3: stage3
  2591.     -make clean
  2592.  
  2593. risky-stage4: stage4
  2594.     -make clean
  2595.  
  2596. #In GNU Make, ignore whether `stage*' exists.
  2597. .PHONY: stage1 stage2 stage3 stage4 clean maintainer-clean TAGS bootstrap
  2598. .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
  2599.  
  2600. force:
  2601.