Annotation of gcc/Makefile.in, revision 1.1.1.8

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.