OSDN Git Service

Use CROSS_LIBGCC1 for a cross-compiler
[pf3gnuchains/gcc-fork.git] / gcc / Makefile.in
index 11b6b0f..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 
@@ -120,6 +121,9 @@ RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
 # 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.
@@ -137,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'
@@ -145,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
 
@@ -166,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
 
@@ -178,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.
@@ -222,10 +251,18 @@ LIBCONVERT =
 # Control whether header files are installed.
 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=
 
@@ -235,7 +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)
+GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
 
 # Directory to link to, when using the target `maketest'.
 DIR = ../gcc
@@ -347,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-act.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 \
@@ -365,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
@@ -381,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.
@@ -404,13 +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)
+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.
@@ -433,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 stmp-headers 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 stmp-headers $(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)
@@ -449,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
@@ -466,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
@@ -489,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)
 
@@ -505,12 +555,13 @@ cc1obj:$(P) $(OBJC_OBJS) $(OBJS) $(LIBDEPS)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(LIBS)
 
 # Copy float.h from its source.
-float.h: $(FLOAT_H)
-       cp $(FLOAT_H) float.h
+gfloat.h: $(FLOAT_H)
+       cp $(FLOAT_H) gfloat.h
 
 # Create float.h source for the native machine.
 float.h-nat: enquire
-       -./enquire -f > float.h-nat
+       -./enquire -f > tmp-float.h
+       mv tmp-float.h float.h-nat
 
 # Create a dummy float.h source for a cross-compiler.
 float.h-cross:
@@ -570,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}; \
@@ -608,7 +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.
-libgcc2.ready: $(GCC_PASSES)
+libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS)
        -if [ -f libgcc2.ready ] ; then \
                true; \
        else \
@@ -622,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}; \
@@ -668,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
@@ -679,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`; \
@@ -727,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
@@ -738,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.
 
@@ -746,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
 
@@ -791,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-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-act.o : objc-act.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h \
-   flags.h objc-act.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.
 
@@ -810,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,^\./,,'`
@@ -825,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,^\./,,'`
@@ -847,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 \
@@ -866,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 \
@@ -885,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 \
@@ -905,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)  \
@@ -923,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, 
@@ -943,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
@@ -972,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
@@ -982,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
@@ -1000,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
@@ -1010,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                                    \
@@ -1033,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
@@ -1077,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)
@@ -1170,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) \
@@ -1200,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
@@ -1209,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
@@ -1227,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
@@ -1256,7 +1349,10 @@ test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
 # stamp-* so that mostlyclean does not force the include directory to
 # be rebuilt.
 
-stmp-headers: stmp-fixincludes $(USER_H) gvarargs.h gstdarg.h gstddef.h gsyslimits.h xlimits.h float.h
+# 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.
@@ -1269,13 +1365,6 @@ stmp-headers: stmp-fixincludes $(USER_H) gvarargs.h gstdarg.h gstddef.h gsyslimi
          cp $$realfile $$objdir/include; \
          chmod a+r $$objdir/include/$$realfile; \
        done
-       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
        rm -f include/varargs.h
        cp $(srcdir)/gvarargs.h include/varargs.h
        chmod a+r include/varargs.h
@@ -1288,47 +1377,110 @@ stmp-headers: stmp-fixincludes $(USER_H) gvarargs.h gstdarg.h gstddef.h gsyslimi
        rm -f include/limits.h
        cp xlimits.h include/limits.h
        chmod a+r include/limits.h
-       rm -f include/float.h
-       cp float.h include/float.h
-       chmod a+r include/float.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-fixincludes: $(srcdir)/$(FIXINCLUDES)
+stmp-fixinc: $(srcdir)/$(FIXINCLUDES) gsyslimits.h xgcc cpp
        rm -rf include
        mkdir include
-       for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
-         if [ -d $$dir ]; \
-         then \
-           $(srcdir)/$(FIXINCLUDES) include $$dir $(srcdir); \
-         else true; fi; \
-       done
-       touch stmp-fixincludes
+       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,^\./,,'`
@@ -1360,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-*
@@ -1368,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.
@@ -1387,7 +1542,7 @@ clean: mostlyclean
        -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready libgcc1.null
        -rm -f *.dvi
 # Delete the include directory.
-       -rm -rf stmp-* include
+       -rm -rf stmp-* include objc-headers
 
 # Delete all files that users would normally create
 # while building and installing GCC.
@@ -1395,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.
@@ -1421,11 +1584,13 @@ realclean: distclean
 # 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) ;
+# 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 compiler files into directories where they will be run.
-install-normal: install-common install-libgcc $(INSTALL_HEADERS) install-man
+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
@@ -1440,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
@@ -1460,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.
@@ -1476,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; \
@@ -1495,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 ]; \
@@ -1522,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)
@@ -1572,29 +1749,36 @@ install-headers: install-include-dir $(INSTALL_HEADERS_DIR) install-assert-h
            dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
            if expr "$$dest" : "$$dir.*" > /dev/null; then \
              rm -f $(libsubdir)/include/$$i; \
-             ln -s $(libsubdir)/include`echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
+             ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
            fi; \
          done; \
        fi
 
 # Create or recreate the gcc private include file directory.
-install-include-dir:
+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 install-include-dir
-       ( cd include; tar cf - . ) | (cd $(libsubdir)/include; tar xpBf - )
+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 install-include-dir
-       ( cd include; find . -print | cpio -pdum $(libsubdir)/include )
-
-# 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.
+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 \
@@ -1624,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)
@@ -1640,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;\
@@ -1677,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 \
@@ -1733,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