OSDN Git Service

Use CROSS_LIBGCC1 for a cross-compiler
[pf3gnuchains/gcc-fork.git] / gcc / Makefile.in
index 921da02..46d777b 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile for GNU C compiler.
-#   Copyright (C) 1987, 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
+#   Copyright (C) 1987, 88, 90, 91, 92, 1993 Free Software Foundation, Inc.
 
 #This file is part of GNU CC.
 
@@ -64,6 +64,7 @@ INSTALL_PROGRAM = $(INSTALL)
 INSTALL_DATA = $(INSTALL)
 SYMLINK = ln -s
 MAKEINFO = makeinfo
+TEXI2DVI = texi2dvi
 
 # Define this as & to perform parallel make on a Sequent.
 # Note that this has some bugs, and it seems currently necessary 
@@ -88,6 +89,10 @@ CCLIBFLAGS = -O
 # Version of ar to use when compiling libgcc1.a.
 OLDAR = ar
 
+# Target to use when installing include directory.  Either
+# install-headers-tar or install-headers-cpio.
+INSTALL_HEADERS_DIR = install-headers-tar
+
 # The GCC to use for compiling libgcc2.a, enquire, and cross-test.
 # Usually the one we just built.
 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
@@ -96,7 +101,7 @@ GCC_FOR_TARGET = ./xgcc -B./
 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
 # It omits XCFLAGS, and specifies -B./.
 # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
-GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(CROSS_GCC_CFLAGS)
+GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
 
 # Special flags for compiling enquire.
 # We disable optimization to make floating point more reliable.
@@ -112,11 +117,13 @@ AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
 AR_FOR_TARGET_FLAGS = rc
 RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
 RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
-CROSS_TOOLS =
 
 # Dir to search for system headers.  Overridden by cross-make.
 SYSTEM_HEADER_DIR = /usr/include
 
+# Uncomment following line for fixproto support.  (May become the default!)
+# STMP_FIXPROTO = stmp-fixproto
+
 # There may be a premade insn-attrtab.c for this machine.
 # (You could rebuild it with genattrtab as usual, but it takes a long time.)
 # PREMADE_ATTRTAB is the file name of the file to use.
@@ -134,6 +141,11 @@ srcdir = .
 # Common prefix for installation directories.
 # NOTE: This directory must exist when you start installation.
 prefix = /usr/local
+# Directory in which to put localized header files. On the systems with
+# gcc as the native cc, `local_prefix' may not be `prefix' which is
+# `/usr'.
+# NOTE: local_prefix *should not* default from prefix.
+local_prefix = /usr/local
 # Directory in which to put host dependent programs and libraries
 exec_prefix = $(prefix)
 # Directory in which to put the executable for the command `gcc'
@@ -142,17 +154,20 @@ bindir = $(exec_prefix)/bin
 libdir = $(exec_prefix)/lib
 # Directory in which the compiler finds executables, libraries, etc.
 libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
-# Directory for header file assert.h.
-includedir = $(prefix)/include
+# Directory to search for site-specific includes.
+includedir = $(local_prefix)/include
 # assertdir is overridden in cross-make.
-assertdir = $(includedir)
+# (But this currently agrees with what is in cross-make.)
+assertdir = $(tooldir)/include
+# where the info files go
+infodir = $(prefix)/info
 # Extension (if any) to put in installed man-page filename.
 manext = .1
 # Directory in which to put man pages.
 mandir = $(prefix)/man/man1
 # Directory in which to find other cross-compilation tools and headers.
 # Used in install-cross.
-tooldir = $(prefix)/$(target)
+tooldir = $(exec_prefix)/$(target)
 # Dir for temp files.
 tmpdir = /tmp
 
@@ -163,11 +178,20 @@ CLIB=
 # system library.
 OBSTACK=obstack.o
 
+# Specify the rule for actually making libgcc.a,
+LIBGCC = libgcc.a
+# and the rule for installing it.
+INSTALL_LIBGCC = install-libgcc
+
 # Specify the rule for actually making libgcc1.a.
 # The value may be empty; that means to do absolutely nothing
 # with or for libgcc1.a.
 LIBGCC1 = libgcc1.a
 
+# Specify the rule for making libgcc1.a for a cross-compiler.
+# The default rule assumes that libgcc1.a is supplied by the user.
+CROSS_LIBGCC1 = libgcc1.cross
+
 # Specify the rule for actually making libgcc2.a.
 LIBGCC2 = libgcc2.a
 
@@ -175,7 +199,15 @@ LIBGCC2 = libgcc2.a
 # -g1 causes output of debug info only for file-scope entities.
 # we use this here because that should be enough, and also
 # so that -g1 will be tested.
-LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1
+LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g1
+
+# Additional options to use when compiling libgcc2.a.
+# Some targets override this to -Iinclude
+LIBGCC2_INCLUDES =
+
+# Things which must be built before building libgcc2.a.
+# Some targets override this to stmp-int-hdrs
+LIBGCC2_DEPS =
 
 # List of extra executables that should be compiled for this target machine
 # that are used for compiling from source code to object code.
@@ -210,18 +242,27 @@ LIB1FUNCS_EXTRA =
 # Assembler files should have names ending in `.asm'.
 LIB2FUNCS_EXTRA = 
 
+# Default float.h source to use for cross-compiler.
+CROSS_FLOAT_H=float.h-cross
+
 # Program to convert libraries.
 LIBCONVERT = 
 
 # Control whether header files are installed.
-# We will change this to install-fixincludes eventually.
-# It would be useful for people to try this now.
 INSTALL_HEADERS=install-headers
 
+# Options for tar when copying trees.  So HPUX can override it.
+TAROUTOPTS = xpBf
+
 # Select which version of fixincludes to use (I.E. regular versus SVR4)
+# This value is overridden directly by configure.
 FIXINCLUDES=fixincludes
 
 # Additional directories of header files to run fixincludes on.
+# These should be directories searched automatically by default
+# just as /usr/include is.
+# *Do not* use this for directories that happen to contain 
+# header files, but are not searched automatically by default.
 # On most systems, this is empty.
 OTHER_FIXINCLUDES_DIRS=
 
@@ -231,12 +272,7 @@ GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
 
 # List of things which should already be built whenever we try to use xgcc
 # to link anything.
-GCC_PARTS=$(GCC_PASSES) libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
-
-# Name of `ld' to link into the binary directory for a cross-compiler.
-# If we are using collect2, this will be `gld', since `ld' is collect2.
-# Otherwise it is `ld'.
-REAL_LD_NAME=`if [ x$(USE_COLLECT2) = xld ]; then echo "gld"; else echo "ld"; fi` 
+GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
 
 # Directory to link to, when using the target `maketest'.
 DIR = ../gcc
@@ -263,7 +299,10 @@ HOST_OBSTACK=$(OBSTACK)
 ALL=all.internal
 
 # Choose the real install target.
-INSTALL_TARGET=install-native
+INSTALL_TARGET=install-normal
+
+# Source for float.h.  Overridden by cross-make.
+FLOAT_H=float.h-nat
 
 # End of variables for you to override.
 
@@ -345,12 +384,12 @@ SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
 COMPILERS = cc1 cc1plus cc1obj
 
 # Language-specific object files for C.
-C_OBJS = c-parse.o c-lang.o c-lex.o \
-   c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-pragma.o
+C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
+   c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
 
-# Language-specific object files for Objectionable C.
-OBJC_OBJS = objc-parse.o objc-actions.o \
-   c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-pragma.o
+# Language-specific object files for Objective C.
+OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
+   c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
 
 # Language-specific object files for C++.
 CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
@@ -363,12 +402,12 @@ CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
 # Language-independent object files.
 OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
- rtl.o print-rtl.o rtlanal.o emit-rtl.o \
+ rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
- insn-recog.o insn-extract.o insn-output.o insn-emit.o \
+ insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  insn-attrtab.o aux-output.o getpwd.o convert.o $(EXTRA_OBJS)
 
 # GEN files are listed separately, so they can be built before doing parallel
@@ -379,13 +418,13 @@ GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
 # Files to be copied away after each stage in building.
 STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
- insn-attr.h insn-attrtab.c \
+ insn-attr.h insn-attrtab.c insn-opinit.c \
  stamp-flags stamp-config stamp-codes \
  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
- stamp-attr stamp-attrtab stamp-proto \
+ stamp-attr stamp-attrtab stamp-opinit stamp-proto \
  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
- genattrtab genattr \
- $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp \
+ genattrtab genattr genopinit \
+ $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp g++ g++-cross \
  cc1plus cc1obj enquire protoize unprotoize specs collect2 $(USE_COLLECT2)
 
 # Members of libgcc1.a.
@@ -402,17 +441,14 @@ LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
      _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 _ffsdi2 \
     _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
+    _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
     __gcc_bcmp _varargs _eprintf _op_new _new_handler _op_delete \
     _bb _shtab _clear_cache _trampoline __main _exit _ctors
 
 # Header files that are made available under the same name
 # to programs compiled with GCC.
-USER_H = va-alpha.h va-i860.h va-i960.h va-mips.h va-m88k.h \
-    va-pa.h va-pyr.h va-sparc.h va-spur.h proto.h $(EXTRA_HEADERS)
-
-# All the header files that are installed for users from GCC itself.
-INSTALLED_H = float.h stddef.h stdarg.h varargs.h $(USER_H) limits.h \
-    syslimits.h
+USER_H = va-alpha.h va-h8300.h va-i860.h va-i960.h va-mips.h va-m88k.h \
+    va-pa.h va-pyr.h va-sparc.h va-clipper.h va-spur.h proto.h $(EXTRA_HEADERS)
 
 # The files that "belong" in CONFIG_H are deliberately omitted
 # because having them there would not be useful in actual practice.
@@ -435,15 +471,17 @@ Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
 
 all.internal: start.encap rest.encap
 # This is what to compile if making a cross-compiler.
-all.cross: native gcc-cross specs libgcc.a cross-test $(EXTRA_PARTS)
+# Note that we can compile enquire using the cross-compiler just build,
+# although we can't run it on this machine.
+all.cross: native gcc-cross g++-cross specs $(LIBGCC) stmp-headers $(STMP_FIXPROTO) cross-test enquire $(EXTRA_PARTS)
 # This is what to compile if making gcc with a cross-compiler.
-all.build: native xgcc $(EXTRA_PARTS)
+all.build: native xgcc g++ $(EXTRA_PARTS)
 # This is what must be made before installing GCC and converting libraries.
-start.encap: native xgcc specs $(LIBGCC1) xlimits.h
+start.encap: native xgcc g++ specs $(LIBGCC1) xlimits.h
 # Use this to make a GCC that will be used only to recompile GCC.
-for-bootstrap: start.encap libgcc.a
+for-bootstrap: start.encap $(LIBGCC)
 # These can't be made, with COFF encapsulation, until after GCC can run.
-rest.encap: libgcc.a float.h  $(EXTRA_PARTS)
+rest.encap: $(LIBGCC) stmp-headers $(STMP_FIXPROTO) $(EXTRA_PARTS)
 # This is what is made with the host's compiler
 # whether making a cross compiler or not.
 native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
@@ -451,8 +489,9 @@ native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_C
 # Define the names for selecting languages in LANGUAGES.
 C c: cc1
 C++ c++: cc1plus
-OBJC objc: cc1obj objc-runtime
-OBJECTIVE-C objective-c: cc1obj objc-runtime
+# The next two ought to depend on objc-runtime, but that doesn't work yet.
+OBJC objc: cc1obj
+OBJECTIVE-C objective-c: cc1obj
 PROTO: proto
 
 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
@@ -468,11 +507,11 @@ config.status:
 
 # On the target machine, finish building a cross compiler.
 # This does the things that can't be done on the host machine.
-rest.cross: libgcc.a float.h specs
+rest.cross: $(LIBGCC) gfloat.h specs
 
 # Verify that it works to compile and link cross-test.
 # If it does, then there are sufficient replacements for libgcc1.a.
-cross-test: cross-test.o native gcc-cross libgcc.a
+cross-test: cross-test.o native gcc-cross $(LIBGCC) $(GCC_PARTS)
        $(GCC_FOR_TARGET) $(GCC_CFLAGS) cross-test.o -o $@
 cross-test.o: cross-test.c native gcc-cross
        $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/cross-test.c
@@ -491,12 +530,21 @@ xgcc: gcc.o version.o $(LIBDEPS)
 specs: xgcc
        $(GCC_FOR_TARGET) -dumpspecs > specs
 
+# Create the compiler driver for g++.
+g++: g++.o $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o g++ g++.o $(LIBS)
+
 # We do want to create an executable named `xgcc', so we can use it to
 # compile libgcc2.a.
 # Also create gcc-cross, so that install-common will install properly.
 gcc-cross: xgcc
        cp xgcc gcc-cross
 
+# Create a version of the g++ driver which calls the cross-compiler.
+g++-cross: $(srcdir)/g++.c
+       $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++-cross \
+          -DGCC_NAME=\"$(target)-gcc\" $(srcdir)/g++.c version.o $(LIBS)
+
 cc1:$(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(LIBS)
 
@@ -506,9 +554,18 @@ cc1plus:$(P) $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
 cc1obj:$(P) $(OBJC_OBJS) $(OBJS) $(LIBDEPS)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(LIBS)
 
-float.h: enquire
+# Copy float.h from its source.
+gfloat.h: $(FLOAT_H)
+       cp $(FLOAT_H) gfloat.h
+
+# Create float.h source for the native machine.
+float.h-nat: enquire
        -./enquire -f > tmp-float.h
-       mv tmp-float.h float.h
+       mv tmp-float.h float.h-nat
+
+# Create a dummy float.h source for a cross-compiler.
+float.h-cross:
+       echo "#error float.h values not known for cross-compiler" > float.h-cross
 
 # Used to compile enquire with standard cc, but have forgotten why.
 # Let's try with GCC.
@@ -541,7 +598,7 @@ libgcc1.conv: libgcc1.a
 
 # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
 # Make an empty file instead.
-libgcc1.null: $(CROSS_TOOLS) $(GCC_PASSES)
+libgcc1.null: $(GCC_PASSES)
        echo "__foo () {}" > dummy.c
        $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
        $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy.o
@@ -564,7 +621,10 @@ libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
 # so that libgcc1.a itself remains nonexistent if compilation is aborted.
 # -e causes any failing command to make this rule fail.
 # -e doesn't work in certain shells, so we test $$? as well.
-       set -e; \
+# lynx has a broken ar, it always complains when the initial library is
+# empty, thus this command works only if we don't do -e
+# There is a trailing backslash (\) deleted from the following line.
+#      set -e;
        for name in $(LIB1FUNCS); \
        do \
          echo $${name}; \
@@ -602,10 +662,7 @@ libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
 # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
 # But recompiling cc1 should not force recompilation of libgcc2.a.
 # If you want to force recompilation, delete libgcc2.a.
-# Depend on install-cross-tools to make sure we set up properly 
-# to run the assembler before we try compiling anything.
-# install-cross-tools does nothing if not cross compiling.
-libgcc2.ready: $(GCC_PASSES) $(CROSS_TOOLS)
+libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS)
        -if [ -f libgcc2.ready ] ; then \
                true; \
        else \
@@ -619,7 +676,10 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
        -rm -f tmplibgcc2.a
 # -e causes any failing command to make this rule fail.
 # -e doesn't work in certain shells, so we test $$? as well.
-       set -e; \
+# lynx has a broken ar, it always complains when the initial library is
+# empty, thus this command works only if we don't do -e
+# There is a trailing backslash (\) deleted from the following line.
+#      set -e;
        for name in $(LIB2FUNCS); \
        do \
          echo $${name}; \
@@ -665,6 +725,11 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2)
        then (cd tmpcopy; $(AR) x ../$(LIBGCC1));       \
        else true;                                      \
        fi
+# Some versions of ar (specifically the one in RISC/os 5.x), create an
+# unwritable table of contents file, and then print an error message when
+# the second ar command tries to overwrite this file.  To avoid the error
+# message from ar, we make sure all files are writable.
+       (cd tmpcopy; chmod +w * > /dev/null 2>&1)
        (cd tmpcopy; $(AR) x ../$(LIBGCC2))
        (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
        rm -rf tmpcopy
@@ -676,7 +741,7 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2)
 objc-runtime: libobjc.a
 
 # Build the Objective C runtime library.
-libobjc.a: cc1obj libgcc2.ready
+libobjc.a: cc1obj libgcc2.ready $(USE_COLLECT2) $(EXTRA_PARTS)
        if [ -d objc ]; then true; else mkdir objc; fi
        thisdir1=`pwd`; \
        srcdir1=`cd $(srcdir); pwd`; \
@@ -724,8 +789,10 @@ c-parse.o : $(srcdir)/c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-parse.h \
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.c
 $(srcdir)/c-parse.c $(srcdir)/c-parse.h: $(srcdir)/c-parse.y
        cd $(srcdir); $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
-$(srcdir)/c-parse.y: $(srcdir)/c-parse.in $(srcdir)/cond.awk
-       cd $(srcdir); awk -f cond.awk objc=0 c-parse.in > c-parse.y
+$(srcdir)/c-parse.y: $(srcdir)/c-parse.in
+       sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
+         -e "/^ifc$$/d" -e "/^end ifc$$/d" \
+         $(srcdir)/c-parse.in > $(srcdir)/c-parse.y
 
 c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
 c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
@@ -735,6 +802,7 @@ c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
 c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
 c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
 c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H)
+c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
 
 # C++ language specific files.
 
@@ -743,7 +811,7 @@ cp-parse.o : $(srcdir)/cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cp-lex.h
   `echo $(srcdir)/cp-parse.c | sed 's,^\./,,'`
 
 $(srcdir)/cp-parse.c $(srcdir)/cp-parse.h : $(srcdir)/cp-parse.y
-       @echo expect 29 shift/reduce conflicts and 14 reduce/reduce conflicts
+       @echo expect 29 shift/reduce conflicts and 13 reduce/reduce conflicts
        cd $(srcdir); $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
        cd $(srcdir); grep '^#define[   ]*YYEMPTY' cp-parse.c >>cp-parse.h
 
@@ -788,18 +856,20 @@ collect2.o : collect2.c $(CONFIG_H) gstab.h
        -DTARGET_MACHINE=\"$(target)\" \
        -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
 
-# Objectionable C language specific files.
+# Objective C language specific files.
 
 objc-parse.o : $(srcdir)/objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
-   c-tree.h input.h flags.h objc-actions.h
+   c-tree.h input.h flags.h objc-act.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/objc-parse.c
 $(srcdir)/objc-parse.c : $(srcdir)/objc-parse.y
        cd $(srcdir); $(BISON) $(BISONFLAGS) objc-parse.y -o objc-parse.c
-$(srcdir)/objc-parse.y: $(srcdir)/c-parse.in $(srcdir)/cond.awk
-       cd $(srcdir); awk -f cond.awk objc=1 c-parse.in > objc-parse.y
+$(srcdir)/objc-parse.y: $(srcdir)/c-parse.in
+       sed -e "/^ifc$$/,/^end ifc$$/d" \
+         -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
+         $(srcdir)/c-parse.in > $(srcdir)/objc-parse.y
 
-objc-actions.o : objc-actions.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \
-   flags.h objc-actions.h
+objc-act.o : objc-act.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h c-lex.h \
+   flags.h objc-act.h input.h function.h $(srcdir)/c-parse.h
 
 # A file used by all variants of C.
 
@@ -807,12 +877,12 @@ c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
 
 # Language-independent files.
 
-gcc.o: gcc.c $(CONFIG_H) gvarargs.h obstack.h
+gcc.o: gcc.c $(CONFIG_H) gvarargs.h config.status
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
-  -DTOOLDIR_BASE_PREFIX=\"$(prefix)/\" \
+  -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
   -DTOOLDIR=\"$(tooldir)/\" \
   $(MAYBE_TARGET_DEFAULT) \
   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
@@ -822,12 +892,14 @@ dumpvers: dumpvers.c
 version.o: version.c
 obstack.o: obstack.c
 
+convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
+
 tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
 print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
 stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
 fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
 toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
-   insn-attr.h xcoffout.h
+   insn-attr.h xcoffout.h defaults.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \
          -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
@@ -844,16 +916,16 @@ function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
    recog.h output.h
 stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h recog.h
-expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h  \
+expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h typeclass.h
 calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
-   insn-flags.h
+   insn-flags.h gvarargs.h 
 expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
 explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
 optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
-   insn-flags.h insn-config.h insn-codes.h expr.h recog.h
+   insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
 dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
    insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
 sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
@@ -863,6 +935,7 @@ dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
 xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
 emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h  \
    regs.h insn-config.h insn-codes.h real.h expr.h
+real.o : real.c $(CONFIG_H) $(TREE_H)
 getpwd.o : getpwd.c $(CONFIG_H)
 
 integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
@@ -882,7 +955,7 @@ flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
    basic-block.h regs.h hard-reg-set.h output.h
 combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h  \
    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
-   basic-block.h recog.h real.h
+   basic-block.h recog.h real.h hard-reg-set.h
 regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
    basic-block.h regs.h insn-config.h recog.h reload.h real.h
 local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
@@ -902,7 +975,7 @@ reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
    flags.h output.h
 sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
    flags.h insn-config.h insn-attr.h
-final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \
+final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h regs.h \
    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
    hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
 recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
@@ -920,7 +993,7 @@ aux-output.o : aux-output.c $(CONFIG_H) \
 # from the GNU Emacs distribution.
 alloca.o:      alloca.c
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
-         -Demacs -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
+         -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
        $(ALLOCA_FINISH)
 \f
 # Generate header and source files from the machine description, 
@@ -940,26 +1013,28 @@ alloca.o:        alloca.c
 # because insn-* is older than stamp-*
 # and thus make -n thinks that insn-* will be updated
 # and force recompilation of things that depend on it.
-# We use move-if-changed precisely to avoid such recompilation.
+# We use move-if-change precisely to avoid such recompilation.
 # But there is no way to teach make -n that it will be avoided.
 
 # Each of the insn-*.[ch] rules has a semicolon at the end,
 # for otherwise the system Make on SunOS 4.1 never tries
-# to recompile insn-*.o.
+# to recompile insn-*.o.  To avoid problems and extra noise from
+# versions of make which don't like empty commands (nothing after the
+# trailing `;'), we call true for each.
 
-insn-config.h: stamp-config ;
+insn-config.h: stamp-config ; @true
 stamp-config : md genconfig $(srcdir)/move-if-change
        ./genconfig md > tmp-config.h
        $(srcdir)/move-if-change tmp-config.h insn-config.h
        touch stamp-config
 
-insn-flags.h: stamp-flags ;
+insn-flags.h: stamp-flags ; @true
 stamp-flags : md genflags $(srcdir)/move-if-change
        ./genflags md > tmp-flags.h
        $(srcdir)/move-if-change tmp-flags.h insn-flags.h
        touch stamp-flags
 
-insn-codes.h: stamp-codes ;
+insn-codes.h: stamp-codes ; @true
 stamp-codes : md gencodes $(srcdir)/move-if-change
        ./gencodes md > tmp-codes.h
        $(srcdir)/move-if-change tmp-codes.h insn-codes.h
@@ -969,7 +1044,7 @@ insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
   insn-config.h insn-flags.h insn-codes.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
 
-insn-emit.c: stamp-emit ;
+insn-emit.c: stamp-emit ; @true
 stamp-emit : md genemit $(srcdir)/move-if-change
        ./genemit md > tmp-emit.c
        $(srcdir)/move-if-change tmp-emit.c insn-emit.c
@@ -979,16 +1054,26 @@ insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
   real.h output.h flags.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
 
-insn-recog.c: stamp-recog ;
+insn-recog.c: stamp-recog ; @true
 stamp-recog : md genrecog $(srcdir)/move-if-change
        ./genrecog md > tmp-recog.c
        $(srcdir)/move-if-change tmp-recog.c insn-recog.c
        touch stamp-recog
 
+insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
+  insn-config.h flags.h rtl.h recog.h expr.h reload.h
+       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
+
+insn-opinit.c: stamp-opinit ; @true
+stamp-opinit : md genopinit $(srcdir)/move-if-change
+       ./genopinit md > tmp-opinit.c
+       $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
+       touch stamp-opinit
+
 insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
 
-insn-extract.c: stamp-extract ;
+insn-extract.c: stamp-extract ; @true
 stamp-extract : md genextract $(srcdir)/move-if-change
        ./genextract md > tmp-extract.c
        $(srcdir)/move-if-change tmp-extract.c insn-extract.c
@@ -997,7 +1082,7 @@ stamp-extract : md genextract $(srcdir)/move-if-change
 insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
 
-insn-peep.c: stamp-peep ;
+insn-peep.c: stamp-peep ; @true
 stamp-peep : md genpeep $(srcdir)/move-if-change
        ./genpeep md > tmp-peep.c
        $(srcdir)/move-if-change tmp-peep.c insn-peep.c
@@ -1007,13 +1092,13 @@ insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
      insn-attr.h insn-config.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
 
-insn-attr.h: stamp-attr ;
+insn-attr.h: stamp-attr ; @true
 stamp-attr : md genattr $(srcdir)/move-if-change
        ./genattr md > tmp-attr.h
        $(srcdir)/move-if-change tmp-attr.h insn-attr.h
        touch stamp-attr
 
-insn-attrtab.c: stamp-attrtab ;
+insn-attrtab.c: stamp-attrtab ; @true
 stamp-attrtab : md genattrtab $(srcdir)/move-if-change
        if cmp -s $(PREMADE_ATTRTAB_MD) md;     \
        then                                    \
@@ -1030,7 +1115,7 @@ insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
     insn-codes.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
 
-insn-output.c: stamp-output ;
+insn-output.c: stamp-output ; @true
 stamp-output : md genoutput $(srcdir)/move-if-change
        ./genoutput md > tmp-output.c
        $(srcdir)/move-if-change tmp-output.c insn-output.c
@@ -1074,6 +1159,13 @@ genemit : genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
 genemit.o : genemit.c $(RTL_H) hconfig.h
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
 
+genopinit : genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
+       $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genopinit \
+        genopinit.o $(HOST_RTL) $(HOST_LIBS)
+
+genopinit.o : genopinit.c $(RTL_H) hconfig.h
+       $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
+
 genrecog : genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
        $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \
         genrecog.o $(HOST_RTL) $(HOST_LIBS)
@@ -1167,29 +1259,32 @@ cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
 $(srcdir)/cexp.c: $(srcdir)/cexp.y
        cd $(srcdir); $(BISON) -o cexp.c cexp.y
-cccp.o: cccp.c $(CONFIG_H) pcp.h version.c
+cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
 # The reason we use $(libdir)/g++-include rather than using libsubdir
 # is for compatibility with the current version of libg++.
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
          -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
-         -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
+         -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
          -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
          -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
          -DTOOLDIR=\"$(tooldir)/\" \
          -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
 
+# Note for the stamp targets, we run the program `true' instead of
+# having an empty command (nothing following the semicolon).
+
 proto: config.status protoize unprotoize SYSCALLS.c.X
 
 protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
          protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
-protoize.o: stamp-proto ;
+protoize.o: stamp-proto ; @true
 
 unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
          unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
-unprotoize.o:  stamp-proto ;
+unprotoize.o:  stamp-proto ; @true
 
 stamp-proto:   $(srcdir)/protoize.c getopt.h $(CONFIG_H)
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
@@ -1197,7 +1292,7 @@ stamp-proto:      $(srcdir)/protoize.c getopt.h $(CONFIG_H)
           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
          -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
-         -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
+         -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
          -DSTD_PROTO_DIR=\"$(libsubdir)\" \
          -DUNPROTOIZE $(srcdir)/protoize.c
        mv protoize.o unprotoize.o
@@ -1206,7 +1301,7 @@ stamp-proto:      $(srcdir)/protoize.c getopt.h $(CONFIG_H)
           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
          -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
-         -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
+         -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
          -DSTD_PROTO_DIR=\"$(libsubdir)\" \
          $(srcdir)/protoize.c
        touch stamp-proto
@@ -1224,6 +1319,7 @@ SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES)
          -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
        -rm -f SYSCALLS.c tmp-SYSCALLS.s
 
+
 test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
        -rm -f tmp-proto.[cso]
        cp $(srcdir)/protoize.c tmp-proto.c
@@ -1249,26 +1345,142 @@ test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
        diff $(srcdir)/protoize.c tmp-proto.c | cat
        -rm -f tmp-proto.[cso]
 \f
+# Build the include directory.  The stamp files are stmp-* rather than
+# stamp-* so that mostlyclean does not force the include directory to
+# be rebuilt.
+
+# Build the include directory except for float.h (which depends upon
+# enquire).
+stmp-int-hdrs: stmp-fixinc $(USER_H) gvarargs.h gstdarg.h gstddef.h \
+  xlimits.h objc-headers
+# Copy in the headers provided with gcc.
+# The sed command gets just the last file name component;
+# this is necessary because VPATH could add a dirname.
+# Using basename would be simpler, but some systems don't have it.
+       objdir=`pwd`; \
+       cd $(srcdir); \
+       for file in $(USER_H); do \
+         realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
+         rm -f $$objdir/include/$$realfile; \
+         cp $$realfile $$objdir/include; \
+         chmod a+r $$objdir/include/$$realfile; \
+       done
+       rm -f include/varargs.h
+       cp $(srcdir)/gvarargs.h include/varargs.h
+       chmod a+r include/varargs.h
+       rm -f include/stdarg.h
+       cp $(srcdir)/gstdarg.h include/stdarg.h
+       chmod a+r include/stdarg.h
+       rm -f include/stddef.h
+       cp $(srcdir)/gstddef.h include/stddef.h
+       chmod a+r include/stddef.h
+       rm -f include/limits.h
+       cp xlimits.h include/limits.h
+       chmod a+r include/limits.h
+# Install the README
+       rm -f include/README
+       cp $(srcdir)/README-fixinc include/README
+       chmod a+r include/README
+       touch stmp-int-hdrs
+
+# Build the complete include directory.
+stmp-headers: stmp-int-hdrs gfloat.h
+       rm -f include/float.h
+       cp gfloat.h include/float.h
+       chmod a+r include/float.h
+       touch stmp-headers
+
+# Build fixed copies of system files.
+stmp-fixinc: $(srcdir)/$(FIXINCLUDES) gsyslimits.h xgcc cpp
+       rm -rf include
+       mkdir include
+       if [ x$(FIXINCLUDES) != xMakefile.in ]; \
+       then \
+         for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
+           if [ -d $$dir ]; \
+           then \
+             $(srcdir)/$(FIXINCLUDES) include $$dir $(srcdir) "`pwd`/xgcc -B`pwd`/"; \
+           else true; fi; \
+         done; \
+       else true; \
+       fi
+       rm -f include/syslimits.h
+       if [ -f include/limits.h ]; then \
+         mv include/limits.h include/syslimits.h; \
+       else \
+         cp $(srcdir)/gsyslimits.h include/syslimits.h; \
+       fi
+       chmod a+r include/syslimits.h
+       touch stmp-fixinc
+
+# copy objc header files into build directory
+objc-headers:
+       if [ -d objc ]; then true; else mkdir objc; fi
+       thisdir1=`pwd`; \
+       srcdir1=`cd $(srcdir); pwd`; \
+       cd objc; \
+       $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
+       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
+       GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
+       GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
+       touch objc-headers
+
+# Files related to the fixproto script.
+
+deduced.h: $(srcdir)/scan-types.sh
+       CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -nostdinc -Iinclude -I${SYSTEM_HEADER_DIR}"; \
+         export CC; \
+         $(srcdir)/scan-types.sh >tmp-deduced.h
+       mv tmp-deduced.h deduced.h
+
+gen-protos: gen-protos.o scan.o
+       ${HOST_CC} -o gen-protos gen-protos.o scan.o
+
+xsys-protos.h: $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
+       cat deduced.h $(srcdir)/sys-protos.h > fixtmp.c
+       $(GCC_FOR_TARGET) fixtmp.c -E \
+         | sed -e 's/  / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
+         | ./gen-protos >xsys-protos.h
+       rm -rf fixtmp.c
+
+scan-decls: scan-decls.o scan.o
+       $(HOST_CC) -o scan-decls scan-decls.o scan.o
+
+patch-header: patch-header.o scan.o xsys-protos.h $(HOST_OBSTACK)
+       $(HOST_CC) -o patch-header patch-header.o scan.o $(HOST_OBSTACK)
+
+patch-header.o: xsys-protos.h
+
+stmp-fixproto: patch-header scan-decls xsys-protos.h
+       CPP="$(GCC_FOR_TARGET) -E"; export CPP; \
+         ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR)
+       touch stmp-fixproto
+\f
 # Remake the info files.
 
-doc: $(srcdir)/cpp.info $(srcdir)/gcc.info
+doc: info
+info: $(srcdir)/cpp.info $(srcdir)/gcc.info
 
 $(srcdir)/cpp.info: cpp.texi
-       $(MAKEINFO) `echo $(srcdir)/cpp.texi | sed 's,^\./,,'`
+       cd $(srcdir); $(MAKEINFO) cpp.texi
 
 #$(srcdir)/gplus.info: gplus.texi
 #      $(MAKEINFO) `echo $(srcdir)/gplus.texi | sed 's,^\./,,'`
 
 $(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
                md.texi rtl.texi tm.texi 
-       $(MAKEINFO) `echo $(srcdir)/gcc.texi | sed 's,^\./,,'`
+       cd $(srcdir); $(MAKEINFO) gcc.texi
+
+dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi
 
 # This works with GNU Make's default rule.
 $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
                md.texi rtl.texi tm.texi 
+       $(TEXI2DVI) $<
 
 # This works with GNU Make's default rule.
 $(srcdir)/cpp.dvi: cpp.texi
+       $(TEXI2DVI) $<
 
 $(srcdir)/INSTALL: install1.texi install.texi
        $(MAKEINFO) -D INSTALLONLY --no-header `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
@@ -1300,7 +1512,7 @@ mostlyclean:
        -rm -f tmplibgcc* tmpcopy xlimits.h
        for name in $(LIB1FUNCS); do rm -f $${name}.c; done
 # Delete other temporary files.
-       -rm -f tmp-float.h tmp-gcc.xtar.Z
+       -rm -f tmp-float.h tmp-gcc.xtar.gz
        -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
 # Delete the stamp files.
        -rm -f stamp-* tmp-*
@@ -1308,8 +1520,11 @@ mostlyclean:
        -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
        -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
 # Delete some files made during installation.
-       -rm -f specs float.h enquire SYSCALLS.c.X SYSCALLS.c
+       -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
        -rm -f collect collect2 ld mips-tfile mips-tdump alloca.s
+# Delete files generated for fixproto
+       -rm -rf patch-header scan-decls xsys-protos.h deduced.h tmp-deduced.h \
+         gen-protos fixproto.list fixtmp.?
 # Delete unwanted output files from TeX.
        -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
 # Delete sorted indices we don't actually use.
@@ -1326,6 +1541,8 @@ clean: mostlyclean
 # but what better way is there?
        -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready libgcc1.null
        -rm -f *.dvi
+# Delete the include directory.
+       -rm -rf stmp-* include objc-headers
 
 # Delete all files that users would normally create
 # while building and installing GCC.
@@ -1333,14 +1550,22 @@ distclean: clean
        -rm -f tm.h aux-output.c config.h md config.status tconfig.h hconfig.h
        -rm -f Makefile *.oaux
        -rm -fr stage1 stage2 stage3 stage4
+       -rm -f cp-parse.output
+       -rm -f objc-parse.output
+       -rm -f c-parse.output
 
 # Delete anything likely to be found in the source directory
 # that shouldn't be in the distribution.
 extraclean: distclean
        -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
        -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
-       -rm -f *.dvi *.oaux *.d *.Z *.tar *.xtar *diff
-       -rm -f *lose config/*lose
+       -rm -f config/*/=* config/*/"#"* config/*/*~*
+       -rm -f config/*/*.orig config/*/*.rej
+       -rm -f objc/=* objc/"#"* objc/*~*
+       -rm -f objc/*.orig objc/*.rej
+       -rm -f *.dvi *.oaux *.d *.[zZ] *.gz
+       -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
+       -rm -f *lose config/*lose config/*/*lose
        -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
 
 # Get rid of every file that's generated from some other file.
@@ -1356,20 +1581,16 @@ realclean: distclean
        -rm -f gplus.info* gplus.??s gplus.*aux
 \f
 # Entry points `install' and `uninstall'.
-# Also temporarily `install-fixincludes' could replace `install-headers'.
 # Also use `install-collect2' to install collect2 when the config files don't.
 
 # The semicolon is to prevent the install.sh -> install default rule
-# from doing anything.
-install: $(INSTALL_TARGET) ;
-
-# Copy the files of native compiler into directories where they will be run.
-install-native: install-common install-libgcc $(INSTALL_HEADERS) \
-   install-man
+# from doing anything.  Having it run true helps avoid problems and
+# noise from versions of make which don't like to have null commands.
+install: $(INSTALL_TARGET) ; @true
 
-# Copy the files of cross compiler into directories where they will be run.
-install-cross: install-common install-common-headers \
-   install-man install-cross-tools install-libgcc
+# Copy the compiler files into directories where they will be run.
+install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
+    install-man install-info
 
 # Do nothing while making gcc with a cross-compiler. The person who
 # makes gcc for the target machine has to know how to put a complete
@@ -1377,53 +1598,6 @@ install-cross: install-common install-common-headers \
 install-build: force
        @echo You have to install gcc on your target machine by hand.
 
-# Install the tools, libraries and header files for the target machine
-# where cross-compilation will look for them.
-# Use tooldir to find them.
-install-cross-tools: install-dir
-# The first if makes this a no-op except for a cross compiler.
-# The /. after the dirname causes test to follow symlinks.
-# Before making a link or an indirection script, 
-# we verify the desired file does not already exist.
-# If a symlink does exist, then making a symlink would certainly fail, 
-# leading us to overwrite the real file through the symlink.
-       -if [ -f gcc-cross ] ; \
-       then \
-         if [ -d $(tooldir)/. ] ; \
-         then \
-           for file in as $(REAL_LD_NAME) ar nm ranlib; do \
-             if [ -f $(libsubdir)/$$file ] ; \
-             then true; \
-             else  \
-               rm -rf $(libsubdir)/$$file; \
-               $(SYMLINK) $(tooldir)/bin/$$file $(libsubdir)/$$file \
-               || (echo "#!/bin/sh"; echo $(tooldir)/bin/$$file "$$@") > $(libsubdir)/$$file; \
-             fi; \
-           done; \
-           for file in $(tooldir)/lib/*; do \
-             if [ -f $$file ] ; \
-             then \
-               if [ -f $(libsubdir)/`basename $$file` ] ; \
-               then true; \
-               else  \
-                 rm -rf $(libsubdir)/`basename $$file`; \
-                 $(SYMLINK) $$file $(libsubdir)/`basename $$file` \
-                 || $(INSTALL_DATA) $$file $(libsubdir)/`basename $$file`; \
-               fi; \
-             else true; \
-             fi; \
-           done; \
-           if [ -d $(tooldir)/include/. ] ; then \
-             rm -rf $(libsubdir)/sys-include; \
-             $(SYMLINK) $(tooldir)/include $(libsubdir)/sys-include \
-             || (if [ -d $(libsubdir)/sys-include ] ; then true ; else mkdir $(libsubdir)/sys-include ; fi; \
-                 (cd $(tooldir)/include; tar cf - .) | (cd $(libsubdir)/sys-include; tar xpf -)); \
-           else true; fi; \
-         else true; \
-         fi; \
-       else true; \
-       fi;
-
 # Run this on the target machine
 # to finish installation of cross compiler.
 install-cross-rest: install-float-h-cross
@@ -1431,10 +1605,9 @@ install-cross-rest: install-float-h-cross
 # Install float.h for cross compiler.
 # Run this on the target machine!
 install-float-h-cross:
-# I don't see what this line is for.
-# If you see what good it does, please tell me.  -- rms.
-       if [ -f enquire ] ; then true; else false; fi
-       -./enquire -f > $(tmpdir)/float.h
+#      if [ -f enquire ] ; then true; else false; fi
+# Note: don't use -.  We should fail right away if enquire was not made.
+       ./enquire -f > $(tmpdir)/float.h
        -rm -f $(libsubdir)/include/float.h
        $(INSTALL_DATA) $(tmpdir)/float.h $(libsubdir)/include/float.h
        -rm -f $(tmpdir)/float.h
@@ -1451,12 +1624,9 @@ install-dir:
        -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
        -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
        -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
-       -if [ -f gcc-cross ] ; \
-       then \
-         if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi ; \
-         if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi ; \
-       else true; \
-       fi
+       -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi
+       -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi
+       -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
 # We don't use mkdir -p to create the parents of mandir,
 # because some systems don't support it.
 # Instead, we use this technique to create the immediate parent of mandir.
@@ -1467,7 +1637,7 @@ install-dir:
 # Install the compiler executables built during cross compilation.
 # Deps on  $(srcdir)/g++ $(srcdir)/c++  would be natural here,
 # but the latter would get confused with the target `c++'.
-install-common: native install-dir xgcc $(EXTRA_PARTS)
+install-common: native install-dir xgcc g++ $(EXTRA_PARTS)
        for file in $(COMPILERS); do \
          if [ -f $$file ] ; then \
            rm -f $(libsubdir)/$$file; \
@@ -1486,20 +1656,28 @@ install-common: native install-dir xgcc $(EXTRA_PARTS)
          rm -f $(libsubdir)/specs; \
          $(INSTALL_DATA) specs $(libsubdir)/specs; \
        fi
-# Install the driver program as gcc-$(target)
+# Install the driver program as $(target)-gcc
 # and also as either gcc (if native) or $(tooldir)/bin/gcc.
        -if [ -f gcc-cross ] ; then \
-         $(INSTALL_PROGRAM) gcc-cross $(bindir)/gcc-$(target); \
+         rm -f $(bindir)/$(target)-gcc; \
+         $(INSTALL_PROGRAM) gcc-cross $(bindir)/$(target)-gcc; \
          if [ -d $(tooldir)/bin/. ] ; then \
            rm -f $(tooldir)/bin/gcc; \
            $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
          else true; fi; \
+         if [ -f cc1plus ] ; then \
+           rm -f $(bindir)/$(target)-g++; \
+           $(INSTALL_PROGRAM) g++-cross $(bindir)/$(target)-g++; \
+           chmod a+x $(bindir)/$(target)-g++; \
+           rm -f $(bindir)/$(target)-c++; \
+           ln $(bindir)/$(target)-g++ $(bindir)/$(target)-c++; \
+         fi ; \
        else \
          rm -f $(bindir)/gcc; \
          $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
-         rm -f $(bindir)/gcc-$(target)-1; \
-         ln $(bindir)/gcc $(bindir)/gcc-$(target)-1; \
-         mv $(bindir)/gcc-$(target)-1 $(bindir)/gcc-$(target); \
+         rm -f $(bindir)/$(target)-gcc-1; \
+         ln $(bindir)/gcc $(bindir)/$(target)-gcc-1; \
+         mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \
        fi
 # Install protoize if it was compiled.
        -if [ -f protoize ]; \
@@ -1513,14 +1691,22 @@ install-common: native install-dir xgcc $(EXTRA_PARTS)
            chmod a-x $(libsubdir)/SYSCALLS.c.X; \
        fi
        -if [ -f cc1plus ] ; then \
-         rm -f $(bindir)/c++ ; \
-         $(INSTALL_PROGRAM) $(srcdir)/c++ $(bindir)/c++ ; \
-         rm -f $(bindir)/g++ ; \
-         $(INSTALL_PROGRAM) $(srcdir)/g++ $(bindir)/g++ ; \
+           rm -f $(bindir)/g++; \
+           $(INSTALL_PROGRAM) g++ $(bindir)/g++; \
+           chmod a+x $(bindir)/g++; \
+           rm -f $(bindir)/c++; \
+           ln $(bindir)/g++ $(bindir)/c++; \
        fi
        -rm -f $(libsubdir)/cpp
        $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
 
+# Install the info files.
+install-info: doc
+       -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
+       cd $(srcdir); for f in cpp.info* gcc.info*; \
+       do $(INSTALL_DATA) $$f $(infodir)/$$f; done
+       -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
+
 # Install the man pages.
 install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 $(srcdir)/g++.1
        -rm -f $(mandir)/gcc$(manext)
@@ -1552,37 +1738,48 @@ install-libobjc: libobjc.a install-dir
          chmod a-x $(libsubdir)/libobjc.a; \
        else true; fi
 
-# Install all the header files for native compiler.
-install-headers: install-common-headers install-float-h install-limits-h
-
-# Install float.h for native compiler.
-install-float-h: float.h install-dir
-       -rm -f $(libsubdir)/include/float.h
-       $(INSTALL_DATA) float.h $(libsubdir)/include/float.h
-       chmod a-x $(libsubdir)/include/float.h
+# Install all the header files built in the include subdirectory.
+install-headers: install-include-dir $(INSTALL_HEADERS_DIR) install-assert-h
+# Fix symlinks to absolute paths in the installed include directory to
+# point to the installed directory, not the build directory.
+       -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
+       if [ $$? -eq 0 ]; then \
+         dir=`cd include; pwd`; \
+         for i in $$files; do \
+           dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
+           if expr "$$dest" : "$$dir.*" > /dev/null; then \
+             rm -f $(libsubdir)/include/$$i; \
+             ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
+           fi; \
+         done; \
+       fi
 
-# Install limits.h.
-install-limits-h: xlimits.h install-dir
-       -rm -f $(libsubdir)/include/limits.h
-       $(INSTALL_DATA) xlimits.h $(libsubdir)/include/limits.h
-       chmod a-x $(libsubdir)/include/limits.h
-
-# Install the fixed headers that are the same for all machines.
-install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h gstddef.h gsyslimits.h assert.h
-       -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
-       -chmod ugo+rx $(libsubdir)/include
-# Must compute $(libsubdir) before the cd; the awk script won't work after.
-       shelllibsubdir=$(libsubdir); \
-       cd $(srcdir); \
-       for file in $(USER_H); do \
-          rm -f $$shelllibsubdir/include/`basename $$file`; \
-          $(INSTALL_DATA) `basename $$file` $$shelllibsubdir/include/`basename $$file`; \
-          chmod a-x $$shelllibsubdir/include/`basename $$file`; \
-       done
-# Put assert.h in /usr/local/include, so it won't override GNU libc's assert.h.
-# Don't replace the assert.h already there if it is not from GCC.
-# This code would be simpler if it tested for -f ... && ! grep ...
-# but supposedly the ! operator is missing in sh on some systems.
+# Create or recreate the gcc private include file directory.
+install-include-dir: install-dir
+       -rm -rf $(libsubdir)/include
+       mkdir $(libsubdir)/include
+       -chmod a+rx $(libsubdir)/include
+
+# Install the include directory using tar.
+install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
+       cd include; \
+        (tar cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
+# /bin/sh on some systems returns the status of the first tar,
+# and that can lose with GNU tar which always writes a full block.
+# So use `exit 0' to ignore its exit status.
+
+# Install the include directory using cpio.
+install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
+       cd include; find . -print | cpio -pdum $(libsubdir)/include
+
+# Put assert.h where it won't override GNU libc's assert.h.
+# It goes in a dir that is searched after GNU libc's headers;
+# thus, the following conditionals are no longer needed.
+# But it's not worth deleting them now.
+## Don't replace the assert.h already there if it is not from GCC.
+## This code would be simpler if it tested for -f ... && ! grep ...
+## but supposedly the ! operator is missing in sh on some systems.
+install-assert-h: assert.h install-dir
        if [ -f $(assertdir)/assert.h ]; \
        then \
          if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
@@ -1597,67 +1794,6 @@ install-common-headers: install-dir $(USER_H) gvarargs.h gstdarg.h gstddef.h gsy
          $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
          chmod a-x $(assertdir)/assert.h; \
        fi
-       -rm -f $(libsubdir)/include/syslimits.h
-       $(INSTALL_DATA) $(srcdir)/gsyslimits.h $(libsubdir)/include/syslimits.h
-       chmod a-x $(libsubdir)/include/syslimits.h
-       -rm -f $(libsubdir)/include/varargs.h
-       $(INSTALL_DATA) $(srcdir)/gvarargs.h $(libsubdir)/include/varargs.h
-       chmod a-x $(libsubdir)/include/varargs.h
-       -rm -f $(libsubdir)/include/stdarg.h
-       $(INSTALL_DATA) $(srcdir)/gstdarg.h $(libsubdir)/include/stdarg.h
-       chmod a-x $(libsubdir)/include/stdarg.h
-       -rm -f $(libsubdir)/include/stddef.h
-       $(INSTALL_DATA) $(srcdir)/gstddef.h $(libsubdir)/include/stddef.h
-       chmod a-x $(libsubdir)/include/stddef.h
-# This is turned off because fixinc.svr4 can now get it directly from srcdir.
-## Copy byteorder.h into the object file directory 
-## so that fixinc.svr4 can get at it if necessary.
-## If the dirs are the same, this won't do anything.
-## Delete file first in case it is read-only
-#      -if [ x`cd $(srcdir);pwd` != x`pwd` ]; then rm -f byteorder.h; else true; fi
-#      -cp $(srcdir)/byteorder.h . > /dev/null 2>&1
-
-# $(libsubdir)/include:
-#      -if [ -d $(libsubdir)/include ] ; then true ; else mkdir $(libsubdir)/include ; fi
-#      -chmod ugo+rx $(libsubdir)/include
-
-# This appears not to work.  It isn't clear how to fix it.
-# $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
-#      LIB=$(libsubdir)/include $(srcdir)/$(FIXINCLUDES)
-#      $(INSTALL_DATA) $(srcdir)/fixincludes-README $@
-#      chmod a-x $@
-
-# Run fixincludes in the proper directory.
-install-fixincludes: install-headers
-       rm -rf $(libsubdir)/tmp
-       mkdir $(libsubdir)/tmp
-# Move aside the headers that come from GCC; delete all else.
-# The sed command gets just the last file name component;
-# this is necessary because VPATH could add a dirname.
-# Using basename would be simpler, but some systems don't have it.
-       cd $(libsubdir)/include; \
-       for file in $(INSTALLED_H); do \
-         realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
-         mv $$realfile ../tmp; \
-       done; \
-       rm -rf *
-# Install fixed copies of system files.
-       for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
-         if [ -d $$dir ]; \
-         then \
-           $(srcdir)/$(FIXINCLUDES) $(libsubdir)/include $$dir $(srcdir); \
-         else true; fi; \
-       done
-       -cd $(libsubdir)/include; \
-       if [ -f limits.h ]; then \
-         rm -f ../tmp/syslimits.h; \
-         cp limits.h ../tmp/syslimits.h; \
-       else true; fi
-# Bring back gcc's header files.
-       cd $(libsubdir)/include; mv ../tmp/* .; rmdir ../tmp
-# Install the README
-       $(INSTALL_DATA) $(srcdir)/README-fixinc $(libsubdir)/include/README
-       chmod a-x $(libsubdir)/include/README
 
 # Use this target to install the program `collect2' under the name `ld'.
 install-collect2: collect2
@@ -1672,6 +1808,7 @@ uninstall:
        -rm -rf $(bindir)/protoize
        -rm -rf $(bindir)/unprotoize
        -rm -rf $(mandir)/gcc$(manext)
+       -rm -rf $(mandir)/g++$(manext)
        -rm -rf $(mandir)/cccp$(manext)
        -rm -rf $(mandir)/protoize$(manext)
        -rm -rf $(mandir)/unprotoize$(manext)
@@ -1688,22 +1825,23 @@ TAGS: force
        rmdir temp
 
 # Create the distribution tar file.
-#dist: gcc-$(version).tar.Z
-dist: gcc.xtar.Z
+#dist: gcc-$(version).tar.gz
+dist: gcc.xtar.gz
 
-gcc.xtar.Z: gcc.xtar
-       compress < gcc.xtar > tmp-gcc.xtar.Z
-       mv tmp-gcc.xtar.Z gcc.xtar.Z
+gcc.xtar.gz: gcc.xtar
+       gzip < gcc.xtar > tmp-gcc.xtar.gz
+       mv tmp-gcc.xtar.gz gcc.xtar.gz
 
-#gcc-$(version).tar.Z: gcc-$(version).tar
-#      compress < gcc-$(version).tar > gcc-$(version).tar.Z
+#gcc-$(version).tar.gz: gcc-$(version).tar
+#      gzip < gcc-$(version).tar > gcc-$(version).tar.gz
 
 #gcc-$(version).tar:
 gcc.xtar: distdir
 # Make the distribution.
        tar chf gcc.xtar gcc-$(version)
 
-distdir: doc $(srcdir)/INSTALL c-parse.y objc-parse.y
+distdir: doc $(srcdir)/INSTALL c-parse.y objc-parse.y cp-parse.y \
+  c-parse.c cp-parse.c objc-parse.c cexp.c
        if grep -s "for version ${version}" gcc.texi; \
        then true; \
        else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
@@ -1725,7 +1863,18 @@ distdir: doc $(srcdir)/INSTALL c-parse.y objc-parse.y
        done
        cd config; \
        for file in *[0-9a-zA-Z+]; do \
-         ln $$file ../tmp/config >/dev/null 2>&1 || cp $$file ../tmp/config; \
+         if test -d $$file && test "$$file" != RCS; then \
+           mkdir ../tmp/config/$$file; \
+           cd $$file; \
+           for subfile in *[0-9a-zA-Z+]; do \
+             ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
+             || cp $$subfile ../../tmp/config/$$file; \
+           done; \
+           cd ..; \
+         else \
+           ln $$file ../tmp/config >/dev/null 2>&1 \
+           || cp $$file ../tmp/config; \
+         fi; \
        done
        cd objc; \
        for file in *[0-9a-zA-Z+]; do \
@@ -1781,9 +1930,10 @@ bootstrap3: force
 # Compare the object files in the current directory with those in the
 # stage2 directory.
 
+# ./ avoids bug in some versions of tail.
 compare: force
        for file in *.o; do \
-         tail +16c $$file > tmp-foo1; \
+         tail +16c ./$$file > tmp-foo1; \
          tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
            && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
        done
@@ -1832,28 +1982,28 @@ stage4: force
 # that is pretty sure to work, and you are short of disk space.
 risky-stage1: force
        -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
-       -mv cc1 cpp cccp gcc stage1
+       -mv $(GCC_PARTS) stage1
        -rm -f stage1/libgcc.a
        -cp libgcc.a stage1 && $(RANLIB) stage1/libgcc.a
        -make clean
 
 risky-stage2: force
        -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
-       -mv cc1 cpp cccp gcc stage2
+       -mv $(GCC_PARTS) stage2
        -rm -f stage2/libgcc.a
        -cp libgcc.a stage2 && $(RANLIB) stage2/libgcc.a
        -make clean
 
 risky-stage3: force
        -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
-       -mv cc1 cpp cccp gcc stage3
+       -mv $(GCC_PARTS) stage3
        -rm -f stage3/libgcc.a
        -cp libgcc.a stage3 && $(RANLIB) stage3/libgcc.a
        -make clean
 
 risky-stage4: force
        -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
-       -mv cc1 cpp cccp gcc stage4
+       -mv $(GCC_PARTS) stage4
        -rm -f stage4/libgcc.a
        -cp libgcc.a stage4 && $(RANLIB) stage4/libgcc.a
        -make clean