2003-01-03 David Carlton <carlton@math.stanford.edu>
[deliverable/binutils-gdb.git] / Makefile.tpl
index 288fa0c8f6acda6206dd66f0575df1a84aa55266..8b66bb6cbb4bd55e803db25707c94fc787f1dc75 100644 (file)
@@ -23,12 +23,6 @@ in
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #
 
-# Tell GNU make 3.79 not to run the top level in parallel.  This 
-# prevents contention for $builddir/$target/config.cache, as well
-# as minimizing scatter in file system caches.
-NOTPARALLEL = .NOTPARALLEL
-$(NOTPARALLEL):
-
 VPATH=@srcdir@
 links=@configlinks@
 
@@ -72,7 +66,8 @@ includedir = @includedir@
 oldincludedir = @oldincludedir@
 infodir = @infodir@
 mandir = @mandir@
-gxx_include_dir=@gxx_include_dir@
+gxx_include_dir = @gxx_include_dir@
+libstdcxx_incdir = @libstdcxx_incdir@
 
 tooldir = @tooldir@
 build_tooldir = @build_tooldir@
@@ -112,7 +107,7 @@ INSTALL_DATA = $(INSTALL) -m 644
 AS = @AS@
 AR = @AR@
 AR_FLAGS = rc
-CC = cc
+CC = @CC@
 
 # Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
 # here so that they can be overridden by Makefile fragments.
@@ -120,9 +115,8 @@ BUILD_CC = $(CC_FOR_BUILD)
 BUILD_PREFIX = @BUILD_PREFIX@
 BUILD_PREFIX_1 = @BUILD_PREFIX_1@
 
-# These flag values are normally overridden by the configure script.
-CFLAGS = -g
-CXXFLAGS = -g -O2
+CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
 
 LDFLAGS = 
 LIBCFLAGS = $(CFLAGS)
@@ -137,7 +131,7 @@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
 PICFLAG = 
 PICFLAG_FOR_TARGET = 
 
-CXX = c++
+CXX = @CXX@
 
 # Use -O2 to stress test the compiler.
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
@@ -259,7 +253,6 @@ REALLY_SET_LIB_PATH = \
 # Should be substed by configure.in
 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
 CC_FOR_TARGET = @CC_FOR_TARGET@
-BASE_CC_FOR_TARGET = @BASE_CC_FOR_TARGET@
 CXX_FOR_TARGET = @CXX_FOR_TARGET@
 RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
@@ -283,7 +276,7 @@ USUAL_AS_FOR_TARGET = ` \
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(AS); \
     else \
-       t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
+       echo as | sed '$(program_transform_name)' ; \
     fi; \
   fi`
 
@@ -297,7 +290,7 @@ USUAL_LD_FOR_TARGET = ` \
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(LD); \
     else \
-       t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
+       echo ld | sed '$(program_transform_name)' ; \
     fi; \
   fi`
 
@@ -309,7 +302,7 @@ USUAL_DLLTOOL_FOR_TARGET = ` \
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(DLLTOOL); \
     else \
-       t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
+       echo dlltool | sed '$(program_transform_name)' ; \
     fi; \
   fi`
 
@@ -321,7 +314,7 @@ USUAL_WINDRES_FOR_TARGET = ` \
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(WINDRES); \
     else \
-       t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
+       echo windres | sed '$(program_transform_name)' ; \
     fi; \
   fi`
 
@@ -333,7 +326,7 @@ USUAL_AR_FOR_TARGET = ` \
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(AR); \
     else \
-       t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
+       echo ar | sed '$(program_transform_name)' ; \
     fi; \
   fi`
 
@@ -349,7 +342,7 @@ USUAL_RANLIB_FOR_TARGET = ` \
          echo ranlib; \
       fi; \
     else \
-       t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
+       echo ranlib | sed '$(program_transform_name)' ; \
     fi; \
   fi`
 
@@ -363,7 +356,7 @@ USUAL_NM_FOR_TARGET = ` \
     if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
       echo $(NM); \
     else \
-       t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
+       echo nm | sed '$(program_transform_name)' ; \
     fi; \
   fi`
 
@@ -373,6 +366,10 @@ all: all.normal
 .PHONY: all
 
 #### host and target specific makefile fragments come in here.
+@target_makefile_frag@
+@alphaieee_frag@
+@ospace_frag@
+@host_makefile_frag@
 ###
 
 # Flags to pass down to all sub-makes.
@@ -530,14 +527,8 @@ EXTRA_GCC_FLAGS = \
 
 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
 
-# This is a list of the configure targets for all of the modules which
-# are compiled using the target tools.
-CONFIGURE_TARGET_MODULES =[+
-    FOR target_modules +] \
-       configure-target-[+module+][+
-    ENDFOR target_modules +]
-
-configure-target: $(CONFIGURE_TARGET_MODULES)
+configure-host: @configure_host_modules@
+configure-target: @configure_target_modules@
 
 # This is a list of the targets for which we can do a clean-{target}.
 CLEAN_MODULES =[+
@@ -566,6 +557,7 @@ all.normal: @all_build_modules@ \
        @all_host_modules@ \
        @all_target_modules@
 
+all-host: @all_host_modules@
 all-target: @all_target_modules@
 
 # Do a target for all the subdirectories.  A ``make do-X'' will do a
@@ -595,13 +587,13 @@ do-[+target+]:
              done; \
              ;; \
            esac ; \
-           if (cd ./$$i; \
+           (cd ./$$i && \
                $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                        "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                        "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
                        "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                       [+target+]); \
-           then true; else exit 1; fi; \
+                       [+target+]) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -613,13 +605,13 @@ do-[+target+]:
            for flag in $(EXTRA_TARGET_FLAGS); do \
                eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
            done; \
-           if (cd $(TARGET_SUBDIR)/$$i; \
+           (cd $(TARGET_SUBDIR)/$$i && \
                $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                        "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                        "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
                        "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                       [+target+]); \
-           then true; else exit 1; fi; \
+                       [+target+]) \
+           || exit 1; \
          else true; fi; \
        done
 [+ ENDFOR recursive_targets +]
@@ -634,8 +626,9 @@ info: do-info
 installcheck: do-installcheck
 dvi: do-dvi
 
-# Make sure makeinfo is built before we do a `make info'.
-do-info: all-texinfo
+# Make sure makeinfo is built before we do a `make info', if we're
+# in fact building texinfo.
+do-info: maybe-all-texinfo
 
 install-info: do-install-info dir.info
        s=`cd $(srcdir); ${PWD}`; export s; \
@@ -648,6 +641,7 @@ local-clean:
 
 local-distclean:
        -rm -f Makefile config.status config.cache mh-frag mt-frag
+       -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp
        -if [ "$(TARGET_SUBDIR)" != "." ]; then \
          rm -rf $(TARGET_SUBDIR); \
        else true; fi
@@ -676,7 +670,7 @@ $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
          r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
+         (cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) clean); \
        else \
          true; \
        fi
@@ -689,7 +683,7 @@ $(CLEAN_TARGET_MODULES):
          r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
+         (cd $(TARGET_SUBDIR)/$${dir} && $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
        else \
          true; \
        fi
@@ -747,7 +741,7 @@ install.all: install-no-fixedincludes
        @if [ -f ./gcc/Makefile ] ; then \
                r=`${PWD}` ; export r ; \
                $(SET_LIB_PATH) \
-               (cd ./gcc; \
+               (cd ./gcc && \
                $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
        else \
                true ; \
@@ -789,16 +783,16 @@ etags tags: TAGS
 # built are.
 TAGS: do-TAGS
 
-
 # --------------------------------------
 # Modules which run on the build machine
 # --------------------------------------
 [+ FOR build_modules +]
 .PHONY: configure-build-[+module+] maybe-configure-build-[+module+]
 maybe-configure-build-[+module+]:
-configure-build-[+module+]: $(BUILD_SUBDIR)/[+module+]/Makefile
-$(BUILD_SUBDIR)/[+module+]/Makefile: config.status
-       @[ -d $(BUILD_SUBDIR)/[+module+] ] || mkdir $(BUILD_SUBDIR)/[+module+];\
+configure-build-[+module+]:
+       @test ! -f $(BUILD_SUBDIR)/[+module+]/Makefile || exit 0; \
+           [ -d $(BUILD_SUBDIR)/[+module+] ] || \
+               mkdir $(BUILD_SUBDIR)/[+module+];\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            AR="$(AR_FOR_BUILD)"; export AR; \
@@ -867,13 +861,53 @@ all-build-[+module+]: configure-build-[+module+]
 # Modules which run on the host machine
 # --------------------------------------
 [+ FOR host_modules +]
+.PHONY: configure-[+module+] maybe-configure-[+module+]
+maybe-configure-[+module+]:
+configure-[+module+]:
+       @test ! -f [+module+]/Makefile || exit 0; \
+       [ -d [+module+] ] || mkdir [+module+]; \
+       r=`${PWD}`; export r; \
+       s=`cd $(srcdir); ${PWD}`; export s; \
+       CC="$(CC)"; export CC; \
+       CFLAGS="$(CFLAGS)"; export CFLAGS; \
+       CXX="$(CXX)"; export CXX; \
+       CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+       if [ z$(build_canonical) !=  z$(host_canoncial) ] ; then \
+         AR="$(AR)"; export AR; \
+         AS="$(AS)"; export AS; \
+         CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+         DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+         LD="$(LD)"; export LD; \
+         NM="$(NM)"; export NM; \
+         RANLIB="$(RANLIB)"; export RANLIB; \
+         WINDRES="$(WINDRES)"; export WINDRES; \
+         OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+         OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+       fi; \
+       echo Configuring in [+module+]; \
+       cd [+module+] || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/[+module+]"; \
+           libsrcdir="$$s/[+module+]";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/[+module+]"; \
+           libsrcdir="$$s/[+module+]";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-[+module+] maybe-all-[+module+]
 maybe-all-[+module+]:
-all-[+module+]:
+all-[+module+]: configure-[+module+]
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ 
+         (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+ 
            IF with_x 
              +] $(X11_FLAGS_TO_PASS)[+ 
            ENDIF with_x +] all)
@@ -889,7 +923,7 @@ check-[+module+]:
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
-           (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ 
+           (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+ 
              IF with_x 
                +] $(X11_FLAGS_TO_PASS)[+ 
              ENDIF with_x +] check); \
@@ -900,7 +934,7 @@ check-[+module+]:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ 
+         (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+ 
            IF with_x 
              +] $(X11_FLAGS_TO_PASS)[+ 
            ENDIF with_x +] check)
@@ -917,7 +951,7 @@ install-[+module+]: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+ 
+         (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+ 
            IF with_x 
              +] $(X11_FLAGS_TO_PASS)[+ 
            ENDIF with_x +] install)
@@ -930,16 +964,18 @@ install-[+module+]: installdirs
 [+ FOR target_modules +]
 .PHONY: configure-target-[+module+] maybe-configure-target-[+module+]
 maybe-configure-target-[+module+]:
-configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/Makefile
-
-$(TARGET_SUBDIR)/[+module+]/multilib.out: $(BASE_CC_FOR_TARGET)
-       @[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\
-       r=`${PWD}`; export r; \
-       echo "Configuring multilibs for [+module+]"; \
-       $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/[+module+]/multilib.out 2> /dev/null
 
-$(TARGET_SUBDIR)/[+module+]/Makefile: config.status $(TARGET_SUBDIR)/[+module+]/multilib.out
-       @[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/[+module+] ] || \
+           mkdir $(TARGET_SUBDIR)/[+module+]; \
+       rm -f $(TARGET_SUBDIR)/[+module+]/Makefile || : ; \
+       cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out
+
+configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/multilib.out
+       @test ! -f $(TARGET_SUBDIR)/[+module+]/Makefile || exit 0; \
+           [ -d $(TARGET_SUBDIR)/[+module+] ] || \
+               mkdir $(TARGET_SUBDIR)/[+module+];\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -1008,7 +1044,7 @@ all-target-[+module+]: configure-target-[+module+]
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/[+module+]; \
+         (cd $(TARGET_SUBDIR)/[+module+] && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
               IF raw_cxx 
                 +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+ 
@@ -1024,7 +1060,7 @@ check-target-[+module+]:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/[+module+]; \
+         (cd $(TARGET_SUBDIR)/[+module+] && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) [+
               IF raw_cxx 
                 +] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+ 
@@ -1043,7 +1079,7 @@ install-target-[+module+]: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/[+module+]; \
+         (cd $(TARGET_SUBDIR)/[+module+] && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 [+ ENDIF no_install +]
 [+ ENDFOR target_modules +]
@@ -1057,16 +1093,62 @@ install-target-[+module+]: installdirs
 # build modules.  So GCC is a sort of hybrid.
 
 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
+.PHONY: configure-gcc maybe-configure-gcc
+maybe-configure-gcc:
+configure-gcc:
+       @test ! -f gcc/Makefile || exit 0; \
+       [ -d gcc ] || mkdir gcc; \
+       r=`${PWD}`; export r; \
+       s=`cd $(srcdir); ${PWD}`; export s; \
+       CC="$(CC)"; export CC; \
+       CFLAGS="$(CFLAGS)"; export CFLAGS; \
+       CXX="$(CXX)"; export CXX; \
+       CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+       if [ z$(build_canonical) !=  z$(host_canoncial) ] ; then \
+         AR="$(AR)"; export AR; \
+         AS="$(AS)"; export AS; \
+         CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+         DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+         LD="$(LD)"; export LD; \
+         NM="$(NM)"; export NM; \
+         RANLIB="$(RANLIB)"; export RANLIB; \
+         WINDRES="$(WINDRES)"; export WINDRES; \
+         OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+         OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+       fi; \
+       echo Configuring in gcc; \
+       cd gcc || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/gcc"; \
+           libsrcdir="$$s/gcc";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+           libsrcdir="$$s/gcc";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
+# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that
+# causes trouble.  This wart will be fixed eventually by moving
+# the bootstrap behavior to this file.
 .PHONY: all-gcc maybe-all-gcc
 maybe-all-gcc:
-all-gcc:
-       @if [ -f ./gcc/Makefile ] ; then \
+all-gcc: configure-gcc
+       @if [ -f gcc/stage_last ] ; then \
          r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
+         (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
        else \
-         true; \
+         r=`${PWD}`; export r; \
+         s=`cd $(srcdir); ${PWD}`; export s; \
+         $(SET_LIB_PATH) \
+         (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
        fi
 
 # Building GCC uses some tools for rebuilding "source" files
@@ -1080,7 +1162,7 @@ all-gcc:
 # in parallel.
 #
 .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
-bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap
+bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap: all-bootstrap configure-gcc
        @r=`${PWD}`; export r; \
        s=`cd $(srcdir); ${PWD}`; export s; \
        $(SET_LIB_PATH) \
@@ -1128,22 +1210,24 @@ check-gcc:
          r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
+         (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
        else \
          true; \
        fi
 
-.PHONY: check-c++
-check-c++:
+.PHONY: check-gcc-c++
+check-gcc-c++:
        @if [ -f ./gcc/Makefile ] ; then \
          r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
-         $(MAKE) check-target-libstdc++-v3; \
+         (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
        else \
          true; \
-       fi 
+       fi
+
+.PHONY: check-c++
+check-c++: check-target-libstdc++-v3 check-gcc-c++
 
 .PHONY: install-gcc maybe-install-gcc
 maybe-install-gcc:
@@ -1152,7 +1236,7 @@ install-gcc:
          r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
+         (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
        else \
          true; \
        fi
@@ -1172,7 +1256,7 @@ gcc-no-fixedincludes:
          r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}` ; export s; \
          $(SET_LIB_PATH) \
-         (cd ./gcc; \
+         (cd ./gcc && \
           $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
          rm -rf gcc/include; \
          mv gcc/tmp-include gcc/include 2>/dev/null; \
@@ -1190,6 +1274,8 @@ gcc-no-fixedincludes:
 # it's safer to use a soft dependency.
 
 # Host modules specific to gcc.
+# GCC needs to identify certain tools.
+configure-gcc: maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
 all-gcc: maybe-all-libiberty maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
 # This is a slightly kludgy method of getting dependencies on 
 # all-build-libiberty correct; it would be better to build it every time.
@@ -1197,12 +1283,16 @@ all-gcc: maybe-all-build-libiberty
 all-bootstrap: maybe-all-libiberty maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
 
 # Host modules specific to gdb.
+# GDB needs to know that the simulator is being built.
+configure-gdb: maybe-configure-tcl maybe-configure-tk maybe-configure-sim
 GDB_TK = @GDB_TK@
 all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK)
 install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
+configure-libgui: maybe-configure-tcl maybe-configure-tk
 all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
 
 # Host modules specific to binutils.
+configure-bfd: configure-libiberty
 all-bfd: maybe-all-libiberty maybe-all-intl
 all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl
 # We put install-opcodes before install-binutils because the installed
@@ -1216,15 +1306,19 @@ all-opcodes: maybe-all-bfd maybe-all-libiberty
 
 # Other host modules in the 'src' repository.
 all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk
+configure-expect: maybe-configure-tcl maybe-configure-tk
 all-expect: maybe-all-tcl maybe-all-tk
+configure-itcl: maybe-configure-tcl maybe-configure-tk
 all-itcl: maybe-all-tcl maybe-all-tk
 # We put install-tcl before install-itcl because itcl wants to run a
 # program on installation which uses the Tcl libraries.
 install-itcl: maybe-install-tcl
 all-sid: maybe-all-tcl maybe-all-tk
 install-sid: maybe-install-tcl maybe-install-tk
-all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline
+all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb
+configure-tk: maybe-configure-tcl
 all-tk: maybe-all-tcl
+configure-tix: maybe-configure-tcl maybe-configure-tk
 all-tix: maybe-all-tcl maybe-all-tk
 all-texinfo: maybe-all-libiberty
 
@@ -1248,7 +1342,6 @@ all-sed: maybe-all-libiberty
 all-send-pr: maybe-all-prms
 all-snavigator: maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-db maybe-all-grep maybe-all-libgui
 all-tar: maybe-all-libiberty
-all-tclX: maybe-all-tcl maybe-all-tk
 all-uudecode: maybe-all-libiberty
 
 ALL_GCC = maybe-all-gcc
@@ -1256,58 +1349,85 @@ ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
 ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
 
 # Target modules specific to gcc.
-$(TARGET_SUBDIR)/boehm-gc/Makefile: $(ALL_GCC_C) maybe-configure-target-qthreads
-$(TARGET_SUBDIR)/fastjar/Makefile: maybe-configure-target-zlib
+configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
+configure-target-fastjar: maybe-configure-target-zlib
 all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
-$(TARGET_SUBDIR)/libf2c/Makefile: $(ALL_GCC_C)
+configure-target-libf2c: $(ALL_GCC_C)
 all-target-libf2c: maybe-all-target-libiberty
-$(TARGET_SUBDIR)/libffi/Makefile: $(ALL_GCC_C) 
-$(TARGET_SUBDIR)/libjava/Makefile: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
+configure-target-libffi: $(ALL_GCC_C) 
+configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi
 all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi
-$(TARGET_SUBDIR)/libobjc/Makefile: $(ALL_GCC_C)
+configure-target-libobjc: $(ALL_GCC_C)
 all-target-libobjc: maybe-all-target-libiberty
-$(TARGET_SUBDIR)/libstdc++-v3/Makefile: $(ALL_GCC_C)
+configure-target-libstdc++-v3: $(ALL_GCC_C)
 all-target-libstdc++-v3: maybe-all-target-libiberty
-$(TARGET_SUBDIR)/zlib/Makefile: $(ALL_GCC_C)
+configure-target-zlib: $(ALL_GCC_C)
 
 # Target modules in the 'src' repository.
-$(TARGET_SUBDIR)/examples/Makefile: $(ALL_GCC_C)
-$(TARGET_SUBDIR)/libgloss/Makefile: $(ALL_GCC)
+configure-target-examples: $(ALL_GCC_C)
+configure-target-libgloss: $(ALL_GCC)
 all-target-libgloss: maybe-configure-target-newlib
-$(TARGET_SUBDIR)/libiberty/Makefile: $(ALL_GCC_C)
-$(TARGET_SUBDIR)/libtermcap/Makefile: $(ALL_GCC_C)
-$(TARGET_SUBDIR)/newlib/Makefile: $(ALL_GCC)
-$(TARGET_SUBDIR)/winsup/Makefile: $(ALL_GCC_C)
+configure-target-libiberty: $(ALL_GCC_C)
+configure-target-libtermcap: $(ALL_GCC_C)
+configure-target-newlib: $(ALL_GCC)
+configure-target-rda: $(ALL_GCC_C)
+configure-target-winsup: $(ALL_GCC_C)
 all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
 
 # Other target modules.  Warning, these are not well tested.
-$(TARGET_SUBDIR)/gperf/Makefile: $(ALL_GCC_CXX)
+configure-target-gperf: $(ALL_GCC_CXX)
 all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
-$(TARGET_SUBDIR)/qthreads/Makefile: $(ALL_GCC_C)
+configure-target-qthreads: $(ALL_GCC_C)
 
 # Dependencies of maybe-foo on foo.  These are used because, for example,
 # all-gcc only depends on all-gas if gas is present and being configured.
 @maybe_dependencies@
 
+# Serialization dependencies.  Host configures don't work well in parallel to
+# each other, due to contention over config.cache.  Target configures and 
+# build configures are similar.
+@serialization_dependencies@
+
 # --------------------------------
 # Regenerating top level configury
 # --------------------------------
 
+# Multilib.out tells target dirs what multilibs they should build.
+# There is really only one copy.  We use the 'timestamp' method to
+# work around various timestamp bugs on some systems.
+# We use move-if-change so that it's only considered updated when it
+# actually changes, because it has to depend on a phony target.
+multilib.out: maybe-all-gcc
+       @r=`${PWD}`; export r; \
+       echo "Checking multilib configuration..."; \
+       $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
+       $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
+
 # Rebuilding Makefile.in, using autogen.
+AUTOGEN = autogen
 $(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
-       cd $(srcdir) && autogen Makefile.def
+       cd $(srcdir) && $(AUTOGEN) Makefile.def
 
-# with the gnu make, this is done automatically.
+# Rebuilding Makefile.
+Makefile: $(srcdir)/Makefile.in config.status
+       CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
-host_makefile_frag=@host_makefile_frag@
-target_makefile_frag=@target_makefile_frag@
-
-Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
-       $(SHELL) ./config.status
+config.status: configure $(gcc_version_trigger)
+       $(SHELL) ./config.status --recheck
 
+# Rebuilding configure.
+AUTOCONF = autoconf
+$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/config/acx.m4
+       cd $(srcdir) && $(AUTOCONF)
 #
 
 .NOEXPORT:
 MAKEOVERRIDES=
 
+# Tell GNU make 3.79 not to run the top level in parallel.  This 
+# prevents contention for $builddir/$target/config.cache, as well
+# as minimizing scatter in file system caches.
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+
 # end of Makefile.in
This page took 0.034562 seconds and 4 git commands to generate.