OSDN Git Service

Oops - fixed typos in previous delta
[pf3gnuchains/gcc-fork.git] / gcc / Makefile.in
index 9875026..9ad9106 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile for GNU C compiler.
-#   Copyright (C) 1987, 88, 90-97, 1998 Free Software Foundation, Inc.
+#   Copyright (C) 1987, 88, 90-98, 1999 Free Software Foundation, Inc.
 
 #This file is part of GNU CC.
 
@@ -39,7 +39,8 @@ SUBDIRS =@subdirs@
 
 # Selection of languages to be made.
 # This is overridden by configure.
-LANGUAGES = c proto gcov$(exeext) @all_languages@
+CONFIG_LANGUAGES = @all_languages@
+LANGUAGES = c proto gcov$(exeext) $(CONFIG_LANGUAGES)
 
 # Selection of languages to be made during stage1 build.
 # This is overridden by configure.
@@ -72,6 +73,7 @@ T_CFLAGS =
 X_CPPFLAGS =
 T_CPPFLAGS =
 
+AWK = @AWK@
 CC = @CC@
 # srcdir might be a relative pathname which won't be valid in a subdirectory,
 # so we must use objdir/srcdir instead to make it safe.  objdir is always
@@ -97,7 +99,9 @@ LN_S=@LN_S@
 # These permit overriding just for certain files.
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
-MAKEINFO = makeinfo
+MAKEINFO = `if [ -f $(objdir)/../texinfo/makeinfo/Makefile ] ; \
+       then echo $(objdir)/../texinfo/makeinfo/makeinfo ; \
+       else echo makeinfo ; fi`
 MAKEINFOFLAGS =
 TEXI2DVI = texi2dvi
 # For GNUmake: let us decide what gets passed to recursive makes.
@@ -112,7 +116,10 @@ P =
 # How to invoke ranlib.
 RANLIB = ranlib
 # Test to use to see whether ranlib exists on the system.
-RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
+RANLIB_TEST = \
+  [ -f $(RANLIB) ] \
+  || ( [ "$(host_canonical)" = "$(target)" ] \
+       && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
 
 # Compiler to use for compiling libgcc1.a.
 # OLDCC should not be the GNU C compiler,
@@ -145,7 +152,7 @@ USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
     $(srcdir)/ginclude/va-m32r.h $(srcdir)/ginclude/va-sh.h \
     $(srcdir)/ginclude/va-v850.h $(srcdir)/ginclude/va-arc.h \
     $(srcdir)/ginclude/iso646.h $(srcdir)/ginclude/va-ppc.h \
-    $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS) \
+    $(srcdir)/ginclude/va-c4x.h $(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS) \
     $(srcdir)/ginclude/proto.h $(srcdir)/ginclude/stdbool.h
 
 # Target to use whe installing assert.h.  Some systems may
@@ -188,7 +195,7 @@ AR_FOR_TARGET = ` \
        t='$(program_transform_name)'; echo ar | sed -e $$t ; \
     fi; \
   fi`
-AR_FOR_TARGET_FLAGS = rc
+AR_FLAGS_FOR_TARGET = rc
 RANLIB_FOR_TARGET = ` \
   if [ -f $(objdir)/../binutils/ranlib ] ; then \
     echo $(objdir)/../binutils/ranlib ; \
@@ -204,18 +211,6 @@ RANLIB_TEST_FOR_TARGET = \
   || ( [ "$(host_canonical)" = "$(target)" ] \
        && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
 
-# We always act like a cross-compiler, even when we're
-# compiling native.  This is because we want to use our own tools if
-# we can.  We don't just set RANLIB to a complicated expression,
-# because the top level Makefile.in might override RANLIB_FOR_TARGET.
-# These are from the FSF file "cross-make".
-AR = $(AR_FOR_TARGET)
-AR_FLAGS = $(AR_FOR_TARGET_FLAGS)
-OLDAR = $(AR_FOR_TARGET)
-OLDAR_FLAGS = $(AR_FOR_TARGET_FLAGS)
-RANLIB = $(RANLIB_FOR_TARGET)
-RANLIB_TEST = $(RANLIB_TEST_FOR_TARGET)
-  
 # Dir to search for system headers.  Overridden by cross-make.
 SYSTEM_HEADER_DIR = /usr/include
 
@@ -247,6 +242,7 @@ lang_options_files=@lang_options_files@
 lang_tree_files=@lang_tree_files@
 GCC_THREAD_FILE=@thread_file@
 OBJC_BOEHM_GC=@objc_boehm_gc@
+JAVAGC=@JAVAGC@
 GTHREAD_FLAGS=@gthread_flags@
 # Be prepared for gcc2 merges.
 gcc_version=@gcc_version@
@@ -270,17 +266,28 @@ bindir = @bindir@
 libdir = @libdir@
 # Directory in which the compiler finds executables, libraries, etc.
 libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
-# Used to produce a relative $(tooldir) in gcc.o
+# Used to produce a relative $(gcc_tooldir) in gcc.o
 unlibsubdir = ../../..
+# Directory in which to find other cross-compilation tools and headers.
+dollar = @dollar@
+# Used in install-cross.
+gcc_tooldir = @gcc_tooldir@
+# Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
+build_tooldir = $(exec_prefix)/$(target_alias)
 # Directory in which the compiler finds g++ includes.
-gxx_include_dir= @gxx_include_dir@
+gcc_gxx_include_dir= @gcc_gxx_include_dir@
 # Directory to search for site-specific includes.
 includedir = $(local_prefix)/include
 # assertdir is overridden in cross-make.
 # (But this currently agrees with what is in cross-make.)
-assertdir = $(tooldir)/include
+assertdir = $(gcc_tooldir)/include
 # where the info files go
 infodir = @infodir@
+# Where cpp should go besides $prefix/bin if necessary
+cpp_install_dir = @cpp_install_dir@
+# where the locale files go
+datadir = $(prefix)/@DATADIRNAME@
+localedir = $(datadir)/locale
 # Extension (if any) to put in installed man-page filename.
 manext = .1
 objext = .o
@@ -288,15 +295,24 @@ exeext = @host_exeext@
 build_exeext = @build_exeext@
 
 # Directory in which to put man pages.
-mandir = @mandir@/man1
-# Directory in which to find other cross-compilation tools and headers.
-# Used in install-cross.
-tooldir = $(libsubdir)/$(unlibsubdir)/../$(target_alias)
-# Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
-build_tooldir = $(exec_prefix)/$(target_alias)
+mandir = @mandir@
+man1dir = $(mandir)/man1
 # Dir for temp files.
 tmpdir = /tmp
 
+# Top build directory, relative to here.
+top_builddir = .
+
+# Whether we were configured with NLS.
+USE_NLS = @USE_NLS@
+
+# Internationalization library.
+INTLLIBS = @INTLLIBS@
+
+# List of internationalization subdirectories.
+POSUB = @POSUB@
+INTL_SUBDIRS = intl $(POSUB)
+
 # Additional system libraries to link with.
 CLIB=
 
@@ -386,13 +402,13 @@ LIB1FUNCS_EXTRA =
 # Assembler files should have names ending in `.asm'.
 LIB2FUNCS_EXTRA = 
 
-# Default float.h source to use for cross-compiler.
-# This is overridden by configure.
-CROSS_FLOAT_H=$(srcdir)/config/float-@float_format@.h
+# Handle cpp installation.
+INSTALL_CPP=
+UNINSTALL_CPP=
 
 # We do not try to build float.h anymore.  Let configure select the
 # appropriate pre-built float.h file for the target.
-FLOAT_H=$(srcdir)/config/float-@float_format@.h
+FLOAT_H=@float_h_file@
 
 # Program to convert libraries.
 LIBCONVERT = 
@@ -446,6 +462,7 @@ HOST_PREFIX_1=loser-
 HOST_CC=$(CC)
 HOST_CFLAGS=$(ALL_CFLAGS)
 HOST_CLIB=$(CLIB)
+HOST_INTLLIBS=$(INTLLIBS)
 HOST_LDFLAGS=$(LDFLAGS)
 HOST_CPPFLAGS=$(ALL_CPPFLAGS)
 HOST_ALLOCA=$(ALLOCA)
@@ -458,6 +475,7 @@ HOST_DOPRINT=$(DOPRINT)
 GCC_INSTALL_NAME = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
 PROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo protoize | sed -e $$t`
 UNPROTOIZE_INSTALL_NAME = `t='$(program_transform_name)'; echo unprotoize | sed -e $$t`
+GCOV_INSTALL_NAME = `t='$(program_transform_name)'; echo gcov | sed -e $$t`
 
 # Actual name to use when installing a cross-compiler.
 GCC_CROSS_NAME = `t='$(program_transform_cross_name)'; echo gcc | sed -e $$t`
@@ -522,11 +540,13 @@ all: all.indirect
 all.indirect: $(ALL)
 
 # IN_GCC tells various files that system.h, toplev.c, etc are available.
-INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@
+INTERNAL_CFLAGS = $(CROSS) -DIN_GCC $(SCHED_CFLAGS) @extra_c_flags@
 
 # This is the variable actually used when we compile.
+# If you change this line, you probably also need to change the definition
+# of HOST_CFLAGS in build-make to match.
 ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) \
-       @DEFS@ $(SCHED_CFLAGS)
+       @DEFS@
 
 # Likewise.
 ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
@@ -542,22 +562,22 @@ USE_HOST_DOPRINT= ` case "${HOST_DOPRINT}" in ?*) echo ${HOST_PREFIX}${HOST_DOPR
 # Dependency on obstack, alloca, malloc or whatever library facilities
 # are not installed in the system libraries.
 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
-LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT)
+LIBDEPS= $(INTLLIBS) $(OBSTACK) $(ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT)
 
 # Likewise, for use in the tools that must run on this machine
 # even if we are cross-building GCC.
 # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
-HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC) $(HOST_PREFIX)$(HOST_VFPRINTF) $(HOST_PREFIX)$(HOST_DOPRINT)
+HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_INTLLIBS) $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC) $(HOST_PREFIX)$(HOST_VFPRINTF) $(HOST_PREFIX)$(HOST_DOPRINT)
 
 # How to link with both our special library facilities
 # and the system's installed libraries.
-LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(VFPRINTF) $(DOPRINT) $(CLIB) \
-       ../libiberty/libiberty.a
+LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(INTLLIBS) @LIBS@ $(VFPRINTF) $(DOPRINT) $(CLIB) ../libiberty/libiberty.a
 
 # Likewise, for use in the tools that must run on this machine
 # even if we are cross-building GCC.
 HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC)  \
-           $(USE_HOST_VFPRINTF) $(USE_HOST_DOPRINT) $(HOST_CLIB)
+           $(HOST_INTLLIBS) $(USE_HOST_VFPRINTF) $(USE_HOST_DOPRINT) \
+           $(HOST_CLIB)
 
 HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o
 HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
@@ -593,7 +613,7 @@ LANG_EXTRA_HEADERS = @all_headers@
 # subdirectories.
 # ??? The choices here will need some experimenting with.
 FLAGS_TO_PASS = \
-       "AR_FLAGS=$(AR_FOR_TARGET_FLAGS)" \
+       "AR_FLAGS_FOR_TARGET=$(AR_FLAGS_FOR_TARGET)" \
        "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
        "BISON=$(BISON)" \
        "BISONFLAGS=$(BISONFLAGS)" \
@@ -618,10 +638,23 @@ FLAGS_TO_PASS = \
        "exec_prefix=$(exec_prefix)" \
        "prefix=$(prefix)" \
        "local_prefix=$(local_prefix)" \
-       "gxx_include_dir=$(gxx_include_dir)" \
+       "gxx_include_dir=$(gcc_gxx_include_dir)" \
        "tooldir=$(tooldir)" \
+       "gcc_tooldir=$(gcc_tooldir)" \
        "bindir=$(bindir)" \
-       "libsubdir=$(libsubdir)"
+       "libsubdir=$(libsubdir)" \
+       "datadir=$(datadir)" \
+       "distdir=../tmp/\$$(subdir)" \
+       "localedir=$(localedir)"
+
+PREPEND_DOTDOT_TO_RELATIVE_PATHS = sed \
+       -e 's|^ *[^ /][^ /]*/|%&|' \
+       -e 's| -B| -B%|g' \
+       -e 's|% *[^- /]|%&|g' \
+       -e 's|%% *|../|g' \
+       -e 's|%||g'
+SUBDIR_FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) \
+  "CC=`echo @cc_set_by_configure@ | $(PREPEND_DOTDOT_TO_RELATIVE_PATHS)`"
 #\f
 # Lists of files for various purposes.
 
@@ -638,14 +671,14 @@ SCHED_CFLAGS = @sched_cflags@
 # Language-independent object files.
 OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o \
varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o real.o regmove.o \
- dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o \
intl.o varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o genrtl.o real.o \
+ dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o gcse.o \
  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o varray.o \
- regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o gcse.o \
+ regclass.o regmove.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  insn-peep.o reorg.o $(SCHED_PREFIX)sched.o final.o recog.o reg-stack.o \
  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  profile.o insn-attrtab.o $(out_object_file) getpwd.o $(EXTRA_OBJS) convert.o \
- mbchar.o dyn-string.o
+ mbchar.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o
 
 # GEN files are listed separately, so they can be built before doing parallel
 #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
@@ -658,7 +691,7 @@ CCCP=@cpp_main@
 # Files to be copied away after each stage in building.
 STAGESTUFF = *$(objext) 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-opinit.c genrtl.c genrtl.h tree-check.h \
+ insn-attr.h insn-attrtab.c insn-opinit.c tree-check.h \
  s-flags s-config s-codes s-mlib s-under\
  s-output s-recog s-emit s-extract s-peep s-check \
  s-attr s-attrtab s-opinit s-crt s-crtS s-crt0 \
@@ -675,7 +708,7 @@ STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
  gcov$(exeext) *.bp \
  *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
  *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.gcse \
- *.[si] \
+ *.[si] libcpp.a \
  $(LANG_STAGESTUFF)
 
 # Members of libgcc1.a.
@@ -718,14 +751,14 @@ DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
 # If it is, rm *.o is an easy way to do it.
 # CONFIG_H = $(host_xm_file) $(tm_file)
 CONFIG_H =
-RTL_BASE_H = rtl.h rtl.def gansidecl.h machmode.h machmode.def
+RTL_BASE_H = rtl.h rtl.def machmode.h machmode.def
 RTL_H = $(RTL_BASE_H) genrtl.h
-TREE_H = tree.h real.h tree.def gansidecl.h machmode.h machmode.def tree-check.h
-BASIC_BLOCK_H = basic-block.h bitmap.h
-DEMANGLE_H = demangle.h gansidecl.h
-RECOG_H = recog.h gansidecl.h
+TREE_H = tree.h real.h tree.def machmode.h machmode.def tree-check.h
+BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h
+DEMANGLE_H = $(srcdir)/../include/demangle.h
+RECOG_H = recog.h
 EXPR_H = expr.h insn-codes.h
-REGS_H = regs.h varray.h machmode.h machmode.def gansidecl.h
+REGS_H = regs.h varray.h machmode.h machmode.def
 #\f
 # Language makefile fragments.
 
@@ -761,7 +794,7 @@ Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \
        $(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \
                "$(xmake_file)" "$(tmake_file)"
        cp config.status config.run
-       $(SHELL) config.run
+       LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.run
        rm -f config.run
 
 $(srcdir)/configure: $(srcdir)/configure.in
@@ -783,7 +816,7 @@ $(srcdir)/cstamp-h.in: $(srcdir)/configure.in $(srcdir)/acconfig.h
        echo timestamp > $(srcdir)/cstamp-h.in
 auto-host.h: cstamp-h ; @true
 cstamp-h: config.in config.status
-       CONFIG_HEADERS=auto-host.h:config.in $(SHELL) config.status
+       CONFIG_HEADERS=auto-host.h:config.in LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status
 
 # Really, really stupid make features, such as SUN's KEEP_STATE, may force
 # a target to build even if it is up-to-date.  So we must verify that
@@ -793,15 +826,15 @@ config.status: configure version.c
          echo You must configure gcc.  Look at the INSTALL file for details.; \
          false; \
        else \
-         $(SHELL) config.status --recheck; \
+         LANGUAGES="$(CONFIG_LANGUAGES)" $(SHELL) config.status --recheck; \
        fi
 
-all.internal: start.encap rest.encap
+all.internal: start.encap rest.encap doc
 # This is what to compile if making a cross-compiler.
 # Note that we can compile enquire using the cross-compiler just built,
 # although we can't run it on this machine.
 all.cross: native gcc-cross specs stmp-headers $(STMP_FIXPROTO) $(LIBGCC) \
-       $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross
+       $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross doc
 # This is what to compile if making gcc with a cross-compiler.
 all.build: native xgcc$(exeext) $(EXTRA_PARTS) lang.all.build
 # This is what must be made before installing GCC and converting libraries.
@@ -810,7 +843,7 @@ start.encap: native xgcc$(exeext) specs $(LIBGCC1) xlimits.h lang.start.encap
 rest.encap: stmp-headers $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
 # This is what is made with the host's compiler
 # whether making a cross compiler or not.
-native: config.status auto-host.h cpp$(exeext) $(LANGUAGES) \
+native: config.status auto-host.h cpp$(exeext) intl.all $(LANGUAGES) \
        $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
 
 # Define the names for selecting languages in LANGUAGES.
@@ -822,7 +855,7 @@ PROTO: proto
 
 # 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) gfloat.h specs
+rest.cross: $(LIBGCC) specs
 
 # Verify that it works to compile and link libgcc1-test.
 # If it does, then there are sufficient replacements for libgcc1.a.
@@ -845,10 +878,10 @@ stamp-objlist: $(OBJS)
 # We call this executable `xgcc' rather than `gcc'
 # to avoid confusion if the current directory is in the path
 # and CC is `gcc'.  It is renamed to `gcc' when it is installed.
-xgcc$(exeext): gcc.o version.o choose-temp.o pexecute.o prefix.o version.o \
-   mkstemp.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
+xgcc$(exeext): gcc.o version.o intl.o prefix.o \
+   version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
        $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o prefix.o version.o \
-         choose-temp.o pexecute.o mkstemp.o $(EXTRA_GCC_OBJS) $(LIBS)
+         $(EXTRA_GCC_OBJS) $(LIBS)
 
 # Dump a specs file to make -B./ read these specs over installed ones.
 specs: xgcc$(exeext)
@@ -861,13 +894,8 @@ specs: xgcc$(exeext)
 gcc-cross: xgcc$(exeext)
        cp xgcc$(exeext) gcc-cross$(exeext)
 
-cc1$(exeext): $(P) $(C_OBJS) $(OBJS) $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(OBJS) $(LIBS)
-
-# Copy float.h from its source.
-gfloat.h: $(FLOAT_H)
-       -rm -f gfloat.h
-       cp $(FLOAT_H) gfloat.h
+cc1$(exeext): $(P) $(OBJS) $(C_OBJS) $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(C_OBJS) $(LIBS)
 
 # Build the version of limits.h that we will install.
 xlimits.h: glimits.h limitx.h limity.h
@@ -894,7 +922,7 @@ libgcc1.conv: libgcc1.a
 libgcc1.null: $(GCC_PASSES)
        echo "void __foo () {}" > dummy.c
        $(GCC_FOR_TARGET) $(GCC_CFLAGS) -c dummy.c
-       $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy$(objext)
+       $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) libgcc1.null dummy$(objext)
        rm -f dummy$(objext) dummy.c
 
 # This is $(LIBGCC1) for a cross-compiler.
@@ -954,7 +982,9 @@ libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
          else true; \
          fi; \
        done
-       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc1.a; else true; fi
+       -if $(RANLIB_TEST_FOR_TARGET) ; then \
+         $(RANLIB_FOR_TARGET) tmplibgcc1.a; \
+       else true; fi
        mv tmplibgcc1.a libgcc1.a
 
 # Build libgcc1.a from assembler source.  LIB1ASMFUNCS is the list of
@@ -977,7 +1007,7 @@ libgcc1-asm.a: libgcc2.ready config.status $(srcdir)/config/$(LIB1ASMSRC)
          $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} libgcc1.S; \
          if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
          mv libgcc1$(objext) $${name}$(objext); \
-         $(AR) $(AR_FLAGS) tmplibgcc1.a $${name}$(objext); \
+         $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc1.a $${name}$(objext); \
          rm -f $${name}$(objext); \
        done
        -rm -f libgcc1.S
@@ -1012,7 +1042,7 @@ libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs $(STMP_FIXPROTO)
 
 LIB2ADD = $(srcdir)/frame.c $(LIB2FUNCS_EXTRA) $(LANG_LIB2FUNCS)
 libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
-   machmode.h longlong.h frame.h gansidecl.h gbl-ctors.h config.status
+   machmode.h longlong.h frame.h gbl-ctors.h config.status
 # Actually build it in tmplibgcc2.a, then rename at end,
 # so that libgcc2.a itself remains nonexistent if compilation is aborted.
        -rm -f tmplibgcc2.a
@@ -1028,7 +1058,7 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
          $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
              $(srcdir)/libgcc2.c -o $${name}$(objext); \
          if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-         $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
+         $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \
          rm -f $${name}$(objext); \
        done
        for name in $(LIB2FUNCS_EH); \
@@ -1037,7 +1067,7 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
          $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -fexceptions $(INCLUDES) -c \
              -DL$${name} $(srcdir)/libgcc2.c -o $${name}$(objext); \
          if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-         $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
+         $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \
          rm -f $${name}$(objext); \
        done
        if [ x$(FPBIT) != x ]; then \
@@ -1047,7 +1077,7 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
            $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
                -DFINE_GRAINED_LIBRARIES $(FPBIT) -o $${name}$(objext); \
            if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-           $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
+           $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \
            rm -f $${name}$(objext); \
          done; \
        else true; fi;
@@ -1058,7 +1088,7 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
            $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
                -DFINE_GRAINED_LIBRARIES $(DPBIT) -o $${name}$(objext); \
            if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-           $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}$(objext); \
+           $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${name}$(objext); \
            rm -f $${name}$(objext); \
          done; \
        else true; fi;
@@ -1074,13 +1104,14 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
          if [ $${name}.txt = $${file} ]; then \
            for f in .. `cat $${file}`; do if [ x$${f} != x.. ]; then \
              $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
-               AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" \
+               AR_FOR_TARGET="$(AR_FOR_TARGET)" \
+               AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" CC="$(CC)" \
                CFLAGS="$(CFLAGS)" HOST_PREFIX="$(HOST_PREFIX)" \
                HOST_PREFIX_1="$(HOST_PREFIX_1)" \
                LANGUAGES="$(LANGUAGES)" \
                LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $${f}; \
              if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-             $(AR) $(AR_FLAGS) tmplibgcc2.a $${f}; \
+             $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${f}; \
              rm -f $${f}; \
            else true; \
            fi; done; \
@@ -1091,7 +1122,7 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
            else true; fi; \
            $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
            if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
-           $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
+           $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${oname}$(objext); \
            rm -f $${name}.s $${oname}$(objext); \
          fi; \
        done
@@ -1099,7 +1130,9 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(FPBIT) $(DPBIT) $(LIB2ADD) \
 # These lines were deleted from above the mv command
 # because ranlibing libgcc.a itself should suffice.
 #      -if [ x${HPUX_GAS} = x ] ; then \
-#        if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi; \
+#        if $(RANLIB_TEST_FOR_TARGET) ; then \
+#          $(RANLIB_FOR_TARGET) tmplibgcc2.a;
+#        else true; fi; \
 #      else true; fi
 
 # Combine the various libraries into a single library, libgcc.a.
@@ -1107,7 +1140,7 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2)
        -rm -rf tmplibgcc.a libgcc.a tmpcopy
        mkdir tmpcopy
        -if [ x$(LIBGCC1) != x ];                       \
-       then (cd tmpcopy; $(AR) x ../$(LIBGCC1));       \
+       then (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC1));    \
        else true;                                      \
        fi
 # Some versions of ar (specifically the one in RISC/os 5.x), create an
@@ -1115,10 +1148,12 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2)
 # 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 *$(objext))
+       (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC2))
+       (cd tmpcopy; $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) ../tmplibgcc.a *$(objext))
        rm -rf tmpcopy
-       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
+       -if $(RANLIB_TEST_FOR_TARGET) ; then \
+         $(RANLIB_FOR_TARGET) tmplibgcc.a; \
+       else true; fi
 # Actually build it in tmplibgcc.a, then rename at end,
 # so that libgcc.a itself remains nonexistent if compilation is aborted.
        mv tmplibgcc.a libgcc.a
@@ -1139,14 +1174,17 @@ s-mlib: $(srcdir)/genmultilib Makefile
 
 # Build multiple copies of libgcc.a, one for each target switch.
 stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
-   frame.h gansidecl.h \
+   frame.h \
    $(LIB2ADD) machmode.h longlong.h gbl-ctors.h config.status
        for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \
          dir=`echo $$i | sed -e 's/;.*$$//'`; \
          flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
          $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
-           AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
-           RANLIB="$(RANLIB)" RANLIB_TEST="$(RANLIB_TEST)" \
+           AR_FOR_TARGET="$(AR_FOR_TARGET)" \
+           AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
+           CC="$(CC)" CFLAGS="$(CFLAGS)" \
+           RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)" \
+           RANLIB_TEST_FOR_TARGET="$(RANLIB_TEST_FOR_TARGET)" \
            LANGUAGES="$(LANGUAGES)" \
            HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
            LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" \
@@ -1166,7 +1204,9 @@ stmp-multilib-sub:
        else true; \
        fi
        $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
-         AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
+         AR_FOR_TARGET="$(AR_FOR_TARGET)" \
+         AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
+         CC="$(CC)" CFLAGS="$(CFLAGS)" \
          HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
          LANGUAGES="$(LANGUAGES)" \
          LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC2)
@@ -1178,7 +1218,9 @@ stmp-multilib-sub:
        then true; \
        else \
          $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
-           AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
+           AR_FOR_TARGET="$(AR_FOR_TARGET)" \
+           AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
+           CC="$(CC)" CFLAGS="$(CFLAGS)" \
            HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
            LANGUAGES="$(LANGUAGES)" \
            LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)" $(LIBGCC1); \
@@ -1186,18 +1228,22 @@ stmp-multilib-sub:
        rm -rf tmplibgcc.a tmpcopy
        mkdir tmpcopy
        if [ x$(LIBGCC1) != x ]; \
-       then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \
+       then (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC1)); \
        else true; \
        fi
-       (cd tmpcopy; $(AR) x ../$(LIBGCC2))
-       (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
+       (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC2))
+       (cd tmpcopy; $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) ../tmplibgcc.a *$(objext))
        rm -rf libgcc2.a tmpcopy
-       if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
+       if $(RANLIB_TEST_FOR_TARGET) ; then \
+         $(RANLIB_FOR_TARGET) tmplibgcc.a; \
+       else true; fi
        if [ -d $(dir) ]; then true; else mkdir $(dir); fi
        mv tmplibgcc.a $(dir)/libgcc.a
        for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
          $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \
-           AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" \
+           AR_FOR_TARGET="$(AR_FOR_TARGET)" \
+           AR_FLAGS_FOR_TARGET="$(AR_FLAGS_FOR_TARGET)" \
+           CC="$(CC)" CFLAGS="$(CFLAGS)" \
            HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \
            LANGUAGES="$(LANGUAGES)" \
            MULTILIB_CFLAGS="$(MULTILIB_CFLAGS)" T="t" t$${f}; \
@@ -1274,11 +1320,11 @@ $(srcdir)/c-gperf.h: c-parse.gperf
 c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h \
     output.h toplev.h
 c-typeck.o : c-typeck.c $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h \
-    output.h $(EXPR_H) $(RTL_H) toplev.h
+    intl.h output.h $(EXPR_H) $(RTL_H) toplev.h
 c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h toplev.h \
     output.h
 c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h c-tree.h \
-    $(srcdir)/c-parse.h input.h flags.h $(srcdir)/c-gperf.h c-pragma.h \
+    $(srcdir)/c-parse.h input.h intl.h flags.h $(srcdir)/c-gperf.h c-pragma.h \
     toplev.h output.h mbchar.h
 c-aux-info.o : c-aux-info.c  $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h
 c-convert.o : c-convert.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h
@@ -1286,39 +1332,37 @@ c-pragma.o: c-pragma.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) except.h \
     function.h defaults.h c-pragma.h toplev.h
 c-iterate.o: c-iterate.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-tree.h \
     flags.h toplev.h $(EXPR_H)
-mbchar.o: mbchar.c $(CONFIG_H) system.h gansidecl.h mbchar.h
+mbchar.o: mbchar.c $(CONFIG_H) system.h mbchar.h
+graph.o: graph.c $(CONFIG_H) system.h toplev.h flags.h output.h $(RTL_H) \
+    hard-reg-set.h $(BASIC_BLOCK_H)
+sbitmap.o: sbitmap.c $(CONFIG_H) system.h $(RTL_H) flags.h $(BASIC_BLOCK_H)
 
-collect2$(exeext): collect2.o tlink.o hash.o cplus-dem.o underscore.o \
-       version.o choose-temp.o mkstemp.o $(LIBDEPS)
+COLLECT2_OBJS = collect2.o tlink.o hash.o intl.o underscore.o version.o 
+collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
 # Don't try modifying collect2 (aka ld) in place--it might be linking this.
        -rm -f collect2$(exeext)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ collect2.o tlink.o hash.o \
-         cplus-dem.o underscore.o version.o choose-temp.o mkstemp.o $(LIBS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(COLLECT2_OBJS) $(LIBS)
 
-collect2.o : collect2.c $(CONFIG_H) system.h gansidecl.h gstab.h \
-       $(srcdir)/../include/obstack.h $(DEMANGLE_H)
+collect2.o : collect2.c $(CONFIG_H) system.h gstab.h intl.h \
+       $(srcdir)/../include/obstack.h $(DEMANGLE_H) collect2.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
        -DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
        -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
 
-tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) system.h toplev.h
+tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) system.h toplev.h collect2.h
 hash.o: hash.c hash.h system.h toplev.h
 
-cplus-dem.o: $(srcdir)/../libiberty/cplus-dem.c $(DEMANGLE_H)
-       rm -f cplus-dem.c
-       $(LN_S) $(srcdir)/../libiberty/cplus-dem.c cplus-dem.c
-       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) cplus-dem.c
-
-pexecute.o: $(srcdir)/../libiberty/pexecute.c $(CONFIG_H) system.h gansidecl.h
-       rm -f pexecute.c
-       $(LN_S) $(srcdir)/../libiberty/pexecute.c pexecute.c
-       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) pexecute.c
-
-vfprintf.o: $(srcdir)/../libiberty/vfprintf.c $(CONFIG_H) system.h gansidecl.h
+vfprintf.o: $(srcdir)/../libiberty/vfprintf.c $(CONFIG_H) system.h
        rm -f vfprintf.c
        $(LN_S) $(srcdir)/../libiberty/vfprintf.c vfprintf.c
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) vfprintf.c
 
+splay-tree.o: $(srcdir)/../libiberty/splay-tree.c \
+  $(srcdir)/../include/splay-tree.h $(srcdir)/../include/libiberty.h
+       rm -f splay-tree.c
+       $(LN_S) $(srcdir)/../libiberty/splay-tree.c splay-tree.c
+       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) splay-tree.c
+
 underscore.c: s-under ; @true
 
 s-under: $(GCC_PASSES)
@@ -1337,7 +1381,7 @@ s-under: $(GCC_PASSES)
 # A file used by all variants of C.
 
 c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h \
-       flags.h toplev.h output.h
+       flags.h toplev.h output.h c-pragma.h $(RTL_H)
 
 # Language-independent files.
 
@@ -1347,8 +1391,8 @@ DRIVER_DEFINES = \
   -DDEFAULT_TARGET_VERSION=\"$(version)\" \
   -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\"
-gcc.o: gcc.c $(CONFIG_H) system.h gansidecl.h multilib.h Makefile \
-       $(lang_specs_files)
+gcc.o: gcc.c $(CONFIG_H) system.h intl.h multilib.h \
+    Makefile $(lang_specs_files) prefix.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
   $(DRIVER_DEFINES) \
   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
@@ -1359,12 +1403,13 @@ s-check : gencheck $(srcdir)/move-if-change
        $(srcdir)/move-if-change tmp-check.h tree-check.h
        touch s-check
 
-gencheck : gencheck.o tree.def $(lang_tree_files) $(HOST_LIBDEPS)
+gencheck : gencheck.o $(lang_tree_files) $(HOST_LIBDEPS)
        $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
         gencheck.o $(HOST_LIBS)
 
-gencheck.o : gencheck.c hconfig.h system.h
-       $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencheck.c
+gencheck.o : gencheck.c tree.def $(CONFIG_H) hconfig.h system.h
+       $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
+         $(srcdir)/gencheck.c
 
 dumpvers: dumpvers.c
 
@@ -1374,18 +1419,7 @@ obstack.o: $(srcdir)/../libiberty/obstack.c $(CONFIG_H)
        $(LN_S) $(srcdir)/../libiberty/obstack.c obstack.c
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) obstack.c
 
-choose-temp.o: $(srcdir)/../libiberty/choose-temp.c $(CONFIG_H) gansidecl.h \
-       system.h
-       rm -f choose-temp.c
-       $(LN_S) $(srcdir)/../libiberty/choose-temp.c choose-temp.c
-       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) choose-temp.c
-
-mkstemp.o: $(srcdir)/../libiberty/mkstemp.c $(CONFIG_H) gansidecl.h system.h
-       rm -f mkstemp.c
-       $(LN_S) $(srcdir)/../libiberty/mkstemp.c mkstemp.c
-       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) mkstemp.c
-
-prefix.o: prefix.c $(CONFIG_H) system.h gansidecl.h Makefile
+prefix.o: prefix.c $(CONFIG_H) system.h Makefile prefix.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
        -DPREFIX=\"$(prefix)\" \
          -c `echo $(srcdir)/prefix.c | sed 's,^\./,,'`
@@ -1400,7 +1434,7 @@ fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
    $(RTL_H)
 toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
    flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
-   insn-codes.h insn-config.h $(RECOG_H) Makefile toplev.h dwarfout.h \
+   insn-codes.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h dwarfout.h \
    dwarf2out.h sdbout.h dbxout.h $(EXPR_H) \
    $(lang_options_files)
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
@@ -1420,7 +1454,7 @@ function.o : function.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    insn-config.h $(RECOG_H) output.h toplev.h except.h
 stmt.o : stmt.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h function.h  \
    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h $(EXPR_H) except.h \
-   loop.h $(RECOG_H) toplev.h output.h
+   loop.h $(RECOG_H) toplev.h output.h varray.h
 except.o : except.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    function.h insn-flags.h $(EXPR_H) $(REGS_H) hard-reg-set.h \
    insn-config.h $(RECOG_H) output.h except.h toplev.h
@@ -1457,11 +1491,11 @@ getpwd.o : getpwd.c $(CONFIG_H) system.h
 
 integrate.o : integrate.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
    integrate.h insn-flags.h insn-config.h $(EXPR_H) real.h $(REGS_H) \
-   function.h output.h $(RECOG_H) except.h toplev.h
+   intl.h function.h output.h $(RECOG_H) except.h toplev.h
 
 jump.o : jump.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \
    insn-config.h insn-flags.h $(RECOG_H) $(EXPR_H) real.h except.h \
-   toplev.h
+   toplev.h insn-attr.h
 stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h \
    $(BASIC_BLOCK_H) insn-config.h reload.h flags.h toplev.h
 
@@ -1469,15 +1503,17 @@ cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
    real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h
 gcse.o : gcse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
    real.h insn-config.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h
+resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h system.h \
+   $(BASIC_BLOCK_H) $(REGS_H) flags.h output.h resource.h
 profile.o : profile.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-flags.h \
    gcov-io.h $(TREE_H) output.h $(REGS_H) toplev.h insn-config.h
 loop.o : loop.c $(CONFIG_H) system.h $(RTL_H) flags.h loop.h insn-config.h \
    insn-flags.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) real.h \
-   toplev.h
+   toplev.h varray.h
 unroll.o : unroll.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
-   integrate.h $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) loop.h toplev.h
+   integrate.h $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) loop.h toplev.h varray.h
 flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) flags.h insn-config.h \
-   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h
+   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h recog.h
 combine.o : combine.c $(CONFIG_H) system.h $(RTL_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 hard-reg-set.h toplev.h
@@ -1511,18 +1547,18 @@ regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
    $(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h \
    $(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
 $(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \
-   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
-   toplev.h
-final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(REGS_H) \
-   $(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
-   hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h \
-   toplev.h reload.h dwarfout.h dwarf2out.h sdbout.h dbxout.h
+   $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h flags.h insn-config.h \
+   insn-attr.h toplev.h recog.h
+final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h intl.h \
+   $(REGS_H) $(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h \
+   output.h hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h \
+   defaults.h toplev.h reload.h dwarfout.h dwarf2out.h sdbout.h dbxout.h
 recog.o : recog.c $(CONFIG_H) system.h $(RTL_H)  \
    $(REGS_H) $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
-   insn-flags.h insn-codes.h real.h
-reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) \
+   insn-flags.h insn-codes.h real.h toplev.h
+reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) recog.h \
    $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-flags.h toplev.h
-dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h gansidecl.h
+dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h
 
 $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
    $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
@@ -1598,7 +1634,7 @@ s-codes : $(md_file) gencodes $(srcdir)/move-if-change
        touch s-codes
 
 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 system.h reload.h
+  insn-config.h insn-flags.h insn-codes.h system.h reload.h recog.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
 
 insn-emit.c: s-emit ; @true
@@ -1627,7 +1663,8 @@ s-opinit : $(md_file) genopinit $(srcdir)/move-if-change
        $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
        touch s-opinit
 
-insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h toplev.h
+insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h toplev.h \
+  insn-config.h recog.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
 
 insn-extract.c: s-extract ; @true
@@ -1636,7 +1673,8 @@ s-extract : $(md_file) genextract $(srcdir)/move-if-change
        $(srcdir)/move-if-change tmp-extract.c insn-extract.c
        touch s-extract
 
-insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h system.h
+insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \
+       system.h insn-config.h recog.h
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
 
 insn-peep.c: s-peep ; @true
@@ -1845,6 +1883,50 @@ $(HOST_PREFIX_1)malloc.o: malloc.c
 $(HOST_PREFIX_1): 
        touch $(HOST_PREFIX_1)
 
+
+#\f
+# Remake internationalization support.
+
+intl.o: intl.c intl.h gansidecl.h Makefile
+       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+         -DLOCALEDIR=\"$(localedir)\" \
+         -c `echo $(srcdir)/intl.c | sed 's,^\./,,'`
+
+# This is needed to when doing a partial build after a `make clean'.
+# libintl.a does not depend on intl.all,
+# as that would force a lot of recompiling.
+$(top_builddir)/intl/libintl.a:
+       @echo "$(MAKE) intl.all"
+       @$(MAKE) $(FLAGS_TO_PASS) intl.all
+
+# Make sure all the headers are there for xgettext to scan.
+# FIXME: extend the language interface
+# so that we needn't jump into language build internals like this.
+intl.all intl.install intl.distdir: \
+    $(srcdir)/c-gperf.h \
+    $(srcdir)/c-parse.c $(srcdir)/c-parse.h $(srcdir)/cexp.c \
+    $(srcdir)/cp/parse.c $(srcdir)/objc/objc-parse.c
+$(srcdir)/cp/parse.c:
+       @cp_srcdir=`sed -n 's/^srcdir[  ]*=[     ]*//p' cp/Makefile` && \
+       echo "cd cp && $(MAKE) $$cp_srcdir/parse.c" && \
+       cd cp && \
+         $(MAKE) $(SUBDIR_FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) \
+           $$cp_srcdir/parse.c
+
+intl.all intl.install intl.uninstall intl.distdir \
+  intl.mostlyclean intl.clean intl.distclean intl.maintainer-clean:
+       @for d in $(INTL_SUBDIRS); do \
+         target=`expr $@ : 'intl.\(.*\)'` && \
+         echo "(cd $$d && $(MAKE) $$target)" && \
+         (cd $$d && AWK='$(AWK)' $(MAKE) $(SUBDIR_FLAGS_TO_PASS) $$target); \
+       done
+
+# intl.distdir doesn't copy the intl makefiles (since they aren't distributed),
+# but we need them for the `make extraclean' in distdir-finish.
+intl.distdir-fixup:
+       for d in $(INTL_SUBDIRS); do \
+         ln $$d/Makefile tmp/$$d || cp $$d/Makefile tmp/$$d || exit; \
+       done
 #\f
 # Remake cpp and protoize.
 
@@ -1852,99 +1934,95 @@ $(HOST_PREFIX_1):
 cpp$(exeext): $(CCCP)$(exeext)
        -rm -f cpp$(exeext)
        $(LN) $(CCCP)$(exeext) cpp$(exeext)
-cccp$(exeext): cccp.o cexp.o version.o prefix.o mbchar.o @extra_cpp_objs@ $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cccp.o cexp.o prefix.o mbchar.o \
-         version.o @extra_cpp_objs@ $(LIBS)
-cexp.o: $(srcdir)/cexp.c $(CONFIG_H) system.h gansidecl.h
+CCCP_OBJS = cccp.o cexp.o intl.o prefix.o version.o @extra_cpp_objs@ mbchar.o 
+cccp$(exeext): $(CCCP_OBJS) $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(CCCP_OBJS) $(LIBS)
+cexp.o: $(srcdir)/cexp.c $(CONFIG_H) system.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
 
 # We use $(libsubdir)/$(unlibsubdir) to match the
 # -iprefix argument which gcc will pass if GCC_EXEC_PREFIX is used.
-cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status system.h gansidecl.h \
-           mbchar.h
+cccp.o: cccp.c $(CONFIG_H) intl.h pcp.h version.c config.status system.h \
+           mbchar.h prefix.h Makefile.in
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-         -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
+         -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
          -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-         -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
-         -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
+         -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
+         -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
          -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
 
-cppmain$(exeext): cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
-  prefix.o version.o mbchar.o @extra_cpp_objs@ $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
-         mbchar.o @extra_cpp_objs@ \
-         cppalloc.o cpperror.o cppexp.o prefix.o version.o $(LIBS)
+LIBCPP_OBJS =  cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o cppfiles.o \
+               cppinit.o cppulp.o prefix.o version.o mbchar.o @extra_cpp_objs@
 
-cppmain.o: cppmain.c $(CONFIG_H) cpplib.h system.h gansidecl.h
-
-cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status system.h \
-       gansidecl.h
+# All the other archives built/used by this makefile are for targets.  This
+# one is strictly for the host.
+#
+libcpp.a: $(LIBCPP_OBJS)
+       $(AR) $(AR_FLAGS) libcpp.a $(LIBCPP_OBJS)
+       if $(RANLIB_TEST) ; then $(RANLIB) libcpp.a ; else true ; fi
+
+cppmain$(exeext): cppmain.o libcpp.a $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cppmain$(exeext) cppmain.o \
+       libcpp.a $(LIBS)
+
+cppmain.o: cppmain.c $(CONFIG_H) cpplib.h intl.h system.h
+
+cppulp.o:  cppulp.c  $(CONFIG_H) system.h output.h
+cpplib.o:  cpplib.c  $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
+cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
+cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h
+cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h system.h
+cppexp.o:   cppexp.c   $(CONFIG_H) cpplib.h intl.h system.h
+cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h intl.h system.h
+
+cppinit.o:  cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h \
+               cpphash.h prefix.h output.h Makefile
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-         -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
+         -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
          -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-         -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
-         -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
-         -c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
-
-cpperror.o: cpperror.c $(CONFIG_H) cpplib.h system.h gansidecl.h
-
-cppexp.o: cppexp.c $(CONFIG_H) cpplib.h system.h gansidecl.h
-
-cpphash.o: cpphash.c cpplib.h cpphash.h $(CONFIG_H) system.h gansidecl.h
-
-cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h system.h gansidecl.h
+         -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
+         -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
+         -c `echo $(srcdir)/cppinit.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$(exeext) unprotoize$(exeext) SYSCALLS.c.X
 
-protoize$(exeext): protoize.o getopt.o getopt1.o getpwd.o version.o \
-    pexecute.o choose-temp.o mkstemp.o $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
-         protoize.o getopt.o getopt1.o getpwd.o version.o \
-         pexecute.o choose-temp.o mkstemp.o $(LIBS)
+PROTO_OBJS = getpwd.o intl.o version.o 
 
-unprotoize$(exeext): unprotoize.o getopt.o getopt1.o getpwd.o version.o \
-    pexecute.o choose-temp.o mkstemp.o $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
-         unprotoize.o getopt.o getopt1.o getpwd.o version.o \
-         pexecute.o choose-temp.o mkstemp.o $(LIBS)
+protoize$(exeext): protoize.o $(PROTO_OBJS) $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ protoize.o $(PROTO_OBJS) $(LIBS)
 
-protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h
+unprotoize$(exeext): unprotoize.o $(PROTO_OBJS) $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS)
+
+protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h \
+   Makefile
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-         -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
-         -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
-         -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
+         -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+         -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
+         -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
          -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
          -DSTD_PROTO_DIR=\"$(libsubdir)\" \
          $(srcdir)/protoize.c
 
-unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h
+unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h \
+   $(CONFIG_H) system.h Makefile
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-         -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
-         -DCROSS_INCLUDE_DIR=\"$(tooldir)/sys-include\" \
-         -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
+         -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+         -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
+         -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
          -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
          -DSTD_PROTO_DIR=\"$(libsubdir)\" \
          $(srcdir)/unprotoize.c
 
-getopt.o: $(srcdir)/../libiberty/getopt.c $(srcdir)/../include/getopt.h
-       rm -f getopt.c
-       $(LN_S) $(srcdir)/../libiberty/getopt.c getopt.c
-       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) getopt.c
-
-getopt1.o: $(srcdir)/../libiberty/getopt1.c $(srcdir)/../include/getopt.h
-       rm -f getopt1.c
-       $(LN_S) $(srcdir)/../libiberty/getopt1.c getopt1.c
-       $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) getopt1.c
-
 # This info describes the target machine, so compile with GCC just built.
 SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES) \
    stmp-int-hdrs
@@ -1980,12 +2058,13 @@ test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
        diff $(srcdir)/protoize.c tmp-proto.c | cat
        -rm -f tmp-proto.[cs] tmp-proto$(objext)
 
-gcov.o: gcov.c gcov-io.h system.h
+gcov.o: gcov.c gcov-io.h intl.h system.h
 
 # Only one of 'gcov' or 'gcov.exe' is actually built, depending
 # upon whether $(exeext) is empty or not.
-gcov$(exeext): gcov.o $(LIBDEPS)
-       $(CC) $(ALL_CFLAGS) $(LDFLAGS) gcov.o $(LIBS) -o $@
+GCOV_OBJS = gcov.o intl.o
+gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@
 #\f
 # Build the include directory.  The stamp files are stmp-* rather than
 # s-* so that mostlyclean does not force the include directory to
@@ -1993,7 +2072,7 @@ gcov$(exeext): gcov.o $(LIBDEPS)
 
 # Build the include directory including float.h (which no longer depends upon
 # enquire).
-stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h gfloat.h
+stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
 # 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.
@@ -2012,8 +2091,8 @@ stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h gfloat.h
        cp xlimits.h include/limits.h
        chmod a+r include/limits.h
        rm -f include/float.h
-       if [ -s gfloat.h ]; then \
-         cp gfloat.h include/float.h && \
+       if [ x$(FLOAT_H) != xMakefile.in ]; then \
+         cp $(srcdir)/config/$(FLOAT_H) include/float.h && \
          chmod a+r include/float.h; \
        else :; fi
 # Install the README
@@ -2022,7 +2101,7 @@ stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h gfloat.h
        chmod a+r include/README
        touch $@
 
-# Now that gfloat.h no longer depends upon enquire, this is actually a no-op.
+# Now that float.h no longer depends upon enquire, this is actually a no-op.
 stmp-headers:
        touch $@
 
@@ -2045,9 +2124,12 @@ stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
              $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
            else true; fi; \
          done; \
-         rm -f include/assert.h; \
-         cp $(srcdir)/assert.h include/assert.h; \
-         chmod a+r include/assert.h; \
+         if [ x$(INSTALL_ASSERT_H) != x ] ; \
+         then \
+           rm -f include/assert.h; \
+           cp $(srcdir)/assert.h include/assert.h; \
+           chmod a+r include/assert.h; \
+         fi \
        else true; \
        fi
        rm -f include/syslimits.h
@@ -2057,13 +2139,13 @@ stmp-fixinc: $(FIXINCLUDES) gsyslimits.h
          cp $(srcdir)/gsyslimits.h include/syslimits.h; \
        fi
        chmod a+r include/syslimits.h
-# If $(SYSTEM_HEADER_DIR) is $(tooldir)/sys-include, and
+# If $(SYSTEM_HEADER_DIR) is $(gcc_tooldir)/sys-include, and
 # that directory exists, then make sure that $(libsubdir) exists.
-# This is because cpp is compiled to find $(tooldir)/include via
+# This is because cpp is compiled to find $(gcc_tooldir)/include via
 # $(libsubdir)/$(unlibsubdir), which will only work if $(libsubdir)
 # exists.
-       if [ "$(SYSTEM_HEADER_DIR)" = "$(tooldir)/sys-include" ] \
-          && [ -d $(tooldir)/sys-include ]; then \
+       if [ "$(SYSTEM_HEADER_DIR)" = "$(gcc_tooldir)/sys-include" ] \
+          && [ -d $(gcc_tooldir)/sys-include ]; then \
          if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi; \
          if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib; fi; \
          if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; fi; \
@@ -2085,9 +2167,10 @@ deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
          touch deduced.h; \
        fi
 
-gen-protos: gen-protos.o scan.o cppalloc.o $(HOST_LIBDEPS)
-       ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
-         gen-protos.o scan.o cppalloc.o $(HOST_LIBS)
+GEN_PROTOS_OBJS = gen-protos.o scan.o libcpp.a
+gen-protos: $(GEN_PROTOS_OBJS) $(HOST_LIBDEPS)
+       ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gen-protos \
+         $(GEN_PROTOS_OBJS) $(HOST_LIBS)
 
 gen-protos.o: gen-protos.c scan.h $(build_xm_file) system.h
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
@@ -2105,16 +2188,15 @@ xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefil
        rm -rf fixtmp.c
 
 fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
-   cpplib.o cpphash.o cppalloc.o cppexp.o prefix.o version.o
+           libcpp.a
        $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
-          scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o prefix.o \
-          version.o cppexp.o $(HOST_LIBS)
+          scan-decls.o scan.o libcpp.a $(HOST_LIBS)
 
 fix-header.o: fix-header.c $(srcdir)/../include/obstack.h scan.h \
        xsys-protos.h $(build_xm_file) system.h cpplib.h cpphash.h
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
 
-scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file) system.h gansidecl.h
+scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file) system.h
        $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
 
 # stmp-fixproto depends on this, not on fix-header directly.
@@ -2192,7 +2274,7 @@ INSTALL: $(srcdir)/install1.texi $(srcdir)/install.texi
 # (less duplicated code).
 
 
-mostlyclean: lang.mostlyclean
+mostlyclean: intl.mostlyclean lang.mostlyclean
        -rm -f $(STAGESTUFF)
 # Delete the temporary source copies for cross compilation.
        -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
@@ -2214,7 +2296,7 @@ mostlyclean: lang.mostlyclean
        -rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
        -rm -f */*.sched2 */*.stack */*.regmove */*.gcse
 # Delete some files made during installation.
-       -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
+       -rm -f specs float.h-* enquire SYSCALLS.c.X SYSCALLS.c
        -rm -f collect collect2 mips-tfile mips-tdump alloca.s
 # Delete files generated for fixproto
        -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
@@ -2230,7 +2312,7 @@ mostlyclean: lang.mostlyclean
 
 # Delete all files made by compilation
 # that don't exist in the distribution.
-clean: mostlyclean lang.clean
+clean: mostlyclean intl.clean lang.clean
 # It may not be quite desirable to delete unprotoize.c here,
 # but the spec for `make clean' requires it.
 # Using unprotoize.c is not quite right in the first place, 
@@ -2255,7 +2337,8 @@ clean: mostlyclean lang.clean
 
 # Delete all files that users would normally create
 # while building and installing GCC.
-distclean: clean lang.distclean
+INTL_DISTCLEAN = intl.distclean
+distclean: clean $(INTL_DISTCLEAN) lang.distclean
        -rm -f tm.h config.h auto-host.h auto-build.h tconfig.h hconfig.h
        -rm -f md cstamp-h
        -rm -f config.status config.run config.cache config.bak
@@ -2268,6 +2351,7 @@ distclean: clean lang.distclean
        -rm -f float.h
        -rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
        -rm -f testsuite/{gcc,g++}.{log,sum}
+       -rm -f intl/libintl.h libintl.h
 
 # Delete anything likely to be found in the source directory
 # that shouldn't be in the distribution.
@@ -2280,6 +2364,7 @@ extraclean: distclean lang.extraclean
        -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
        -rm -f *lose config/*lose config/*/*lose
        -rm -f *.s *.s[0-9] *.i config/ChangeLog
+       -rm -f y.tab.c yacc.*
        -rm -f */=* */"#"* */*~*
        -rm -f */patch* */*.orig */*.rej
        -rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
@@ -2288,10 +2373,13 @@ extraclean: distclean lang.extraclean
 
 # Get rid of every file that's generated from some other file, except for `configure'.
 # Most of these files ARE PRESENT in the GCC distribution.
+# We define INTL_DISTCLEAN to be empty in the submake, so that
+# we don't descend into intl after its makefile has been removed.
 maintainer-clean:
        @echo 'This command is intended for maintainers to use; it'
        @echo 'deletes files that may need special tools to rebuild.'
-       $(MAKE) distclean lang.maintainer-clean
+       $(MAKE) INTL_DISTCLEAN= distclean \
+               intl.maintainer-clean lang.maintainer-clean
        -rm -f c-parse.y c-gperf.h
        -rm -f c-parse.c c-parse.h c-parse.output
        -rm -f cexp.c cexp.output TAGS 
@@ -2310,7 +2398,8 @@ install: $(INSTALL_TARGET) ; @true
 # Install the driver last so that the window when things are
 # broken is small.
 install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
-    install-man install-info lang.install-normal install-driver
+    $(INSTALL_CPP) install-man install-info intl.install lang.install-normal \
+    install-driver
 
 # 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
@@ -2320,10 +2409,27 @@ install-build: force
 
 # Run this on the target machine
 # to finish installation of cross compiler.
+# This is not used anymore now that float.h does not depend on enquire.
 install-cross-rest: install-float-h-cross
 
+# Handle cpp installation.
+install-cpp: cpp.sh
+       -rm -f $(bindir)/cpp
+       $(INSTALL_PROGRAM) -m 755 cpp.sh $(bindir)/cpp
+       if [ x$(cpp_install_dir) != x ]; then \
+         rm -f $(prefix)/$(cpp_install_dir)/cpp; \
+         $(INSTALL_PROGRAM) -m 755 cpp.sh $(prefix)/$(cpp_install_dir)/cpp; \
+       else true; fi
+
+uninstall-cpp:
+       -rm -f $(bindir)/cpp
+       -if [ x$(cpp_install_dir) != x ]; then \
+         rm -f $(prefix)/$(cpp_install_dir)/cpp; \
+       else true; fi
+
 # Install float.h for cross compiler.
 # Run this on the target machine!
+# This is not used anymore now that float.h does not depend on enquire.
 install-float-h-cross: installdirs
 #      if [ -f enquire ] ; then true; else false; fi
 # Note: don't use -.  We should fail right away if enquire was not made.
@@ -2347,15 +2453,15 @@ installdirs:
        done
        -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
        -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
-       -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
+       -if [ -d $(gcc_tooldir) ] ; then true ; else mkdir $(gcc_tooldir) ; chmod a+rx $(gcc_tooldir) ; fi
        -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
        -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
-# We don't use mkdir -p to create the parents of mandir,
+# We don't use mkdir -p to create the parents of man1dir,
 # because some systems don't support it.
-# Instead, we use this technique to create the immediate parent of mandir.
-       -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
+# Instead, we use this technique to create the immediate parent of man1dir.
+       -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
        if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi
-       -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; chmod a+rx $(mandir) ; fi
+       -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi
 
 # Install the compiler executables built during cross compilation.
 install-common: native installdirs $(EXTRA_PARTS) lang.install-common
@@ -2409,19 +2515,18 @@ install-common: native installdirs $(EXTRA_PARTS) lang.install-common
        -if [ -f gcov$(exeext) ]; \
        then \
            rm -f $(bindir)/gcov$(exeext); \
-           $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/gcov$(exeext); \
-           chmod a+x $(bindir)/gcov$(exeext); \
+           $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \
        fi
 
 # Install the driver program as $(target_alias)-gcc
-# and also as either gcc (if native) or $(tooldir)/bin/gcc.
+# and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
 install-driver: xgcc$(exeext)
        -if [ -f gcc-cross$(exeext) ] ; then \
          rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
          $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
-         if [ -d $(tooldir)/bin/. ] ; then \
-           rm -f $(tooldir)/bin/gcc$(exeext); \
-           $(INSTALL_PROGRAM) gcc-cross$(exeext) $(tooldir)/bin/gcc$(exeext); \
+         if [ -d $(gcc_tooldir)/bin/. ] ; then \
+           rm -f $(gcc_tooldir)/bin/gcc$(exeext); \
+           $(INSTALL_PROGRAM) gcc-cross$(exeext) $(gcc_tooldir)/bin/gcc$(exeext); \
          else true; fi; \
        else \
          rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
@@ -2451,25 +2556,25 @@ install-info: doc installdirs lang.install-info
 # Install the man pages.
 install-man: installdirs $(srcdir)/gcc.1 $(srcdir)/cccp.1 lang.install-man
        -if [ -f gcc-cross$(exeext) ] ; then \
-         rm -f $(mandir)/$(GCC_CROSS_NAME)$(manext); \
-         $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_CROSS_NAME)$(manext); \
-         chmod a-x $(mandir)/$(GCC_CROSS_NAME)$(manext); \
+         rm -f $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
+         $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
+         chmod a-x $(man1dir)/$(GCC_CROSS_NAME)$(manext); \
        else \
-         rm -f $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
-         $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
-         chmod a-x $(mandir)/$(GCC_INSTALL_NAME)$(manext); \
+         rm -f $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
+         $(INSTALL_DATA) $(srcdir)/gcc.1 $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
+         chmod a-x $(man1dir)/$(GCC_INSTALL_NAME)$(manext); \
        fi
-       -rm -f $(mandir)/cccp$(manext)
-       -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
-       -chmod a-x $(mandir)/cccp$(manext)
+       -rm -f $(man1dir)/cccp$(manext)
+       -$(INSTALL_DATA) $(srcdir)/cccp.1 $(man1dir)/cccp$(manext)
+       -chmod a-x $(man1dir)/cccp$(manext)
 
 # Install the library.
 install-libgcc: libgcc.a installdirs
        -if [ -f libgcc.a ] ; then \
          rm -f $(libsubdir)/libgcc.a; \
          $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
-         if $(RANLIB_TEST) ; then \
-           (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
+         if $(RANLIB_TEST_FOR_TARGET) ; then \
+           (cd $(libsubdir); $(RANLIB_FOR_TARGET) libgcc.a); else true; fi; \
          chmod a-x $(libsubdir)/libgcc.a; \
        else true; fi
 
@@ -2482,8 +2587,9 @@ install-multilib: stmp-multilib installdirs
            rm -f $(libsubdir)/$${dir}/$${f}; \
            $(INSTALL_DATA) $${dir}/$${f} $(libsubdir)/$${dir}/$${f}; \
          done; \
-         if $(RANLIB_TEST); then \
-           (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \
+         if $(RANLIB_TEST_FOR_TARGET); then \
+           (cd $(libsubdir)/$${dir}; $(RANLIB_FOR_TARGET) libgcc.a); \
+         else true; fi; \
          chmod a-x $(libsubdir)/$${dir}/libgcc.a; \
        done
 
@@ -2552,18 +2658,20 @@ install-collect2: collect2 installdirs
        $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext)
 
 # Cancel installation by deleting the installed files.
-uninstall: lang.uninstall
+uninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP)
        -rm -rf $(libsubdir)
        -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext)
        -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext)
-       -rm -rf $(bindir)/protoize$(exeext)
-       -rm -rf $(bindir)/unprotoize$(exeext)
-       -rm -rf $(bindir)/gcov$(exeext)
-       -rm -rf $(mandir)/$(GCC_INSTALL_NAME)$(manext)
-       -rm -rf $(mandir)/$(GCC_CROSS_NAME)$(manext)
-       -rm -rf $(mandir)/cccp$(manext)
-       -rm -rf $(mandir)/protoize$(manext)
-       -rm -rf $(mandir)/unprotoize$(manext)
+       -rm -rf $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext)
+       -rm -rf $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext)
+       -rm -rf $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext)
+       -rm -rf $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext)
+       -rm -rf $(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
+       -rm -rf $(man1dir)/$(GCC_INSTALL_NAME)$(manext)
+       -rm -rf $(man1dir)/$(GCC_CROSS_NAME)$(manext)
+       -rm -rf $(man1dir)/cccp$(manext)
+       -rm -rf $(man1dir)/protoize$(manext)
+       -rm -rf $(man1dir)/unprotoize$(manext)
        -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
 #\f
 # These targets are for the dejagnu testsuites. The file site.exp 
@@ -2637,7 +2745,7 @@ check-g++: testsuite/site.exp
        cd testsuite; \
        EXPECT=${EXPECT} ; export EXPECT ; \
        if [ -f $${rootme}/../expect/expect ] ; then  \
-          TCL_LIBRARY=$${srcdir}/../tcl/library ; \
+          TCL_LIBRARY=`cd ${srcdir}/../tcl/library ; pwd` ; \
            export TCL_LIBRARY ; fi ; \
        $(RUNTEST) --tool g++ $(RUNTESTFLAGS)
 
@@ -2647,7 +2755,7 @@ check-gcc: testsuite/site.exp
        cd testsuite; \
        EXPECT=${EXPECT} ; export EXPECT ; \
        if [ -f $${rootme}/../expect/expect ] ; then  \
-          TCL_LIBRARY=$${srcdir}/../tcl/library ; \
+          TCL_LIBRARY=`cd ${srcdir}/../tcl/library ; pwd` ; \
           export TCL_LIBRARY ; fi ; \
        $(RUNTEST) --tool gcc $(RUNTESTFLAGS)
 
@@ -2657,7 +2765,7 @@ check-g77: testsuite/site.exp
        cd testsuite; \
        EXPECT=${EXPECT} ; export EXPECT ; \
        if [ -f $${rootme}/../expect/expect ] ; then  \
-          TCL_LIBRARY=$${srcdir}/../tcl/library ; \
+          TCL_LIBRARY=`cd ${srcdir}/../tcl/library ; pwd` ; \
           export TCL_LIBRARY ; fi ; \
        $(RUNTEST) --tool g77 $(RUNTESTFLAGS)
 
@@ -2667,7 +2775,7 @@ check-objc: testsuite/site.exp
        cd testsuite; \
        EXPECT=${EXPECT} ; export EXPECT ; \
        if [ -f $${rootme}/../expect/expect ] ; then  \
-          TCL_LIBRARY=$${srcdir}/../tcl/library ; \
+          TCL_LIBRARY=`cd ${srcdir}/../tcl/library ; pwd` ; \
            export TCL_LIBRARY ; fi ; \
        $(RUNTEST) --tool objc $(RUNTESTFLAGS)
 
@@ -2692,22 +2800,27 @@ tmp-gcc.xtar: distdir
        tar -chf tmp-gcc.xtar gcc-$(version)
 
 distdir-cvs: force
-       if [ -d $(srcdir)/CVS ]; then cvs -r update; fi
+       if [ -d $(srcdir)/CVS ]; then cd $(srcdir) && cvs -r update; fi
 
 # This target exists to do the initial work before the language specific
 # stuff gets done.
 distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
   $(srcdir)/c-parse.c $(srcdir)/cexp.c $(srcdir)/config.in \
   $(srcdir)/version.c TAGS
+       @case '$(USE_NLS)' in \
+       yes) ;; \
+       *) echo "configure with --enable-nls before making a distribution"; \
+          exit 1;; \
+       esac
        @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
        then true; \
        else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
        fi
 # Update the version number in README
-       awk '$$1 " " $$2 " " $$3 == "This directory contains" \
+       $(AWK) '$$1 " " $$2 " " $$3 == "This directory contains" \
                { $$6 = version; print $$0 } \
             $$1 " " $$2 " " $$3 != "This directory contains"' \
-         version=$(version) README > tmp.README
+         version=$(version) $(srcdir)/README > tmp.README
        mv tmp.README README
        -rm -rf gcc-$(version) tmp      
 # Put all the files in a temporary subdirectory
@@ -2715,31 +2828,35 @@ distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
        mkdir tmp
        mkdir tmp/config
        mkdir tmp/ginclude
-       for file in *[0-9a-zA-Z+]; do \
-         $(LN) $$file tmp; \
+       mkdir tmp/objc
+       mkdir tmp/intl
+       mkdir tmp/po
+       for file in `(cd $(srcdir) && echo *[0-9a-zA-Z+])`; do \
+         test -f $(srcdir)/$$file && $(LN_S) $(srcdir)/$$file tmp; \
        done
-       cd config; \
-       for file in *[0-9a-zA-Z+]; do \
-         if test -d $$file && test "$$file" != RCS && test "$$file" != CVS; then \
-           mkdir ../tmp/config/$$file; \
-           cd $$file; \
-           for subfile in *[0-9a-zA-Z+]; do \
-             $(LN) $$subfile ../../tmp/config/$$file; \
+       if test "$(srcdir)" != "." ; then \
+         for file in c-parse.c cexp.c ; do \
+           test -f ./$$file && $(LN_S) ../$$file tmp; \
+         done; \
+       fi
+       for file in `(cd $(srcdir)/config && echo *[0-9a-zA-Z+])`; do \
+         if test -d $(srcdir)/config/$$file \
+             && test "$$file" != RCS && test "$$file" != CVS; then \
+           mkdir tmp/config/$$file; \
+           for subfile in `(cd $(srcdir)/config/$$file && echo *[0-9a-zA-Z+])`; do \
+             $(LN_S) $(srcdir)/config/$$file/$$subfile tmp/config/$$file; \
            done; \
-           cd ..; \
          else \
-           $(LN) $$file ../tmp/config; \
+           $(LN_S) $(srcdir)/config/$$file tmp/config; \
          fi; \
        done
-       cd ginclude; \
-       for file in *[0-9a-zA-Z+]; do \
-         $(LN) $$file ../tmp/ginclude; \
+       for file in `(cd $(srcdir)/ginclude && echo *[0-9a-zA-Z+])`; do \
+         $(LN_S) $(srcdir)/ginclude/$$file tmp/ginclude; \
        done
-       cd objc; \
-       for file in *[0-9a-zA-Z+]; do \
-         $(LN) $$file ../tmp/objc; \
+       for file in `(cd $(srcdir)/objc && echo *[0-9a-zA-Z+])`; do \
+         $(LN_S) $(srcdir)/objc/$$file tmp/objc; \
        done
-       $(LN) .gdbinit tmp
+       $(LN_S) .gdbinit tmp
 
 # Finish making `distdir', after the languages have done their thing.
 distdir-finish:
@@ -2747,9 +2864,21 @@ distdir-finish:
 # Get rid of everything we don't want in the distribution.  We'd want
 # this to use Makefile.in, but it doesn't have the `lang.foo' targets
 # expanded.
-       cd gcc-$(version); make extraclean VERSION_DEP=
+       cd gcc-$(version); make extraclean distdir-check VERSION_DEP=
+
+distdir-check:
+       ($(AWK) '/^[^#]/{print} /^#[A-Za-z]/{print substr($$1, 2)}' | sort) \
+         < po/POTFILES.in > tmp.POTFILES
+       ls [A-Za-z]*.[ch] [a-z]*/[A-Za-z]*.[ch] \
+         [a-z]*/[a-z]*/[A-Za-z]*.[ch] | sort > tmp.src
+       diff tmp.POTFILES tmp.src || { \
+         echo "po/POTFILES.in and sources do not match -- please fix"; \
+         exit 1; \
+       }
+       rm -f tmp.*
 
-distdir: distdir-cvs distdir-start lang.distdir distdir-finish
+distdir: distdir-cvs distdir-start intl.distdir intl.distdir-fixup \
+  lang.distdir distdir-finish
 
 # make diff oldversion=M.N 
 # creates a diff file between an older distribution and this one.
@@ -2804,14 +2933,14 @@ compare compare3 compare4 compare-lean compare3-lean compare4-lean: force
            && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
        done
        case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
-       for dir in tmp-foo $(SUBDIRS); do \
+       for dir in tmp-foo intl $(SUBDIRS); do \
          if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
            for file in $$dir/*$(objext); do \
              tail +16c ./$$file > tmp-foo1; \
              tail +16c stage$$stage/$$file > tmp-foo2 \
                && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
            done; \
-         fi; \
+         else true; fi; \
        done
        -rm -f tmp-foo*
        case "$@" in compare | compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
@@ -2837,12 +2966,12 @@ gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-
          (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
        done
        case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
-       for dir in tmp-foo $(SUBDIRS); do \
+       for dir in tmp-foo intl $(SUBDIRS); do \
          if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
            for file in $$dir/*$(objext); do \
              (cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
            done; \
-         fi; \
+         else true; fi; \
        done
        case "$@" in gnucompare | gnucompare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^gnucompare\([0-9][0-9]*\).*,\1,'` ;; esac; \
        if [ -f .bad_compare ]; then \
@@ -2858,11 +2987,12 @@ gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-
 # Copy the object files from a particular stage into a subdirectory.
 stage1-start:
        -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
-       -for dir in . $(SUBDIRS) ; \
+       -for dir in intl $(SUBDIRS) ; \
         do \
           if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
         done
        -mv $(STAGESTUFF) stage1
+       -mv intl/*$(objext) stage1/intl
 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
 # dir will work properly.
        -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi
@@ -2870,7 +3000,9 @@ stage1-start:
        -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage1 ; else true ; fi
        -rm -f stage1/libgcc.a
        -cp libgcc.a stage1
-       -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
+       -if $(RANLIB_TEST_FOR_TARGET) ; then \
+         $(RANLIB_FOR_TARGET) stage1/libgcc.a; \
+       else true; fi
        -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
          cp stage1/$${f} . ; \
        else true; \
@@ -2879,11 +3011,12 @@ stage1: force stage1-start lang.stage1
 
 stage2-start:
        -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
-       -for dir in . $(SUBDIRS) ; \
+       -for dir in intl $(SUBDIRS) ; \
         do \
           if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
         done
        -mv $(STAGESTUFF) stage2
+       -mv intl/*$(objext) stage2/intl
 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
 # dir will work properly.
        -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi
@@ -2891,7 +3024,9 @@ stage2-start:
        -if [ -f collect-ld ] ; then $(LN_S) ../collect-ld$(exeext) stage2 ; else true ; fi
        -rm -f stage2/libgcc.a
        -cp libgcc.a stage2
-       -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
+       -if $(RANLIB_TEST_FOR_TARGET) ; then \
+         $(RANLIB_FOR_TARGET) stage2/libgcc.a; \
+       else true; fi
        -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
          cp stage2/$${f} . ; \
        else true; \
@@ -2900,11 +3035,12 @@ stage2: force stage2-start lang.stage2
 
 stage3-start:
        -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
-       -for dir in . $(SUBDIRS) ; \
+       -for dir in intl $(SUBDIRS) ; \
         do \
           if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
         done
        -mv $(STAGESTUFF) stage3
+       -mv intl/*$(objext) stage3/intl
 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
 # dir will work properly.
        -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi
@@ -2912,7 +3048,9 @@ stage3-start:
        -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage3 ; else true ; fi
        -rm -f stage3/libgcc.a
        -cp libgcc.a stage3
-       -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
+       -if $(RANLIB_TEST_FOR_TARGET) ; then \
+         $(RANLIB_FOR_TARGET) stage3/libgcc.a; \
+       else true; fi
        -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
          cp stage3/$${f} . ; \
        else true; \
@@ -2921,11 +3059,12 @@ stage3: force stage3-start lang.stage3
 
 stage4-start:
        -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
-       -for dir in . $(SUBDIRS) ; \
+       -for dir in intl $(SUBDIRS) ; \
         do \
           if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
         done
        -mv $(STAGESTUFF) stage4
+       -mv intl/*$(objext) stage4/intl
 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
 # dir will work properly.
        -if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi
@@ -2933,7 +3072,9 @@ stage4-start:
        -if [ -f collect-ld$(exeext) ] ; then $(LN_S) ../collect-ld$(exeext) stage4 ; else true ; fi
        -rm -f stage4/libgcc.a
        -cp libgcc.a stage4
-       -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
+       -if $(RANLIB_TEST_FOR_TARGET) ; then \
+         $(RANLIB_FOR_TARGET) stage4/libgcc.a; \
+       else true; fi
        -for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
          cp stage4/$${f} . ; \
        else true; \