* Makefile.tpl ($(NOTPARALLEL)): Move to the end. Bring uses of
[deliverable/binutils-gdb.git] / Makefile.in
index e054015dabf685466e7b3551e38a4290089878c0..e1fa0c02b84e5e8d29b16770d6f80354dbc6e0fa 100644 (file)
 # 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@
 
@@ -69,7 +63,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@
@@ -109,7 +104,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.
@@ -117,9 +112,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)
@@ -134,7 +128,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
@@ -219,14 +213,18 @@ TARGET_SUBDIR = @target_subdir@
 BUILD_CONFIGDIRS = libiberty
 BUILD_SUBDIR = @build_subdir@
 
-# This is set by the configure script to the arguments to use when configuring
-# directories built for the target.
-TARGET_CONFIGARGS = @target_configargs@
-
 # This is set by the configure script to the arguments to use when configuring
 # directories built for the build system.
 BUILD_CONFIGARGS = @build_configargs@
 
+# This is set by the configure script to the arguments to use when configuring
+# directories built for the host system.
+HOST_CONFIGARGS = @host_configargs@
+
+# This is set by the configure script to the arguments to use when configuring
+# directories built for the target.
+TARGET_CONFIGARGS = @target_configargs@
+
 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
 # was used.
 SET_LIB_PATH = @SET_LIB_PATH@
@@ -275,7 +273,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`
 
@@ -289,7 +287,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`
 
@@ -301,7 +299,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`
 
@@ -313,7 +311,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`
 
@@ -325,7 +323,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`
 
@@ -341,7 +339,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`
 
@@ -355,7 +353,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`
 
@@ -365,6 +363,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.
@@ -522,27 +524,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 = \
-       configure-target-libstdc++-v3 \
-       configure-target-newlib \
-       configure-target-libf2c \
-       configure-target-libobjc \
-       configure-target-libtermcap \
-       configure-target-winsup \
-       configure-target-libgloss \
-       configure-target-libiberty \
-       configure-target-gperf \
-       configure-target-examples \
-       configure-target-libffi \
-       configure-target-libjava \
-       configure-target-zlib \
-       configure-target-boehm-gc \
-       configure-target-qthreads \
-       configure-target-rda 
-
-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 = \
@@ -606,7 +589,7 @@ CLEAN_MODULES = \
        clean-wdiff \
        clean-zip \
        clean-zlib \
-       clean-utils 
+       clean-utils
 
 # All of the target modules that can be cleaned
 CLEAN_TARGET_MODULES = \
@@ -624,14 +607,13 @@ CLEAN_TARGET_MODULES = \
        clean-target-zlib \
        clean-target-boehm-gc \
        clean-target-qthreads \
-       clean-target-rda 
+       clean-target-rda
 
 # All of the x11 modules that can be cleaned
 CLEAN_X11_MODULES = \
        clean-gdb \
        clean-expect \
        clean-guile \
-       clean-tclX \
        clean-tk \
        clean-tix 
 
@@ -642,6 +624,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
@@ -671,13 +654,13 @@ do-clean:
              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}" \
-                       clean); \
-           then true; else exit 1; fi; \
+                       clean) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -689,13 +672,13 @@ do-clean:
            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}" \
-                       clean); \
-           then true; else exit 1; fi; \
+                       clean) \
+           || exit 1; \
          else true; fi; \
        done
 
@@ -718,13 +701,13 @@ do-distclean:
              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}" \
-                       distclean); \
-           then true; else exit 1; fi; \
+                       distclean) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -736,13 +719,13 @@ do-distclean:
            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}" \
-                       distclean); \
-           then true; else exit 1; fi; \
+                       distclean) \
+           || exit 1; \
          else true; fi; \
        done
 
@@ -765,13 +748,13 @@ do-dvi:
              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}" \
-                       dvi); \
-           then true; else exit 1; fi; \
+                       dvi) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -783,13 +766,13 @@ do-dvi:
            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}" \
-                       dvi); \
-           then true; else exit 1; fi; \
+                       dvi) \
+           || exit 1; \
          else true; fi; \
        done
 
@@ -812,13 +795,13 @@ do-info:
              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}" \
-                       info); \
-           then true; else exit 1; fi; \
+                       info) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -830,13 +813,13 @@ do-info:
            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}" \
-                       info); \
-           then true; else exit 1; fi; \
+                       info) \
+           || exit 1; \
          else true; fi; \
        done
 
@@ -859,13 +842,13 @@ do-install-info:
              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}" \
-                       install-info); \
-           then true; else exit 1; fi; \
+                       install-info) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -877,13 +860,13 @@ do-install-info:
            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}" \
-                       install-info); \
-           then true; else exit 1; fi; \
+                       install-info) \
+           || exit 1; \
          else true; fi; \
        done
 
@@ -906,13 +889,13 @@ do-installcheck:
              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}" \
-                       installcheck); \
-           then true; else exit 1; fi; \
+                       installcheck) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -924,13 +907,13 @@ do-installcheck:
            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}" \
-                       installcheck); \
-           then true; else exit 1; fi; \
+                       installcheck) \
+           || exit 1; \
          else true; fi; \
        done
 
@@ -953,13 +936,13 @@ do-mostlyclean:
              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}" \
-                       mostlyclean); \
-           then true; else exit 1; fi; \
+                       mostlyclean) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -971,13 +954,13 @@ do-mostlyclean:
            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}" \
-                       mostlyclean); \
-           then true; else exit 1; fi; \
+                       mostlyclean) \
+           || exit 1; \
          else true; fi; \
        done
 
@@ -1000,13 +983,13 @@ do-maintainer-clean:
              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}" \
-                       maintainer-clean); \
-           then true; else exit 1; fi; \
+                       maintainer-clean) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -1018,13 +1001,13 @@ do-maintainer-clean:
            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}" \
-                       maintainer-clean); \
-           then true; else exit 1; fi; \
+                       maintainer-clean) \
+           || exit 1; \
          else true; fi; \
        done
 
@@ -1047,13 +1030,13 @@ do-TAGS:
              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}" \
-                       TAGS); \
-           then true; else exit 1; fi; \
+                       TAGS) \
+           || exit 1; \
          else true; fi; \
        done
        # Break into two pieces
@@ -1065,13 +1048,13 @@ do-TAGS:
            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}" \
-                       TAGS); \
-           then true; else exit 1; fi; \
+                       TAGS) \
+           || exit 1; \
          else true; fi; \
        done
 
@@ -1086,8 +1069,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; \
@@ -1100,6 +1084,7 @@ local-clean:
 
 local-distclean:
        -rm -f Makefile config.status config.cache mh-frag mt-frag
+       -rm -f multilib.out multilib.ts multilib.tmp maybedep.tmp serdep.tmp
        -if [ "$(TARGET_SUBDIR)" != "." ]; then \
          rm -rf $(TARGET_SUBDIR); \
        else true; fi
@@ -1128,7 +1113,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
@@ -1141,7 +1126,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
@@ -1186,7 +1171,7 @@ mail-report-with-warnings.log: warning.log
 
 # Installation targets.
 
-.PHONY: install uninstall source-vault binary-vault vault-install
+.PHONY: install uninstall
 install: installdirs @install_host_modules@ @install_target_modules@
 
 install-target: @install_target_modules@
@@ -1194,27 +1179,12 @@ install-target: @install_target_modules@
 uninstall:
        @echo "the uninstall target is not supported in this tree"
 
-source-vault:
-       $(MAKE) -f ./release/Build-A-Release \
-               host=$(host_alias) source-vault
-
-binary-vault:
-       $(MAKE) -f ./release/Build-A-Release \
-               host=$(host_alias) target=$(target_alias)
-
-vault-install:
-       @if [ -f ./release/vault-install ] ; then \
-         ./release/vault-install $(host_alias) $(target_alias) ; \
-       else \
-         true ; \
-       fi
-
 .PHONY: install.all
 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 ; \
@@ -1226,51 +1196,45 @@ install.all: install-no-fixedincludes
 install-no-fixedincludes: installdirs @install_host_modules_nogcc@ \
        @install_target_modules@ gcc-no-fixedincludes
 
-# Install the gcc headers files, but not the fixed include files,
-# which Cygnus is not allowed to distribute.  This rule is very
-# dependent on the workings of the gcc Makefile.in.
-.PHONY: gcc-no-fixedincludes
-gcc-no-fixedincludes:
-       @if [ -f ./gcc/Makefile ]; then \
-         rm -rf gcc/tmp-include; \
-         mv gcc/include gcc/tmp-include 2>/dev/null; \
-         mkdir gcc/include; \
-         cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
-         touch gcc/stmp-fixinc gcc/include/fixed; \
-         rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}` ; export s; \
-         $(SET_LIB_PATH) \
-         (cd ./gcc; \
-          $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
-         rm -rf gcc/include; \
-         mv gcc/tmp-include gcc/include 2>/dev/null; \
-       else true; fi
+### other supporting targets
 
-# These rules are used to build the modules which are built with the
-# build machine's native compiler.
+MAKEDIRS= \
+       $(DESTDIR)$(prefix) \
+       $(DESTDIR)$(exec_prefix)
+.PHONY: installdirs
+installdirs: mkinstalldirs
+       $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
 
-.PHONY: all-build-libiberty maybe-all-build-libiberty
-maybe-all-build-libiberty:
-all-build-libiberty:
-       @if [ -f ./libiberty/Makefile ] ; then \
-         r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
-         (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all); \
-       else \
-         true; \
+dir.info: do-install-info
+       if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
+         $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
+         mv -f dir.info.new dir.info ; \
+       else true ; \
        fi
 
+dist:
+       @echo "Building a full distribution of this tree isn't done"
+       @echo "via 'make dist'.  Check out the etc/ subdirectory" 
+
+etags tags: TAGS
+
+# Right now this just builds TAGS in each subdirectory.  emacs19 has the
+# ability to use several tags files at once, so there is probably no need
+# to combine them into one big TAGS file (like CVS 1.3 does).  We could
+# (if we felt like it) have this Makefile write a piece of elisp which
+# the user could load to tell emacs19 where all the TAGS files we just
+# built are.
+TAGS: do-TAGS
+
+# --------------------------------------
+# Modules which run on the build machine
+# --------------------------------------
+
 .PHONY: configure-build-libiberty maybe-configure-build-libiberty
 maybe-configure-build-libiberty:
-configure-build-libiberty:
-       @if [ ! -d $(BUILD_SUBDIR) ]; then \
-         true; \
-       elif [ -f $(BUILD_SUBDIR)/libiberty/Makefile ] ; then \
-         true; \
-       elif echo " $(BUILD_CONFIGDIRS) " | grep " libiberty " >/dev/null 2>&1; then \
-         if [ -d $(srcdir)/libiberty ]; then \
-           [ -d $(BUILD_SUBDIR)/libiberty ] || mkdir $(BUILD_SUBDIR)/libiberty;\
+configure-build-libiberty: $(BUILD_SUBDIR)/libiberty/Makefile
+$(BUILD_SUBDIR)/libiberty/Makefile: config.status
+       @[ -d $(BUILD_SUBDIR)/libiberty ] || mkdir $(BUILD_SUBDIR)/libiberty;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            AR="$(AR_FOR_BUILD)"; export AR; \
@@ -1325,25 +1289,68 @@ configure-build-libiberty:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(BUILD_CONFIGARGS) $${srcdiroption} \
              --with-build-subdir="$(BUILD_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi; \
-       else \
-         true; \
-       fi
+             || exit 1
+
+.PHONY: all-build-libiberty maybe-all-build-libiberty
+maybe-all-build-libiberty:
+all-build-libiberty: configure-build-libiberty
+       @r=`${PWD}`; export r; \
+         s=`cd $(srcdir); ${PWD}`; export s; \
+         (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all)
 
 
-# These rules are used to build the modules which use FLAGS_TO_PASS.  To
-# build a target all-X means to cd to X and make all.
+# --------------------------------------
+# Modules which run on the host machine
+# --------------------------------------
+
+.PHONY: configure-ash maybe-configure-ash
+maybe-configure-ash:
+configure-ash: ash/Makefile
+
+ash/Makefile: config.status
+       @[ -d ash ] || mkdir ash; \
+       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 ash; \
+       cd ash || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/ash"; \
+           libsrcdir="$$s/ash";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/ash"; \
+           libsrcdir="$$s/ash";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-ash maybe-all-ash
 maybe-all-ash:
-all-ash:
+all-ash: configure-ash
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd ash; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd ash && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-ash
@@ -1351,7 +1358,7 @@ check-ash:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd ash; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd ash && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1361,16 +1368,57 @@ install-ash: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd ash; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd ash && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-autoconf maybe-configure-autoconf
+maybe-configure-autoconf:
+configure-autoconf: autoconf/Makefile
 
+autoconf/Makefile: config.status
+       @[ -d autoconf ] || mkdir autoconf; \
+       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 autoconf; \
+       cd autoconf || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/autoconf"; \
+           libsrcdir="$$s/autoconf";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/autoconf"; \
+           libsrcdir="$$s/autoconf";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-autoconf maybe-all-autoconf
 maybe-all-autoconf:
-all-autoconf:
+all-autoconf: configure-autoconf
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd autoconf; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-autoconf
@@ -1378,7 +1426,7 @@ check-autoconf:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd autoconf; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1388,16 +1436,57 @@ install-autoconf: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd autoconf; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-automake maybe-configure-automake
+maybe-configure-automake:
+configure-automake: automake/Makefile
+
+automake/Makefile: config.status
+       @[ -d automake ] || mkdir automake; \
+       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 automake; \
+       cd automake || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/automake"; \
+           libsrcdir="$$s/automake";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/automake"; \
+           libsrcdir="$$s/automake";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-automake maybe-all-automake
 maybe-all-automake:
-all-automake:
+all-automake: configure-automake
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd automake; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd automake && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-automake
@@ -1405,7 +1494,7 @@ check-automake:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd automake; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd automake && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1415,16 +1504,57 @@ install-automake: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd automake; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd automake && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-bash maybe-configure-bash
+maybe-configure-bash:
+configure-bash: bash/Makefile
 
+bash/Makefile: config.status
+       @[ -d bash ] || mkdir bash; \
+       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 bash; \
+       cd bash || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/bash"; \
+           libsrcdir="$$s/bash";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/bash"; \
+           libsrcdir="$$s/bash";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-bash maybe-all-bash
 maybe-all-bash:
-all-bash:
+all-bash: configure-bash
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bash; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd bash && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-bash
@@ -1432,7 +1562,7 @@ check-bash:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bash; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd bash && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1442,16 +1572,57 @@ install-bash: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bash; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd bash && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-bfd maybe-configure-bfd
+maybe-configure-bfd:
+configure-bfd: bfd/Makefile
+
+bfd/Makefile: config.status
+       @[ -d bfd ] || mkdir bfd; \
+       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 bfd; \
+       cd bfd || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/bfd"; \
+           libsrcdir="$$s/bfd";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/bfd"; \
+           libsrcdir="$$s/bfd";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-bfd maybe-all-bfd
 maybe-all-bfd:
-all-bfd:
+all-bfd: configure-bfd
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bfd; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-bfd
@@ -1459,7 +1630,7 @@ check-bfd:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bfd; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1469,16 +1640,57 @@ install-bfd: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bfd; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-opcodes maybe-configure-opcodes
+maybe-configure-opcodes:
+configure-opcodes: opcodes/Makefile
 
+opcodes/Makefile: config.status
+       @[ -d opcodes ] || mkdir opcodes; \
+       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 opcodes; \
+       cd opcodes || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/opcodes"; \
+           libsrcdir="$$s/opcodes";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/opcodes"; \
+           libsrcdir="$$s/opcodes";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-opcodes maybe-all-opcodes
 maybe-all-opcodes:
-all-opcodes:
+all-opcodes: configure-opcodes
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd opcodes; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-opcodes
@@ -1486,7 +1698,7 @@ check-opcodes:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd opcodes; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1496,16 +1708,57 @@ install-opcodes: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd opcodes; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-binutils maybe-configure-binutils
+maybe-configure-binutils:
+configure-binutils: binutils/Makefile
+
+binutils/Makefile: config.status
+       @[ -d binutils ] || mkdir binutils; \
+       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 binutils; \
+       cd binutils || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/binutils"; \
+           libsrcdir="$$s/binutils";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/binutils"; \
+           libsrcdir="$$s/binutils";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-binutils maybe-all-binutils
 maybe-all-binutils:
-all-binutils:
+all-binutils: configure-binutils
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd binutils; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-binutils
@@ -1513,7 +1766,7 @@ check-binutils:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd binutils; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1523,16 +1776,57 @@ install-binutils: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd binutils; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-bison maybe-configure-bison
+maybe-configure-bison:
+configure-bison: bison/Makefile
 
+bison/Makefile: config.status
+       @[ -d bison ] || mkdir bison; \
+       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 bison; \
+       cd bison || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/bison"; \
+           libsrcdir="$$s/bison";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/bison"; \
+           libsrcdir="$$s/bison";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-bison maybe-all-bison
 maybe-all-bison:
-all-bison:
+all-bison: configure-bison
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bison; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd bison && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-bison
@@ -1542,7 +1836,7 @@ check-bison:
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
-           (cd bison; $(MAKE) $(FLAGS_TO_PASS) check); \
+           (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
 
 
@@ -1553,16 +1847,57 @@ install-bison: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bison; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd bison && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-byacc maybe-configure-byacc
+maybe-configure-byacc:
+configure-byacc: byacc/Makefile
+
+byacc/Makefile: config.status
+       @[ -d byacc ] || mkdir byacc; \
+       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 byacc; \
+       cd byacc || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/byacc"; \
+           libsrcdir="$$s/byacc";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/byacc"; \
+           libsrcdir="$$s/byacc";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-byacc maybe-all-byacc
 maybe-all-byacc:
-all-byacc:
+all-byacc: configure-byacc
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd byacc; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-byacc
@@ -1572,7 +1907,7 @@ check-byacc:
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
-           (cd byacc; $(MAKE) $(FLAGS_TO_PASS) check); \
+           (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
 
 
@@ -1583,16 +1918,57 @@ install-byacc: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd byacc; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-bzip2 maybe-configure-bzip2
+maybe-configure-bzip2:
+configure-bzip2: bzip2/Makefile
 
+bzip2/Makefile: config.status
+       @[ -d bzip2 ] || mkdir bzip2; \
+       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 bzip2; \
+       cd bzip2 || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/bzip2"; \
+           libsrcdir="$$s/bzip2";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/bzip2"; \
+           libsrcdir="$$s/bzip2";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-bzip2 maybe-all-bzip2
 maybe-all-bzip2:
-all-bzip2:
+all-bzip2: configure-bzip2
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bzip2; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-bzip2
@@ -1600,7 +1976,7 @@ check-bzip2:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bzip2; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1610,16 +1986,57 @@ install-bzip2: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd bzip2; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-db maybe-configure-db
+maybe-configure-db:
+configure-db: db/Makefile
+
+db/Makefile: config.status
+       @[ -d db ] || mkdir db; \
+       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 db; \
+       cd db || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/db"; \
+           libsrcdir="$$s/db";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/db"; \
+           libsrcdir="$$s/db";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-db maybe-all-db
 maybe-all-db:
-all-db:
+all-db: configure-db
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd db; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd db && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-db
@@ -1627,7 +2044,7 @@ check-db:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd db; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd db && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1637,16 +2054,57 @@ install-db: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd db; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd db && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-dejagnu maybe-configure-dejagnu
+maybe-configure-dejagnu:
+configure-dejagnu: dejagnu/Makefile
 
+dejagnu/Makefile: config.status
+       @[ -d dejagnu ] || mkdir dejagnu; \
+       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 dejagnu; \
+       cd dejagnu || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/dejagnu"; \
+           libsrcdir="$$s/dejagnu";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/dejagnu"; \
+           libsrcdir="$$s/dejagnu";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-dejagnu maybe-all-dejagnu
 maybe-all-dejagnu:
-all-dejagnu:
+all-dejagnu: configure-dejagnu
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd dejagnu; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-dejagnu
@@ -1654,7 +2112,7 @@ check-dejagnu:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd dejagnu; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1664,16 +2122,57 @@ install-dejagnu: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd dejagnu; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-diff maybe-configure-diff
+maybe-configure-diff:
+configure-diff: diff/Makefile
+
+diff/Makefile: config.status
+       @[ -d diff ] || mkdir diff; \
+       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 diff; \
+       cd diff || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/diff"; \
+           libsrcdir="$$s/diff";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/diff"; \
+           libsrcdir="$$s/diff";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-diff maybe-all-diff
 maybe-all-diff:
-all-diff:
+all-diff: configure-diff
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd diff; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd diff && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-diff
@@ -1681,7 +2180,7 @@ check-diff:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd diff; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd diff && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1691,16 +2190,57 @@ install-diff: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd diff; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd diff && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-dosutils maybe-configure-dosutils
+maybe-configure-dosutils:
+configure-dosutils: dosutils/Makefile
 
+dosutils/Makefile: config.status
+       @[ -d dosutils ] || mkdir dosutils; \
+       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 dosutils; \
+       cd dosutils || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/dosutils"; \
+           libsrcdir="$$s/dosutils";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/dosutils"; \
+           libsrcdir="$$s/dosutils";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-dosutils maybe-all-dosutils
 maybe-all-dosutils:
-all-dosutils:
+all-dosutils: configure-dosutils
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd dosutils; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-dosutils
@@ -1714,16 +2254,57 @@ install-dosutils: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd dosutils; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-etc maybe-configure-etc
+maybe-configure-etc:
+configure-etc: etc/Makefile
+
+etc/Makefile: config.status
+       @[ -d etc ] || mkdir etc; \
+       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 etc; \
+       cd etc || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/etc"; \
+           libsrcdir="$$s/etc";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/etc"; \
+           libsrcdir="$$s/etc";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-etc maybe-all-etc
 maybe-all-etc:
-all-etc:
+all-etc: configure-etc
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd etc; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd etc && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-etc
@@ -1731,7 +2312,7 @@ check-etc:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd etc; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd etc && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1741,16 +2322,57 @@ install-etc: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd etc; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd etc && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-fastjar maybe-configure-fastjar
+maybe-configure-fastjar:
+configure-fastjar: fastjar/Makefile
 
+fastjar/Makefile: config.status
+       @[ -d fastjar ] || mkdir fastjar; \
+       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 fastjar; \
+       cd fastjar || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/fastjar"; \
+           libsrcdir="$$s/fastjar";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/fastjar"; \
+           libsrcdir="$$s/fastjar";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-fastjar maybe-all-fastjar
 maybe-all-fastjar:
-all-fastjar:
+all-fastjar: configure-fastjar
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd fastjar; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-fastjar
@@ -1760,7 +2382,7 @@ check-fastjar:
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
-           (cd fastjar; $(MAKE) $(FLAGS_TO_PASS) check); \
+           (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
 
 
@@ -1771,16 +2393,57 @@ install-fastjar: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd fastjar; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-fileutils maybe-configure-fileutils
+maybe-configure-fileutils:
+configure-fileutils: fileutils/Makefile
+
+fileutils/Makefile: config.status
+       @[ -d fileutils ] || mkdir fileutils; \
+       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 fileutils; \
+       cd fileutils || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/fileutils"; \
+           libsrcdir="$$s/fileutils";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/fileutils"; \
+           libsrcdir="$$s/fileutils";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-fileutils maybe-all-fileutils
 maybe-all-fileutils:
-all-fileutils:
+all-fileutils: configure-fileutils
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd fileutils; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-fileutils
@@ -1788,7 +2451,7 @@ check-fileutils:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd fileutils; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1798,16 +2461,57 @@ install-fileutils: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd fileutils; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-findutils maybe-configure-findutils
+maybe-configure-findutils:
+configure-findutils: findutils/Makefile
 
+findutils/Makefile: config.status
+       @[ -d findutils ] || mkdir findutils; \
+       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 findutils; \
+       cd findutils || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/findutils"; \
+           libsrcdir="$$s/findutils";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/findutils"; \
+           libsrcdir="$$s/findutils";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-findutils maybe-all-findutils
 maybe-all-findutils:
-all-findutils:
+all-findutils: configure-findutils
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd findutils; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-findutils
@@ -1815,7 +2519,7 @@ check-findutils:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd findutils; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1825,16 +2529,57 @@ install-findutils: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd findutils; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-find maybe-configure-find
+maybe-configure-find:
+configure-find: find/Makefile
+
+find/Makefile: config.status
+       @[ -d find ] || mkdir find; \
+       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 find; \
+       cd find || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/find"; \
+           libsrcdir="$$s/find";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/find"; \
+           libsrcdir="$$s/find";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-find maybe-all-find
 maybe-all-find:
-all-find:
+all-find: configure-find
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd find; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd find && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-find
@@ -1842,7 +2587,7 @@ check-find:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd find; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd find && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1852,16 +2597,57 @@ install-find: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd find; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd find && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-flex maybe-configure-flex
+maybe-configure-flex:
+configure-flex: flex/Makefile
 
+flex/Makefile: config.status
+       @[ -d flex ] || mkdir flex; \
+       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 flex; \
+       cd flex || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/flex"; \
+           libsrcdir="$$s/flex";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/flex"; \
+           libsrcdir="$$s/flex";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-flex maybe-all-flex
 maybe-all-flex:
-all-flex:
+all-flex: configure-flex
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd flex; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd flex && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-flex
@@ -1871,7 +2657,7 @@ check-flex:
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
-           (cd flex; $(MAKE) $(FLAGS_TO_PASS) check); \
+           (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
 
 
@@ -1882,16 +2668,57 @@ install-flex: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd flex; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd flex && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-gas maybe-configure-gas
+maybe-configure-gas:
+configure-gas: gas/Makefile
+
+gas/Makefile: config.status
+       @[ -d gas ] || mkdir gas; \
+       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 gas; \
+       cd gas || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/gas"; \
+           libsrcdir="$$s/gas";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/gas"; \
+           libsrcdir="$$s/gas";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-gas maybe-all-gas
 maybe-all-gas:
-all-gas:
+all-gas: configure-gas
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gas; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd gas && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gas
@@ -1899,7 +2726,7 @@ check-gas:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gas; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd gas && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1909,16 +2736,57 @@ install-gas: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gas; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd gas && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-gawk maybe-configure-gawk
+maybe-configure-gawk:
+configure-gawk: gawk/Makefile
 
+gawk/Makefile: config.status
+       @[ -d gawk ] || mkdir gawk; \
+       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 gawk; \
+       cd gawk || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/gawk"; \
+           libsrcdir="$$s/gawk";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/gawk"; \
+           libsrcdir="$$s/gawk";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-gawk maybe-all-gawk
 maybe-all-gawk:
-all-gawk:
+all-gawk: configure-gawk
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gawk; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gawk
@@ -1926,7 +2794,7 @@ check-gawk:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gawk; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1936,16 +2804,57 @@ install-gawk: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gawk; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-gettext maybe-configure-gettext
+maybe-configure-gettext:
+configure-gettext: gettext/Makefile
+
+gettext/Makefile: config.status
+       @[ -d gettext ] || mkdir gettext; \
+       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 gettext; \
+       cd gettext || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/gettext"; \
+           libsrcdir="$$s/gettext";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/gettext"; \
+           libsrcdir="$$s/gettext";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-gettext maybe-all-gettext
 maybe-all-gettext:
-all-gettext:
+all-gettext: configure-gettext
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gettext; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gettext
@@ -1953,7 +2862,7 @@ check-gettext:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gettext; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1963,16 +2872,57 @@ install-gettext: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gettext; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-gnuserv maybe-configure-gnuserv
+maybe-configure-gnuserv:
+configure-gnuserv: gnuserv/Makefile
 
+gnuserv/Makefile: config.status
+       @[ -d gnuserv ] || mkdir gnuserv; \
+       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 gnuserv; \
+       cd gnuserv || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/gnuserv"; \
+           libsrcdir="$$s/gnuserv";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/gnuserv"; \
+           libsrcdir="$$s/gnuserv";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-gnuserv maybe-all-gnuserv
 maybe-all-gnuserv:
-all-gnuserv:
+all-gnuserv: configure-gnuserv
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gnuserv; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gnuserv
@@ -1980,7 +2930,7 @@ check-gnuserv:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gnuserv; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -1990,16 +2940,57 @@ install-gnuserv: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gnuserv; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-gprof maybe-configure-gprof
+maybe-configure-gprof:
+configure-gprof: gprof/Makefile
+
+gprof/Makefile: config.status
+       @[ -d gprof ] || mkdir gprof; \
+       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 gprof; \
+       cd gprof || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/gprof"; \
+           libsrcdir="$$s/gprof";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/gprof"; \
+           libsrcdir="$$s/gprof";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-gprof maybe-all-gprof
 maybe-all-gprof:
-all-gprof:
+all-gprof: configure-gprof
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gprof; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gprof
@@ -2007,7 +2998,7 @@ check-gprof:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gprof; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2017,16 +3008,57 @@ install-gprof: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gprof; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-grep maybe-configure-grep
+maybe-configure-grep:
+configure-grep: grep/Makefile
 
+grep/Makefile: config.status
+       @[ -d grep ] || mkdir grep; \
+       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 grep; \
+       cd grep || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/grep"; \
+           libsrcdir="$$s/grep";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/grep"; \
+           libsrcdir="$$s/grep";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-grep maybe-all-grep
 maybe-all-grep:
-all-grep:
+all-grep: configure-grep
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd grep; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd grep && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-grep
@@ -2034,7 +3066,7 @@ check-grep:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd grep; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd grep && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2044,16 +3076,57 @@ install-grep: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd grep; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd grep && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-gzip maybe-configure-gzip
+maybe-configure-gzip:
+configure-gzip: gzip/Makefile
+
+gzip/Makefile: config.status
+       @[ -d gzip ] || mkdir gzip; \
+       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 gzip; \
+       cd gzip || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/gzip"; \
+           libsrcdir="$$s/gzip";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/gzip"; \
+           libsrcdir="$$s/gzip";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-gzip maybe-all-gzip
 maybe-all-gzip:
-all-gzip:
+all-gzip: configure-gzip
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gzip; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gzip
@@ -2061,7 +3134,7 @@ check-gzip:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gzip; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2071,16 +3144,57 @@ install-gzip: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gzip; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-hello maybe-configure-hello
+maybe-configure-hello:
+configure-hello: hello/Makefile
 
+hello/Makefile: config.status
+       @[ -d hello ] || mkdir hello; \
+       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 hello; \
+       cd hello || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/hello"; \
+           libsrcdir="$$s/hello";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/hello"; \
+           libsrcdir="$$s/hello";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-hello maybe-all-hello
 maybe-all-hello:
-all-hello:
+all-hello: configure-hello
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd hello; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd hello && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-hello
@@ -2088,7 +3202,7 @@ check-hello:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd hello; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd hello && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2098,16 +3212,57 @@ install-hello: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd hello; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd hello && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
-.PHONY: all-indent maybe-all-indent
-maybe-all-indent:
-all-indent:
-       @r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
+.PHONY: configure-indent maybe-configure-indent
+maybe-configure-indent:
+configure-indent: indent/Makefile
+
+indent/Makefile: config.status
+       @[ -d indent ] || mkdir indent; \
+       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 indent; \
+       cd indent || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/indent"; \
+           libsrcdir="$$s/indent";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/indent"; \
+           libsrcdir="$$s/indent";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
+.PHONY: all-indent maybe-all-indent
+maybe-all-indent:
+all-indent: configure-indent
+       @r=`${PWD}`; export r; \
+         s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd indent; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd indent && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-indent
@@ -2115,7 +3270,7 @@ check-indent:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd indent; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd indent && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2125,16 +3280,57 @@ install-indent: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd indent; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd indent && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-intl maybe-configure-intl
+maybe-configure-intl:
+configure-intl: intl/Makefile
 
+intl/Makefile: config.status
+       @[ -d intl ] || mkdir intl; \
+       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 intl; \
+       cd intl || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/intl"; \
+           libsrcdir="$$s/intl";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/intl"; \
+           libsrcdir="$$s/intl";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-intl maybe-all-intl
 maybe-all-intl:
-all-intl:
+all-intl: configure-intl
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd intl; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd intl && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-intl
@@ -2142,7 +3338,7 @@ check-intl:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd intl; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd intl && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2152,16 +3348,57 @@ install-intl: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd intl; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd intl && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-tcl maybe-configure-tcl
+maybe-configure-tcl:
+configure-tcl: tcl/Makefile
+
+tcl/Makefile: config.status
+       @[ -d tcl ] || mkdir tcl; \
+       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 tcl; \
+       cd tcl || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/tcl"; \
+           libsrcdir="$$s/tcl";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/tcl"; \
+           libsrcdir="$$s/tcl";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-tcl maybe-all-tcl
 maybe-all-tcl:
-all-tcl:
+all-tcl: configure-tcl
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tcl; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-tcl
@@ -2169,7 +3406,7 @@ check-tcl:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tcl; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2179,16 +3416,57 @@ install-tcl: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tcl; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-itcl maybe-configure-itcl
+maybe-configure-itcl:
+configure-itcl: itcl/Makefile
 
+itcl/Makefile: config.status
+       @[ -d itcl ] || mkdir itcl; \
+       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 itcl; \
+       cd itcl || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/itcl"; \
+           libsrcdir="$$s/itcl";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/itcl"; \
+           libsrcdir="$$s/itcl";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-itcl maybe-all-itcl
 maybe-all-itcl:
-all-itcl:
+all-itcl: configure-itcl
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd itcl; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-itcl
@@ -2196,7 +3474,7 @@ check-itcl:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd itcl; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2206,16 +3484,57 @@ install-itcl: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd itcl; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-ld maybe-configure-ld
+maybe-configure-ld:
+configure-ld: ld/Makefile
+
+ld/Makefile: config.status
+       @[ -d ld ] || mkdir ld; \
+       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 ld; \
+       cd ld || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/ld"; \
+           libsrcdir="$$s/ld";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/ld"; \
+           libsrcdir="$$s/ld";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-ld maybe-all-ld
 maybe-all-ld:
-all-ld:
+all-ld: configure-ld
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd ld; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd ld && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-ld
@@ -2223,7 +3542,7 @@ check-ld:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd ld; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd ld && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2233,16 +3552,57 @@ install-ld: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd ld; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd ld && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-libgui maybe-configure-libgui
+maybe-configure-libgui:
+configure-libgui: libgui/Makefile
 
+libgui/Makefile: config.status
+       @[ -d libgui ] || mkdir libgui; \
+       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 libgui; \
+       cd libgui || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/libgui"; \
+           libsrcdir="$$s/libgui";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/libgui"; \
+           libsrcdir="$$s/libgui";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-libgui maybe-all-libgui
 maybe-all-libgui:
-all-libgui:
+all-libgui: configure-libgui
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libgui; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-libgui
@@ -2250,7 +3610,7 @@ check-libgui:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libgui; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2260,16 +3620,57 @@ install-libgui: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libgui; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-libiberty maybe-configure-libiberty
+maybe-configure-libiberty:
+configure-libiberty: libiberty/Makefile
+
+libiberty/Makefile: config.status
+       @[ -d libiberty ] || mkdir libiberty; \
+       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 libiberty; \
+       cd libiberty || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/libiberty"; \
+           libsrcdir="$$s/libiberty";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/libiberty"; \
+           libsrcdir="$$s/libiberty";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-libiberty maybe-all-libiberty
 maybe-all-libiberty:
-all-libiberty:
+all-libiberty: configure-libiberty
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libiberty; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-libiberty
@@ -2277,7 +3678,7 @@ check-libiberty:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libiberty; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2287,16 +3688,57 @@ install-libiberty: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libiberty; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-libtool maybe-configure-libtool
+maybe-configure-libtool:
+configure-libtool: libtool/Makefile
 
+libtool/Makefile: config.status
+       @[ -d libtool ] || mkdir libtool; \
+       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 libtool; \
+       cd libtool || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/libtool"; \
+           libsrcdir="$$s/libtool";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/libtool"; \
+           libsrcdir="$$s/libtool";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-libtool maybe-all-libtool
 maybe-all-libtool:
-all-libtool:
+all-libtool: configure-libtool
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libtool; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-libtool
@@ -2304,7 +3746,7 @@ check-libtool:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libtool; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2314,16 +3756,57 @@ install-libtool: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libtool; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-m4 maybe-configure-m4
+maybe-configure-m4:
+configure-m4: m4/Makefile
+
+m4/Makefile: config.status
+       @[ -d m4 ] || mkdir m4; \
+       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 m4; \
+       cd m4 || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/m4"; \
+           libsrcdir="$$s/m4";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/m4"; \
+           libsrcdir="$$s/m4";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-m4 maybe-all-m4
 maybe-all-m4:
-all-m4:
+all-m4: configure-m4
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd m4; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-m4
@@ -2331,7 +3814,7 @@ check-m4:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd m4; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2341,16 +3824,57 @@ install-m4: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd m4; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-make maybe-configure-make
+maybe-configure-make:
+configure-make: make/Makefile
 
+make/Makefile: config.status
+       @[ -d make ] || mkdir make; \
+       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 make; \
+       cd make || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/make"; \
+           libsrcdir="$$s/make";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/make"; \
+           libsrcdir="$$s/make";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-make maybe-all-make
 maybe-all-make:
-all-make:
+all-make: configure-make
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd make; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd make && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-make
@@ -2358,7 +3882,7 @@ check-make:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd make; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd make && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2368,16 +3892,57 @@ install-make: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd make; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd make && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-mmalloc maybe-configure-mmalloc
+maybe-configure-mmalloc:
+configure-mmalloc: mmalloc/Makefile
+
+mmalloc/Makefile: config.status
+       @[ -d mmalloc ] || mkdir mmalloc; \
+       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 mmalloc; \
+       cd mmalloc || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/mmalloc"; \
+           libsrcdir="$$s/mmalloc";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/mmalloc"; \
+           libsrcdir="$$s/mmalloc";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-mmalloc maybe-all-mmalloc
 maybe-all-mmalloc:
-all-mmalloc:
+all-mmalloc: configure-mmalloc
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd mmalloc; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-mmalloc
@@ -2391,16 +3956,57 @@ install-mmalloc: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd mmalloc; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-patch maybe-configure-patch
+maybe-configure-patch:
+configure-patch: patch/Makefile
 
+patch/Makefile: config.status
+       @[ -d patch ] || mkdir patch; \
+       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 patch; \
+       cd patch || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/patch"; \
+           libsrcdir="$$s/patch";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/patch"; \
+           libsrcdir="$$s/patch";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-patch maybe-all-patch
 maybe-all-patch:
-all-patch:
+all-patch: configure-patch
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd patch; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd patch && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-patch
@@ -2408,7 +4014,7 @@ check-patch:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd patch; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd patch && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2418,16 +4024,57 @@ install-patch: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd patch; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd patch && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-perl maybe-configure-perl
+maybe-configure-perl:
+configure-perl: perl/Makefile
+
+perl/Makefile: config.status
+       @[ -d perl ] || mkdir perl; \
+       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 perl; \
+       cd perl || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/perl"; \
+           libsrcdir="$$s/perl";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/perl"; \
+           libsrcdir="$$s/perl";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-perl maybe-all-perl
 maybe-all-perl:
-all-perl:
+all-perl: configure-perl
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd perl; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd perl && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-perl
@@ -2435,7 +4082,7 @@ check-perl:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd perl; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd perl && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2445,16 +4092,57 @@ install-perl: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd perl; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd perl && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-prms maybe-configure-prms
+maybe-configure-prms:
+configure-prms: prms/Makefile
 
+prms/Makefile: config.status
+       @[ -d prms ] || mkdir prms; \
+       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 prms; \
+       cd prms || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/prms"; \
+           libsrcdir="$$s/prms";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/prms"; \
+           libsrcdir="$$s/prms";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-prms maybe-all-prms
 maybe-all-prms:
-all-prms:
+all-prms: configure-prms
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd prms; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd prms && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-prms
@@ -2462,7 +4150,7 @@ check-prms:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd prms; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd prms && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2472,16 +4160,57 @@ install-prms: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd prms; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd prms && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-rcs maybe-configure-rcs
+maybe-configure-rcs:
+configure-rcs: rcs/Makefile
+
+rcs/Makefile: config.status
+       @[ -d rcs ] || mkdir rcs; \
+       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 rcs; \
+       cd rcs || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/rcs"; \
+           libsrcdir="$$s/rcs";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/rcs"; \
+           libsrcdir="$$s/rcs";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-rcs maybe-all-rcs
 maybe-all-rcs:
-all-rcs:
+all-rcs: configure-rcs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd rcs; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-rcs
@@ -2489,7 +4218,7 @@ check-rcs:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd rcs; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2499,16 +4228,57 @@ install-rcs: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd rcs; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-readline maybe-configure-readline
+maybe-configure-readline:
+configure-readline: readline/Makefile
 
+readline/Makefile: config.status
+       @[ -d readline ] || mkdir readline; \
+       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 readline; \
+       cd readline || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/readline"; \
+           libsrcdir="$$s/readline";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/readline"; \
+           libsrcdir="$$s/readline";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-readline maybe-all-readline
 maybe-all-readline:
-all-readline:
+all-readline: configure-readline
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd readline; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd readline && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-readline
@@ -2516,7 +4286,7 @@ check-readline:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd readline; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd readline && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2526,16 +4296,57 @@ install-readline: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd readline; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd readline && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-release maybe-configure-release
+maybe-configure-release:
+configure-release: release/Makefile
+
+release/Makefile: config.status
+       @[ -d release ] || mkdir release; \
+       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 release; \
+       cd release || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/release"; \
+           libsrcdir="$$s/release";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/release"; \
+           libsrcdir="$$s/release";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-release maybe-all-release
 maybe-all-release:
-all-release:
+all-release: configure-release
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd release; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd release && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-release
@@ -2548,13 +4359,54 @@ maybe-install-release:
 install-release:
 
 
+.PHONY: configure-recode maybe-configure-recode
+maybe-configure-recode:
+configure-recode: recode/Makefile
+
+recode/Makefile: config.status
+       @[ -d recode ] || mkdir recode; \
+       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 recode; \
+       cd recode || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/recode"; \
+           libsrcdir="$$s/recode";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/recode"; \
+           libsrcdir="$$s/recode";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-recode maybe-all-recode
 maybe-all-recode:
-all-recode:
+all-recode: configure-recode
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd recode; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd recode && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-recode
@@ -2562,7 +4414,7 @@ check-recode:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd recode; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd recode && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2572,16 +4424,57 @@ install-recode: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd recode; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd recode && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-sed maybe-configure-sed
+maybe-configure-sed:
+configure-sed: sed/Makefile
+
+sed/Makefile: config.status
+       @[ -d sed ] || mkdir sed; \
+       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 sed; \
+       cd sed || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/sed"; \
+           libsrcdir="$$s/sed";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/sed"; \
+           libsrcdir="$$s/sed";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-sed maybe-all-sed
 maybe-all-sed:
-all-sed:
+all-sed: configure-sed
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd sed; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd sed && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-sed
@@ -2589,7 +4482,7 @@ check-sed:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd sed; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd sed && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2599,16 +4492,57 @@ install-sed: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd sed; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd sed && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-send-pr maybe-configure-send-pr
+maybe-configure-send-pr:
+configure-send-pr: send-pr/Makefile
 
+send-pr/Makefile: config.status
+       @[ -d send-pr ] || mkdir send-pr; \
+       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 send-pr; \
+       cd send-pr || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/send-pr"; \
+           libsrcdir="$$s/send-pr";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/send-pr"; \
+           libsrcdir="$$s/send-pr";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-send-pr maybe-all-send-pr
 maybe-all-send-pr:
-all-send-pr:
+all-send-pr: configure-send-pr
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd send-pr; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-send-pr
@@ -2616,7 +4550,7 @@ check-send-pr:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd send-pr; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2626,16 +4560,57 @@ install-send-pr: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd send-pr; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-shellutils maybe-configure-shellutils
+maybe-configure-shellutils:
+configure-shellutils: shellutils/Makefile
+
+shellutils/Makefile: config.status
+       @[ -d shellutils ] || mkdir shellutils; \
+       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 shellutils; \
+       cd shellutils || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/shellutils"; \
+           libsrcdir="$$s/shellutils";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/shellutils"; \
+           libsrcdir="$$s/shellutils";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-shellutils maybe-all-shellutils
 maybe-all-shellutils:
-all-shellutils:
+all-shellutils: configure-shellutils
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd shellutils; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-shellutils
@@ -2643,7 +4618,7 @@ check-shellutils:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd shellutils; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2653,16 +4628,57 @@ install-shellutils: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd shellutils; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-sid maybe-configure-sid
+maybe-configure-sid:
+configure-sid: sid/Makefile
 
+sid/Makefile: config.status
+       @[ -d sid ] || mkdir sid; \
+       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 sid; \
+       cd sid || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/sid"; \
+           libsrcdir="$$s/sid";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/sid"; \
+           libsrcdir="$$s/sid";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-sid maybe-all-sid
 maybe-all-sid:
-all-sid:
+all-sid: configure-sid
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd sid; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd sid && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-sid
@@ -2670,7 +4686,7 @@ check-sid:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd sid; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd sid && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2680,16 +4696,57 @@ install-sid: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd sid; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd sid && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-sim maybe-configure-sim
+maybe-configure-sim:
+configure-sim: sim/Makefile
+
+sim/Makefile: config.status
+       @[ -d sim ] || mkdir sim; \
+       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 sim; \
+       cd sim || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/sim"; \
+           libsrcdir="$$s/sim";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/sim"; \
+           libsrcdir="$$s/sim";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-sim maybe-all-sim
 maybe-all-sim:
-all-sim:
+all-sim: configure-sim
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd sim; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd sim && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-sim
@@ -2697,7 +4754,7 @@ check-sim:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd sim; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd sim && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2707,16 +4764,57 @@ install-sim: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd sim; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd sim && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-snavigator maybe-configure-snavigator
+maybe-configure-snavigator:
+configure-snavigator: snavigator/Makefile
 
+snavigator/Makefile: config.status
+       @[ -d snavigator ] || mkdir snavigator; \
+       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 snavigator; \
+       cd snavigator || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/snavigator"; \
+           libsrcdir="$$s/snavigator";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/snavigator"; \
+           libsrcdir="$$s/snavigator";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-snavigator maybe-all-snavigator
 maybe-all-snavigator:
-all-snavigator:
+all-snavigator: configure-snavigator
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd snavigator; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd snavigator && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-snavigator
@@ -2724,7 +4822,7 @@ check-snavigator:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd snavigator; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd snavigator && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2734,16 +4832,57 @@ install-snavigator: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd snavigator; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd snavigator && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-tar maybe-configure-tar
+maybe-configure-tar:
+configure-tar: tar/Makefile
+
+tar/Makefile: config.status
+       @[ -d tar ] || mkdir tar; \
+       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 tar; \
+       cd tar || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/tar"; \
+           libsrcdir="$$s/tar";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/tar"; \
+           libsrcdir="$$s/tar";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-tar maybe-all-tar
 maybe-all-tar:
-all-tar:
+all-tar: configure-tar
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tar; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd tar && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-tar
@@ -2751,7 +4890,7 @@ check-tar:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tar; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd tar && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2761,16 +4900,57 @@ install-tar: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tar; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd tar && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-texinfo maybe-configure-texinfo
+maybe-configure-texinfo:
+configure-texinfo: texinfo/Makefile
 
+texinfo/Makefile: config.status
+       @[ -d texinfo ] || mkdir texinfo; \
+       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 texinfo; \
+       cd texinfo || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/texinfo"; \
+           libsrcdir="$$s/texinfo";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/texinfo"; \
+           libsrcdir="$$s/texinfo";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-texinfo maybe-all-texinfo
 maybe-all-texinfo:
-all-texinfo:
+all-texinfo: configure-texinfo
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd texinfo; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-texinfo
@@ -2778,7 +4958,7 @@ check-texinfo:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd texinfo; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2787,13 +4967,54 @@ maybe-install-texinfo:
 install-texinfo:
 
 
+.PHONY: configure-textutils maybe-configure-textutils
+maybe-configure-textutils:
+configure-textutils: textutils/Makefile
+
+textutils/Makefile: config.status
+       @[ -d textutils ] || mkdir textutils; \
+       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 textutils; \
+       cd textutils || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/textutils"; \
+           libsrcdir="$$s/textutils";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/textutils"; \
+           libsrcdir="$$s/textutils";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-textutils maybe-all-textutils
 maybe-all-textutils:
-all-textutils:
+all-textutils: configure-textutils
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd textutils; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-textutils
@@ -2801,7 +5022,7 @@ check-textutils:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd textutils; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2811,16 +5032,57 @@ install-textutils: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd textutils; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-time maybe-configure-time
+maybe-configure-time:
+configure-time: time/Makefile
 
+time/Makefile: config.status
+       @[ -d time ] || mkdir time; \
+       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 time; \
+       cd time || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/time"; \
+           libsrcdir="$$s/time";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/time"; \
+           libsrcdir="$$s/time";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-time maybe-all-time
 maybe-all-time:
-all-time:
+all-time: configure-time
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd time; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd time && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-time
@@ -2828,7 +5090,7 @@ check-time:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd time; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd time && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2838,16 +5100,57 @@ install-time: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd time; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd time && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-uudecode maybe-configure-uudecode
+maybe-configure-uudecode:
+configure-uudecode: uudecode/Makefile
+
+uudecode/Makefile: config.status
+       @[ -d uudecode ] || mkdir uudecode; \
+       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 uudecode; \
+       cd uudecode || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/uudecode"; \
+           libsrcdir="$$s/uudecode";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/uudecode"; \
+           libsrcdir="$$s/uudecode";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-uudecode maybe-all-uudecode
 maybe-all-uudecode:
-all-uudecode:
+all-uudecode: configure-uudecode
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd uudecode; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-uudecode
@@ -2855,7 +5158,7 @@ check-uudecode:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd uudecode; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2865,16 +5168,57 @@ install-uudecode: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd uudecode; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-wdiff maybe-configure-wdiff
+maybe-configure-wdiff:
+configure-wdiff: wdiff/Makefile
 
+wdiff/Makefile: config.status
+       @[ -d wdiff ] || mkdir wdiff; \
+       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 wdiff; \
+       cd wdiff || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/wdiff"; \
+           libsrcdir="$$s/wdiff";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/wdiff"; \
+           libsrcdir="$$s/wdiff";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-wdiff maybe-all-wdiff
 maybe-all-wdiff:
-all-wdiff:
+all-wdiff: configure-wdiff
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd wdiff; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-wdiff
@@ -2882,7 +5226,7 @@ check-wdiff:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd wdiff; $(MAKE) $(FLAGS_TO_PASS) check)
+         (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check)
 
 
 
@@ -2892,16 +5236,57 @@ install-wdiff: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd wdiff; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-zip maybe-configure-zip
+maybe-configure-zip:
+configure-zip: zip/Makefile
+
+zip/Makefile: config.status
+       @[ -d zip ] || mkdir zip; \
+       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 zip; \
+       cd zip || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/zip"; \
+           libsrcdir="$$s/zip";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/zip"; \
+           libsrcdir="$$s/zip";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-zip maybe-all-zip
 maybe-all-zip:
-all-zip:
+all-zip: configure-zip
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd zip; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd zip && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-zip
@@ -2911,7 +5296,7 @@ check-zip:
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
-           (cd zip; $(MAKE) $(FLAGS_TO_PASS) check); \
+           (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \
        fi
 
 
@@ -2922,16 +5307,57 @@ install-zip: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd zip; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd zip && $(MAKE) $(FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-zlib maybe-configure-zlib
+maybe-configure-zlib:
+configure-zlib: zlib/Makefile
 
+zlib/Makefile: config.status
+       @[ -d zlib ] || mkdir zlib; \
+       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 zlib; \
+       cd zlib || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/zlib"; \
+           libsrcdir="$$s/zlib";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/zlib"; \
+           libsrcdir="$$s/zlib";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-zlib maybe-all-zlib
 maybe-all-zlib:
-all-zlib:
+all-zlib: configure-zlib
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd zlib; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-zlib
@@ -2944,13 +5370,54 @@ maybe-install-zlib:
 install-zlib:
 
 
+.PHONY: configure-gdb maybe-configure-gdb
+maybe-configure-gdb:
+configure-gdb: gdb/Makefile
+
+gdb/Makefile: config.status
+       @[ -d gdb ] || mkdir gdb; \
+       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 gdb; \
+       cd gdb || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/gdb"; \
+           libsrcdir="$$s/gdb";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/gdb"; \
+           libsrcdir="$$s/gdb";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-gdb maybe-all-gdb
 maybe-all-gdb:
-all-gdb:
+all-gdb: configure-gdb
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gdb; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+         (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-gdb
@@ -2958,7 +5425,7 @@ check-gdb:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gdb; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+         (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -2968,16 +5435,57 @@ install-gdb: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd gdb; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+         (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-expect maybe-configure-expect
+maybe-configure-expect:
+configure-expect: expect/Makefile
 
+expect/Makefile: config.status
+       @[ -d expect ] || mkdir expect; \
+       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 expect; \
+       cd expect || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/expect"; \
+           libsrcdir="$$s/expect";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/expect"; \
+           libsrcdir="$$s/expect";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-expect maybe-all-expect
 maybe-all-expect:
-all-expect:
+all-expect: configure-expect
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd expect; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+         (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-expect
@@ -2985,7 +5493,7 @@ check-expect:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd expect; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+         (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -2995,16 +5503,57 @@ install-expect: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd expect; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+         (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-guile maybe-configure-guile
+maybe-configure-guile:
+configure-guile: guile/Makefile
+
+guile/Makefile: config.status
+       @[ -d guile ] || mkdir guile; \
+       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 guile; \
+       cd guile || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/guile"; \
+           libsrcdir="$$s/guile";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/guile"; \
+           libsrcdir="$$s/guile";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-guile maybe-all-guile
 maybe-all-guile:
-all-guile:
+all-guile: configure-guile
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd guile; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+         (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-guile
@@ -3012,7 +5561,7 @@ check-guile:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd guile; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+         (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -3022,43 +5571,57 @@ install-guile: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd guile; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
-
-
-.PHONY: all-tclX maybe-all-tclX
-maybe-all-tclX:
-all-tclX:
-       @r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
-         $(SET_LIB_PATH) \
-         (cd tclX; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
-
-
-.PHONY: check-tclX
-check-tclX:
-       @r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
-         $(SET_LIB_PATH) \
-         (cd tclX; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+         (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-tk maybe-configure-tk
+maybe-configure-tk:
+configure-tk: tk/Makefile
 
-.PHONY: install-tclX maybe-install-tclX
-maybe-install-tclX:
-install-tclX: installdirs
-       @r=`${PWD}`; export r; \
-         s=`cd $(srcdir); ${PWD}`; export s; \
-         $(SET_LIB_PATH) \
-         (cd tclX; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
-
+tk/Makefile: config.status
+       @[ -d tk ] || mkdir tk; \
+       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 tk; \
+       cd tk || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/tk"; \
+           libsrcdir="$$s/tk";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/tk"; \
+           libsrcdir="$$s/tk";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-tk maybe-all-tk
 maybe-all-tk:
-all-tk:
+all-tk: configure-tk
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tk; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+         (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-tk
@@ -3066,7 +5629,7 @@ check-tk:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tk; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+         (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -3076,16 +5639,57 @@ install-tk: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tk; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+         (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-tix maybe-configure-tix
+maybe-configure-tix:
+configure-tix: tix/Makefile
+
+tix/Makefile: config.status
+       @[ -d tix ] || mkdir tix; \
+       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 tix; \
+       cd tix || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/tix"; \
+           libsrcdir="$$s/tix";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/tix"; \
+           libsrcdir="$$s/tix";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-tix maybe-all-tix
 maybe-all-tix:
-all-tix:
+all-tix: configure-tix
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tix; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+         (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
 
 
 .PHONY: check-tix
@@ -3093,7 +5697,7 @@ check-tix:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tix; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
+         (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 
 
@@ -3103,16 +5707,57 @@ install-tix: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd tix; $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+         (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
+
+
+.PHONY: configure-libtermcap maybe-configure-libtermcap
+maybe-configure-libtermcap:
+configure-libtermcap: libtermcap/Makefile
 
+libtermcap/Makefile: config.status
+       @[ -d libtermcap ] || mkdir libtermcap; \
+       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 libtermcap; \
+       cd libtermcap || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/libtermcap"; \
+           libsrcdir="$$s/libtermcap";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/libtermcap"; \
+           libsrcdir="$$s/libtermcap";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
 
 .PHONY: all-libtermcap maybe-all-libtermcap
 maybe-all-libtermcap:
-all-libtermcap:
+all-libtermcap: configure-libtermcap
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libtermcap; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-libtermcap
@@ -3126,16 +5771,57 @@ install-libtermcap: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd libtermcap; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
+.PHONY: configure-utils maybe-configure-utils
+maybe-configure-utils:
+configure-utils: utils/Makefile
+
+utils/Makefile: config.status
+       @[ -d utils ] || mkdir utils; \
+       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 utils; \
+       cd utils || exit 1; \
+       case $(srcdir) in \
+         \.) \
+           srcdiroption="--srcdir=."; \
+           libsrcdir=".";; \
+         /* | [A-Za-z]:[\\/]*) \
+           srcdiroption="--srcdir=$(srcdir)/utils"; \
+           libsrcdir="$$s/utils";; \
+         *) \
+           srcdiroption="--srcdir=../$(srcdir)/utils"; \
+           libsrcdir="$$s/utils";; \
+       esac; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption} \
+         || exit 1
+
 .PHONY: all-utils maybe-all-utils
 maybe-all-utils:
-all-utils:
+all-utils: configure-utils
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd utils; $(MAKE) $(FLAGS_TO_PASS) all)
+         (cd utils && $(MAKE) $(FLAGS_TO_PASS) all)
 
 
 .PHONY: check-utils
@@ -3149,34 +5835,26 @@ install-utils: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd utils; $(MAKE) $(FLAGS_TO_PASS) install)
+         (cd utils && $(MAKE) $(FLAGS_TO_PASS) install)
 
 
 
-# These rules are used to build the modules which are built with the target
-# tools.  To make foo-X means to cd to X and make foo.
+# ---------------------------------------
+# Modules which run on the target machine
+# ---------------------------------------
 
 .PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3
 maybe-configure-target-libstdc++-v3:
-configure-target-libstdc++-v3:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for libstdc++-v3, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.out $(TARGET_SUBDIR)/libstdc++-v3/Makefile; \
-               mv $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/libstdc++-v3/tmpmulti.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/libstdc++-v3 ]; then \
-           [ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
-           r=`${PWD}`; export r; \
+configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
+       cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
+
+$(TARGET_SUBDIR)/libstdc++-v3/Makefile: config.status $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
+       @[ -d $(TARGET_SUBDIR)/libstdc++-v3 ] || mkdir $(TARGET_SUBDIR)/libstdc++-v3;\
+           r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
            AR="$(AR_FOR_TARGET)"; export AR; \
@@ -3232,18 +5910,15 @@ configure-target-libstdc++-v3:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3
 maybe-all-target-libstdc++-v3:
-all-target-libstdc++-v3:
+all-target-libstdc++-v3: configure-target-libstdc++-v3
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libstdc++-v3; \
+         (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  all)
 
 .PHONY: check-target-libstdc++-v3
@@ -3251,7 +5926,7 @@ check-target-libstdc++-v3:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libstdc++-v3; \
+         (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  check)
 
 
@@ -3261,30 +5936,21 @@ install-target-libstdc++-v3: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libstdc++-v3; \
+         (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-newlib maybe-configure-target-newlib
 maybe-configure-target-newlib:
-configure-target-newlib:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/newlib/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/newlib/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/newlib/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/newlib/multilib.out $(TARGET_SUBDIR)/newlib/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/newlib/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for newlib, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/newlib/multilib.out $(TARGET_SUBDIR)/newlib/Makefile; \
-               mv $(TARGET_SUBDIR)/newlib/tmpmulti.out $(TARGET_SUBDIR)/newlib/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/newlib/tmpmulti.out $(TARGET_SUBDIR)/newlib/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/newlib ]; then \
-           [ -d $(TARGET_SUBDIR)/newlib ] || mkdir $(TARGET_SUBDIR)/newlib;\
+configure-target-newlib: $(TARGET_SUBDIR)/newlib/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/newlib ] || mkdir $(TARGET_SUBDIR)/newlib;\
+       cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out
+
+$(TARGET_SUBDIR)/newlib/Makefile: config.status $(TARGET_SUBDIR)/newlib/multilib.out
+       @[ -d $(TARGET_SUBDIR)/newlib ] || mkdir $(TARGET_SUBDIR)/newlib;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -3340,18 +6006,15 @@ configure-target-newlib:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-newlib maybe-all-target-newlib
 maybe-all-target-newlib:
-all-target-newlib:
+all-target-newlib: configure-target-newlib
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/newlib; \
+         (cd $(TARGET_SUBDIR)/newlib && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-newlib
@@ -3359,7 +6022,7 @@ check-target-newlib:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/newlib; \
+         (cd $(TARGET_SUBDIR)/newlib && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -3369,30 +6032,21 @@ install-target-newlib: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/newlib; \
+         (cd $(TARGET_SUBDIR)/newlib && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libf2c maybe-configure-target-libf2c
 maybe-configure-target-libf2c:
-configure-target-libf2c:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libf2c/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/libf2c/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/libf2c/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/libf2c/multilib.out $(TARGET_SUBDIR)/libf2c/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/libf2c/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for libf2c, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/libf2c/multilib.out $(TARGET_SUBDIR)/libf2c/Makefile; \
-               mv $(TARGET_SUBDIR)/libf2c/tmpmulti.out $(TARGET_SUBDIR)/libf2c/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/libf2c/tmpmulti.out $(TARGET_SUBDIR)/libf2c/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/libf2c ]; then \
-           [ -d $(TARGET_SUBDIR)/libf2c ] || mkdir $(TARGET_SUBDIR)/libf2c;\
+configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/libf2c ] || mkdir $(TARGET_SUBDIR)/libf2c;\
+       cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out
+
+$(TARGET_SUBDIR)/libf2c/Makefile: config.status $(TARGET_SUBDIR)/libf2c/multilib.out
+       @[ -d $(TARGET_SUBDIR)/libf2c ] || mkdir $(TARGET_SUBDIR)/libf2c;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -3448,18 +6102,15 @@ configure-target-libf2c:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-libf2c maybe-all-target-libf2c
 maybe-all-target-libf2c:
-all-target-libf2c:
+all-target-libf2c: configure-target-libf2c
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libf2c; \
+         (cd $(TARGET_SUBDIR)/libf2c && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-libf2c
@@ -3467,7 +6118,7 @@ check-target-libf2c:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libf2c; \
+         (cd $(TARGET_SUBDIR)/libf2c && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -3477,30 +6128,21 @@ install-target-libf2c: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libf2c; \
+         (cd $(TARGET_SUBDIR)/libf2c && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libobjc maybe-configure-target-libobjc
 maybe-configure-target-libobjc:
-configure-target-libobjc:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libobjc/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/libobjc/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/libobjc/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/libobjc/multilib.out $(TARGET_SUBDIR)/libobjc/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/libobjc/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for libobjc, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/libobjc/multilib.out $(TARGET_SUBDIR)/libobjc/Makefile; \
-               mv $(TARGET_SUBDIR)/libobjc/tmpmulti.out $(TARGET_SUBDIR)/libobjc/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/libobjc/tmpmulti.out $(TARGET_SUBDIR)/libobjc/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/libobjc ]; then \
-           [ -d $(TARGET_SUBDIR)/libobjc ] || mkdir $(TARGET_SUBDIR)/libobjc;\
+configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/libobjc ] || mkdir $(TARGET_SUBDIR)/libobjc;\
+       cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out
+
+$(TARGET_SUBDIR)/libobjc/Makefile: config.status $(TARGET_SUBDIR)/libobjc/multilib.out
+       @[ -d $(TARGET_SUBDIR)/libobjc ] || mkdir $(TARGET_SUBDIR)/libobjc;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -3556,18 +6198,15 @@ configure-target-libobjc:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-libobjc maybe-all-target-libobjc
 maybe-all-target-libobjc:
-all-target-libobjc:
+all-target-libobjc: configure-target-libobjc
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libobjc; \
+         (cd $(TARGET_SUBDIR)/libobjc && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-libobjc
@@ -3575,7 +6214,7 @@ check-target-libobjc:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libobjc; \
+         (cd $(TARGET_SUBDIR)/libobjc && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -3585,30 +6224,21 @@ install-target-libobjc: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libobjc; \
+         (cd $(TARGET_SUBDIR)/libobjc && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libtermcap maybe-configure-target-libtermcap
 maybe-configure-target-libtermcap:
-configure-target-libtermcap:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libtermcap/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/libtermcap/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/libtermcap/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/libtermcap/multilib.out $(TARGET_SUBDIR)/libtermcap/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/libtermcap/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for libtermcap, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/libtermcap/multilib.out $(TARGET_SUBDIR)/libtermcap/Makefile; \
-               mv $(TARGET_SUBDIR)/libtermcap/tmpmulti.out $(TARGET_SUBDIR)/libtermcap/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/libtermcap/tmpmulti.out $(TARGET_SUBDIR)/libtermcap/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/libtermcap ]; then \
-           [ -d $(TARGET_SUBDIR)/libtermcap ] || mkdir $(TARGET_SUBDIR)/libtermcap;\
+configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/libtermcap ] || mkdir $(TARGET_SUBDIR)/libtermcap;\
+       cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out
+
+$(TARGET_SUBDIR)/libtermcap/Makefile: config.status $(TARGET_SUBDIR)/libtermcap/multilib.out
+       @[ -d $(TARGET_SUBDIR)/libtermcap ] || mkdir $(TARGET_SUBDIR)/libtermcap;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -3664,18 +6294,15 @@ configure-target-libtermcap:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-libtermcap maybe-all-target-libtermcap
 maybe-all-target-libtermcap:
-all-target-libtermcap:
+all-target-libtermcap: configure-target-libtermcap
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libtermcap; \
+         (cd $(TARGET_SUBDIR)/libtermcap && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 # Dummy target for uncheckable module.
@@ -3689,30 +6316,21 @@ install-target-libtermcap: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libtermcap; \
+         (cd $(TARGET_SUBDIR)/libtermcap && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-winsup maybe-configure-target-winsup
 maybe-configure-target-winsup:
-configure-target-winsup:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/winsup/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/winsup/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/winsup/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/winsup/multilib.out $(TARGET_SUBDIR)/winsup/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/winsup/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for winsup, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/winsup/multilib.out $(TARGET_SUBDIR)/winsup/Makefile; \
-               mv $(TARGET_SUBDIR)/winsup/tmpmulti.out $(TARGET_SUBDIR)/winsup/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/winsup/tmpmulti.out $(TARGET_SUBDIR)/winsup/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/winsup ]; then \
-           [ -d $(TARGET_SUBDIR)/winsup ] || mkdir $(TARGET_SUBDIR)/winsup;\
+configure-target-winsup: $(TARGET_SUBDIR)/winsup/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/winsup ] || mkdir $(TARGET_SUBDIR)/winsup;\
+       cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out
+
+$(TARGET_SUBDIR)/winsup/Makefile: config.status $(TARGET_SUBDIR)/winsup/multilib.out
+       @[ -d $(TARGET_SUBDIR)/winsup ] || mkdir $(TARGET_SUBDIR)/winsup;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -3768,18 +6386,15 @@ configure-target-winsup:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-winsup maybe-all-target-winsup
 maybe-all-target-winsup:
-all-target-winsup:
+all-target-winsup: configure-target-winsup
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/winsup; \
+         (cd $(TARGET_SUBDIR)/winsup && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-winsup
@@ -3787,7 +6402,7 @@ check-target-winsup:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/winsup; \
+         (cd $(TARGET_SUBDIR)/winsup && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -3797,30 +6412,21 @@ install-target-winsup: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/winsup; \
+         (cd $(TARGET_SUBDIR)/winsup && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libgloss maybe-configure-target-libgloss
 maybe-configure-target-libgloss:
-configure-target-libgloss:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgloss/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/libgloss/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/libgloss/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/libgloss/multilib.out $(TARGET_SUBDIR)/libgloss/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/libgloss/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for libgloss, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/libgloss/multilib.out $(TARGET_SUBDIR)/libgloss/Makefile; \
-               mv $(TARGET_SUBDIR)/libgloss/tmpmulti.out $(TARGET_SUBDIR)/libgloss/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/libgloss/tmpmulti.out $(TARGET_SUBDIR)/libgloss/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/libgloss ]; then \
-           [ -d $(TARGET_SUBDIR)/libgloss ] || mkdir $(TARGET_SUBDIR)/libgloss;\
+configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/libgloss ] || mkdir $(TARGET_SUBDIR)/libgloss;\
+       cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out
+
+$(TARGET_SUBDIR)/libgloss/Makefile: config.status $(TARGET_SUBDIR)/libgloss/multilib.out
+       @[ -d $(TARGET_SUBDIR)/libgloss ] || mkdir $(TARGET_SUBDIR)/libgloss;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -3876,18 +6482,15 @@ configure-target-libgloss:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-libgloss maybe-all-target-libgloss
 maybe-all-target-libgloss:
-all-target-libgloss:
+all-target-libgloss: configure-target-libgloss
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libgloss; \
+         (cd $(TARGET_SUBDIR)/libgloss && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 # Dummy target for uncheckable module.
@@ -3901,30 +6504,21 @@ install-target-libgloss: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libgloss; \
+         (cd $(TARGET_SUBDIR)/libgloss && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-libiberty maybe-configure-target-libiberty
 maybe-configure-target-libiberty:
-configure-target-libiberty:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libiberty/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/libiberty/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/libiberty/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/libiberty/multilib.out $(TARGET_SUBDIR)/libiberty/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/libiberty/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for libiberty, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/libiberty/multilib.out $(TARGET_SUBDIR)/libiberty/Makefile; \
-               mv $(TARGET_SUBDIR)/libiberty/tmpmulti.out $(TARGET_SUBDIR)/libiberty/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/libiberty/tmpmulti.out $(TARGET_SUBDIR)/libiberty/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/libiberty ]; then \
-           [ -d $(TARGET_SUBDIR)/libiberty ] || mkdir $(TARGET_SUBDIR)/libiberty;\
+configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/libiberty ] || mkdir $(TARGET_SUBDIR)/libiberty;\
+       cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out
+
+$(TARGET_SUBDIR)/libiberty/Makefile: config.status $(TARGET_SUBDIR)/libiberty/multilib.out
+       @[ -d $(TARGET_SUBDIR)/libiberty ] || mkdir $(TARGET_SUBDIR)/libiberty;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -3980,18 +6574,15 @@ configure-target-libiberty:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-libiberty maybe-all-target-libiberty
 maybe-all-target-libiberty:
-all-target-libiberty:
+all-target-libiberty: configure-target-libiberty
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libiberty; \
+         (cd $(TARGET_SUBDIR)/libiberty && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-libiberty
@@ -3999,7 +6590,7 @@ check-target-libiberty:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libiberty; \
+         (cd $(TARGET_SUBDIR)/libiberty && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -4009,30 +6600,21 @@ install-target-libiberty: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libiberty; \
+         (cd $(TARGET_SUBDIR)/libiberty && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-gperf maybe-configure-target-gperf
 maybe-configure-target-gperf:
-configure-target-gperf:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/gperf/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/gperf/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/gperf/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/gperf/multilib.out $(TARGET_SUBDIR)/gperf/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/gperf/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for gperf, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/gperf/multilib.out $(TARGET_SUBDIR)/gperf/Makefile; \
-               mv $(TARGET_SUBDIR)/gperf/tmpmulti.out $(TARGET_SUBDIR)/gperf/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/gperf/tmpmulti.out $(TARGET_SUBDIR)/gperf/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/gperf ]; then \
-           [ -d $(TARGET_SUBDIR)/gperf ] || mkdir $(TARGET_SUBDIR)/gperf;\
+configure-target-gperf: $(TARGET_SUBDIR)/gperf/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/gperf ] || mkdir $(TARGET_SUBDIR)/gperf;\
+       cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out
+
+$(TARGET_SUBDIR)/gperf/Makefile: config.status $(TARGET_SUBDIR)/gperf/multilib.out
+       @[ -d $(TARGET_SUBDIR)/gperf ] || mkdir $(TARGET_SUBDIR)/gperf;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -4088,18 +6670,15 @@ configure-target-gperf:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-gperf maybe-all-target-gperf
 maybe-all-target-gperf:
-all-target-gperf:
+all-target-gperf: configure-target-gperf
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/gperf; \
+         (cd $(TARGET_SUBDIR)/gperf && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-gperf
@@ -4107,7 +6686,7 @@ check-target-gperf:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/gperf; \
+         (cd $(TARGET_SUBDIR)/gperf && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -4117,30 +6696,21 @@ install-target-gperf: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/gperf; \
+         (cd $(TARGET_SUBDIR)/gperf && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-examples maybe-configure-target-examples
 maybe-configure-target-examples:
-configure-target-examples:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/examples/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/examples/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/examples/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/examples/multilib.out $(TARGET_SUBDIR)/examples/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/examples/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for examples, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/examples/multilib.out $(TARGET_SUBDIR)/examples/Makefile; \
-               mv $(TARGET_SUBDIR)/examples/tmpmulti.out $(TARGET_SUBDIR)/examples/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/examples/tmpmulti.out $(TARGET_SUBDIR)/examples/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/examples ]; then \
-           [ -d $(TARGET_SUBDIR)/examples ] || mkdir $(TARGET_SUBDIR)/examples;\
+configure-target-examples: $(TARGET_SUBDIR)/examples/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/examples/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/examples ] || mkdir $(TARGET_SUBDIR)/examples;\
+       cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out
+
+$(TARGET_SUBDIR)/examples/Makefile: config.status $(TARGET_SUBDIR)/examples/multilib.out
+       @[ -d $(TARGET_SUBDIR)/examples ] || mkdir $(TARGET_SUBDIR)/examples;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -4196,18 +6766,15 @@ configure-target-examples:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-examples maybe-all-target-examples
 maybe-all-target-examples:
-all-target-examples:
+all-target-examples: configure-target-examples
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/examples; \
+         (cd $(TARGET_SUBDIR)/examples && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 # Dummy target for uncheckable module.
@@ -4223,24 +6790,15 @@ install-target-examples:
 
 .PHONY: configure-target-libffi maybe-configure-target-libffi
 maybe-configure-target-libffi:
-configure-target-libffi:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libffi/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/libffi/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/libffi/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/libffi/multilib.out $(TARGET_SUBDIR)/libffi/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/libffi/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for libffi, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/libffi/multilib.out $(TARGET_SUBDIR)/libffi/Makefile; \
-               mv $(TARGET_SUBDIR)/libffi/tmpmulti.out $(TARGET_SUBDIR)/libffi/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/libffi/tmpmulti.out $(TARGET_SUBDIR)/libffi/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/libffi ]; then \
-           [ -d $(TARGET_SUBDIR)/libffi ] || mkdir $(TARGET_SUBDIR)/libffi;\
+configure-target-libffi: $(TARGET_SUBDIR)/libffi/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/libffi ] || mkdir $(TARGET_SUBDIR)/libffi;\
+       cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out
+
+$(TARGET_SUBDIR)/libffi/Makefile: config.status $(TARGET_SUBDIR)/libffi/multilib.out
+       @[ -d $(TARGET_SUBDIR)/libffi ] || mkdir $(TARGET_SUBDIR)/libffi;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -4296,18 +6854,15 @@ configure-target-libffi:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-libffi maybe-all-target-libffi
 maybe-all-target-libffi:
-all-target-libffi:
+all-target-libffi: configure-target-libffi
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libffi; \
+         (cd $(TARGET_SUBDIR)/libffi && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-libffi
@@ -4315,7 +6870,7 @@ check-target-libffi:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libffi; \
+         (cd $(TARGET_SUBDIR)/libffi && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -4327,24 +6882,15 @@ install-target-libffi:
 
 .PHONY: configure-target-libjava maybe-configure-target-libjava
 maybe-configure-target-libjava:
-configure-target-libjava:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libjava/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/libjava/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/libjava/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/libjava/multilib.out $(TARGET_SUBDIR)/libjava/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/libjava/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for libjava, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/libjava/multilib.out $(TARGET_SUBDIR)/libjava/Makefile; \
-               mv $(TARGET_SUBDIR)/libjava/tmpmulti.out $(TARGET_SUBDIR)/libjava/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/libjava/tmpmulti.out $(TARGET_SUBDIR)/libjava/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/libjava ]; then \
-           [ -d $(TARGET_SUBDIR)/libjava ] || mkdir $(TARGET_SUBDIR)/libjava;\
+configure-target-libjava: $(TARGET_SUBDIR)/libjava/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/libjava ] || mkdir $(TARGET_SUBDIR)/libjava;\
+       cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out
+
+$(TARGET_SUBDIR)/libjava/Makefile: config.status $(TARGET_SUBDIR)/libjava/multilib.out
+       @[ -d $(TARGET_SUBDIR)/libjava ] || mkdir $(TARGET_SUBDIR)/libjava;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -4401,18 +6947,15 @@ configure-target-libjava:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-libjava maybe-all-target-libjava
 maybe-all-target-libjava:
-all-target-libjava:
+all-target-libjava: configure-target-libjava
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libjava; \
+         (cd $(TARGET_SUBDIR)/libjava && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  all)
 
 .PHONY: check-target-libjava
@@ -4420,7 +6963,7 @@ check-target-libjava:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libjava; \
+         (cd $(TARGET_SUBDIR)/libjava && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  check)
 
 
@@ -4430,30 +6973,21 @@ install-target-libjava: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/libjava; \
+         (cd $(TARGET_SUBDIR)/libjava && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-zlib maybe-configure-target-zlib
 maybe-configure-target-zlib:
-configure-target-zlib:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/zlib/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/zlib/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/zlib/multilib.out $(TARGET_SUBDIR)/zlib/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/zlib/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for zlib, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/zlib/multilib.out $(TARGET_SUBDIR)/zlib/Makefile; \
-               mv $(TARGET_SUBDIR)/zlib/tmpmulti.out $(TARGET_SUBDIR)/zlib/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/zlib/tmpmulti.out $(TARGET_SUBDIR)/zlib/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/zlib ]; then \
-           [ -d $(TARGET_SUBDIR)/zlib ] || mkdir $(TARGET_SUBDIR)/zlib;\
+configure-target-zlib: $(TARGET_SUBDIR)/zlib/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/zlib ] || mkdir $(TARGET_SUBDIR)/zlib;\
+       cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out
+
+$(TARGET_SUBDIR)/zlib/Makefile: config.status $(TARGET_SUBDIR)/zlib/multilib.out
+       @[ -d $(TARGET_SUBDIR)/zlib ] || mkdir $(TARGET_SUBDIR)/zlib;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -4509,18 +7043,15 @@ configure-target-zlib:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-zlib maybe-all-target-zlib
 maybe-all-target-zlib:
-all-target-zlib:
+all-target-zlib: configure-target-zlib
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/zlib; \
+         (cd $(TARGET_SUBDIR)/zlib && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-zlib
@@ -4528,7 +7059,7 @@ check-target-zlib:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/zlib; \
+         (cd $(TARGET_SUBDIR)/zlib && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -4538,30 +7069,21 @@ install-target-zlib: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/zlib; \
+         (cd $(TARGET_SUBDIR)/zlib && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc
 maybe-configure-target-boehm-gc:
-configure-target-boehm-gc:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/boehm-gc/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/boehm-gc/multilib.out $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for boehm-gc, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/boehm-gc/multilib.out $(TARGET_SUBDIR)/boehm-gc/Makefile; \
-               mv $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out $(TARGET_SUBDIR)/boehm-gc/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/boehm-gc/tmpmulti.out $(TARGET_SUBDIR)/boehm-gc/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/boehm-gc ]; then \
-           [ -d $(TARGET_SUBDIR)/boehm-gc ] || mkdir $(TARGET_SUBDIR)/boehm-gc;\
+configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/boehm-gc ] || mkdir $(TARGET_SUBDIR)/boehm-gc;\
+       cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out
+
+$(TARGET_SUBDIR)/boehm-gc/Makefile: config.status $(TARGET_SUBDIR)/boehm-gc/multilib.out
+       @[ -d $(TARGET_SUBDIR)/boehm-gc ] || mkdir $(TARGET_SUBDIR)/boehm-gc;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -4617,18 +7139,15 @@ configure-target-boehm-gc:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-boehm-gc maybe-all-target-boehm-gc
 maybe-all-target-boehm-gc:
-all-target-boehm-gc:
+all-target-boehm-gc: configure-target-boehm-gc
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/boehm-gc; \
+         (cd $(TARGET_SUBDIR)/boehm-gc && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-boehm-gc
@@ -4636,7 +7155,7 @@ check-target-boehm-gc:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/boehm-gc; \
+         (cd $(TARGET_SUBDIR)/boehm-gc && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -4646,30 +7165,21 @@ install-target-boehm-gc: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/boehm-gc; \
+         (cd $(TARGET_SUBDIR)/boehm-gc && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-qthreads maybe-configure-target-qthreads
 maybe-configure-target-qthreads:
-configure-target-qthreads:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/qthreads/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/qthreads/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/qthreads/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/qthreads/multilib.out $(TARGET_SUBDIR)/qthreads/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/qthreads/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for qthreads, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/qthreads/multilib.out $(TARGET_SUBDIR)/qthreads/Makefile; \
-               mv $(TARGET_SUBDIR)/qthreads/tmpmulti.out $(TARGET_SUBDIR)/qthreads/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/qthreads/tmpmulti.out $(TARGET_SUBDIR)/qthreads/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/qthreads ]; then \
-           [ -d $(TARGET_SUBDIR)/qthreads ] || mkdir $(TARGET_SUBDIR)/qthreads;\
+configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/qthreads ] || mkdir $(TARGET_SUBDIR)/qthreads;\
+       cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out
+
+$(TARGET_SUBDIR)/qthreads/Makefile: config.status $(TARGET_SUBDIR)/qthreads/multilib.out
+       @[ -d $(TARGET_SUBDIR)/qthreads ] || mkdir $(TARGET_SUBDIR)/qthreads;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -4725,18 +7235,15 @@ configure-target-qthreads:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-qthreads maybe-all-target-qthreads
 maybe-all-target-qthreads:
-all-target-qthreads:
+all-target-qthreads: configure-target-qthreads
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/qthreads; \
+         (cd $(TARGET_SUBDIR)/qthreads && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-qthreads
@@ -4744,7 +7251,7 @@ check-target-qthreads:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/qthreads; \
+         (cd $(TARGET_SUBDIR)/qthreads && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -4754,30 +7261,21 @@ install-target-qthreads: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/qthreads; \
+         (cd $(TARGET_SUBDIR)/qthreads && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 .PHONY: configure-target-rda maybe-configure-target-rda
 maybe-configure-target-rda:
-configure-target-rda:
-       @r=`${PWD}`; export r; \
-         $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/rda/tmpmulti.out 2> /dev/null; \
-         if [ -s $(TARGET_SUBDIR)/rda/tmpmulti.out ]; then \
-           if [ -f $(TARGET_SUBDIR)/rda/multilib.out ]; then \
-             if cmp $(TARGET_SUBDIR)/rda/multilib.out $(TARGET_SUBDIR)/rda/tmpmulti.out > /dev/null; then \
-               rm -f $(TARGET_SUBDIR)/rda/tmpmulti.out; \
-             else \
-               echo "Multilibs changed for rda, reconfiguring"; \
-               rm -f $(TARGET_SUBDIR)/rda/multilib.out $(TARGET_SUBDIR)/rda/Makefile; \
-               mv $(TARGET_SUBDIR)/rda/tmpmulti.out $(TARGET_SUBDIR)/rda/multilib.out; \
-             fi; \
-           else \
-             mv $(TARGET_SUBDIR)/rda/tmpmulti.out $(TARGET_SUBDIR)/rda/multilib.out; \
-           fi; \
-       fi; exit 0      # break command into two pieces
-       @if [ -d $(srcdir)/rda ]; then \
-           [ -d $(TARGET_SUBDIR)/rda ] || mkdir $(TARGET_SUBDIR)/rda;\
+configure-target-rda: $(TARGET_SUBDIR)/rda/Makefile
+
+# There's only one multilib.out.  Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/rda/multilib.out: multilib.out
+       @[ -d $(TARGET_SUBDIR)/rda ] || mkdir $(TARGET_SUBDIR)/rda;\
+       cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out
+
+$(TARGET_SUBDIR)/rda/Makefile: config.status $(TARGET_SUBDIR)/rda/multilib.out
+       @[ -d $(TARGET_SUBDIR)/rda ] || mkdir $(TARGET_SUBDIR)/rda;\
            r=`${PWD}`; export r; \
            s=`cd $(srcdir); ${PWD}`; export s; \
            $(SET_LIB_PATH) \
@@ -4833,18 +7331,15 @@ configure-target-rda:
            CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
              $(TARGET_CONFIGARGS) $${srcdiroption} \
              --with-target-subdir="$(TARGET_SUBDIR)" \
-             || exit 1; \
-         else \
-           true; \
-         fi
+             || exit 1
 
 .PHONY: all-target-rda maybe-all-target-rda
 maybe-all-target-rda:
-all-target-rda:
+all-target-rda: configure-target-rda
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/rda; \
+         (cd $(TARGET_SUBDIR)/rda && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  all)
 
 .PHONY: check-target-rda
@@ -4852,7 +7347,7 @@ check-target-rda:
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/rda; \
+         (cd $(TARGET_SUBDIR)/rda && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS)  check)
 
 
@@ -4862,22 +7357,77 @@ install-target-rda: installdirs
        @r=`${PWD}`; export r; \
          s=`cd $(srcdir); ${PWD}`; export s; \
          $(SET_LIB_PATH) \
-         (cd $(TARGET_SUBDIR)/rda; \
+         (cd $(TARGET_SUBDIR)/rda && \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
 
 
 
+# ----------
+# GCC module
+# ----------
+
+# Unfortunately, while gcc _should_ be a host module,
+# libgcc is a target module, and gen* programs are
+# 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: gcc/Makefile
+
+gcc/Makefile: config.status
+       @[ -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
@@ -4891,7 +7441,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) \
@@ -4939,22 +7489,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:
@@ -4963,168 +7515,204 @@ 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
 
-ALL_GCC = maybe-all-gcc
-ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss
-ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3
+# Install the gcc headers files, but not the fixed include files,
+# which Cygnus is not allowed to distribute.  This rule is very
+# dependent on the workings of the gcc Makefile.in.
+.PHONY: gcc-no-fixedincludes
+gcc-no-fixedincludes:
+       @if [ -f ./gcc/Makefile ]; then \
+         rm -rf gcc/tmp-include; \
+         mv gcc/include gcc/tmp-include 2>/dev/null; \
+         mkdir gcc/include; \
+         cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
+         touch gcc/stmp-fixinc gcc/include/fixed; \
+         rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
+         r=`${PWD}`; export r; \
+         s=`cd $(srcdir); ${PWD}` ; export s; \
+         $(SET_LIB_PATH) \
+         (cd ./gcc && \
+          $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
+         rm -rf gcc/include; \
+         mv gcc/tmp-include gcc/include 2>/dev/null; \
+       else true; fi
 
-# This is a list of inter-dependencies among modules.
-all-autoconf: maybe-all-m4 maybe-all-texinfo
-all-automake: maybe-all-m4 maybe-all-texinfo
+# --------------------------------------
+# Dependencies between different modules
+# --------------------------------------
+
+# There are two types of dependencies here: 'hard' dependencies, where one
+# module simply won't build without the other; and 'soft' dependencies, where
+# if the depended-on module is missing, the depending module will do without
+# or find a substitute somewhere (perhaps installed).  Soft dependencies
+# are specified by depending on a 'maybe-' target.  If you're not sure,
+# 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.
+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
-all-bison: maybe-all-texinfo
-configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads
+# We put install-opcodes before install-binutils because the installed
+# binutils might be on PATH, and they might need the shared opcodes
+# library.
+install-binutils: maybe-install-opcodes
+all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
+all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
+all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
+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
-all-diff: maybe-all-libiberty
-configure-target-examples: $(ALL_GCC_C)
+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 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
+
+# Other host modules.  Warning, these are not well tested.
+all-autoconf: maybe-all-m4 maybe-all-texinfo
+all-automake: maybe-all-m4 maybe-all-texinfo
+all-bison: maybe-all-texinfo
+all-diff: maybe-all-libiberty
+all-fastjar: maybe-all-zlib maybe-all-libiberty
 all-fileutils: maybe-all-libiberty
 all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc
-all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl
-all-gcc: maybe-all-libiberty maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
-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
-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)
-configure-target-gperf: $(ALL_GCC_CXX)
-all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
-all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl
 all-grep: maybe-all-libiberty
 all-gzip: maybe-all-libiberty
 all-hello: maybe-all-libiberty
-all-itcl: maybe-all-tcl maybe-all-tk
-all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl
-configure-target-libgloss: $(ALL_GCC)
-all-target-libgloss: maybe-configure-target-newlib
-all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl
-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
-configure-target-libstdc++-v3: $(ALL_GCC_C)
-all-target-libstdc++-v3: maybe-all-target-libiberty
-configure-target-libf2c: $(ALL_GCC_C)
-all-target-libf2c: maybe-all-target-libiberty
-configure-target-libobjc: $(ALL_GCC_C)
-all-target-libobjc: maybe-all-target-libiberty
 all-m4: maybe-all-libiberty maybe-all-texinfo
 all-make: maybe-all-libiberty
-configure-target-newlib: $(ALL_GCC)
-configure-target-libtermcap: $(ALL_GCC_C)
-all-opcodes: maybe-all-bfd maybe-all-libiberty
 all-patch: maybe-all-libiberty
 all-prms: maybe-all-libiberty
-configure-target-qthreads: $(ALL_GCC_C)
 all-recode: maybe-all-libiberty
 all-sed: maybe-all-libiberty
 all-send-pr: maybe-all-prms
-all-sid: maybe-all-tcl maybe-all-tk
-all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline
 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-tk: maybe-all-tcl
-all-texinfo: maybe-all-libiberty
-all-tix: maybe-all-tcl maybe-all-tk
-configure-target-winsup: $(ALL_GCC_C)
-all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap
 all-uudecode: maybe-all-libiberty
-configure-target-zlib: $(ALL_GCC_C)
-all-fastjar: maybe-all-zlib maybe-all-libiberty
-configure-target-fastjar: maybe-configure-target-zlib
-all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty
-configure-target-libiberty: $(ALL_GCC_C)
-install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui
-install-sid: maybe-install-tcl maybe-install-tk
-
-# We put install-opcodes before install-binutils because the installed
-# binutils might be on PATH, and they might need the shared opcodes
-# library.
-install-binutils: maybe-install-opcodes
-
-# 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
-
-# This is a slightly kludgy method of getting dependencies on 
-# all-build-libiberty correct; it would be better to build it every time.
-all-gcc: maybe-all-build-libiberty
 
-# Dependencies of all-build-foo on configure-build-foo.
-all-build-libiberty: configure-build-libiberty
+ALL_GCC = maybe-all-gcc
+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.
+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
+configure-target-libf2c: $(ALL_GCC_C)
+all-target-libf2c: maybe-all-target-libiberty
+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
+configure-target-libobjc: $(ALL_GCC_C)
+all-target-libobjc: maybe-all-target-libiberty
+configure-target-libstdc++-v3: $(ALL_GCC_C)
+all-target-libstdc++-v3: maybe-all-target-libiberty
+configure-target-zlib: $(ALL_GCC_C)
 
-# Dependencies of all-target-foo on configure-target-foo.
-all-target-libstdc++-v3: configure-target-libstdc++-v3
-all-target-newlib: configure-target-newlib
-all-target-libf2c: configure-target-libf2c
-all-target-libobjc: configure-target-libobjc
-all-target-libtermcap: configure-target-libtermcap
-all-target-winsup: configure-target-winsup
-all-target-libgloss: configure-target-libgloss
-all-target-libiberty: configure-target-libiberty
-all-target-gperf: configure-target-gperf
-all-target-examples: configure-target-examples
-all-target-libffi: configure-target-libffi
-all-target-libjava: configure-target-libjava
-all-target-zlib: configure-target-zlib
-all-target-boehm-gc: configure-target-boehm-gc
-all-target-qthreads: configure-target-qthreads
-all-target-rda: configure-target-rda
+# Target modules in the 'src' repository.
+configure-target-examples: $(ALL_GCC_C)
+configure-target-libgloss: $(ALL_GCC)
+all-target-libgloss: maybe-configure-target-newlib
+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.
+configure-target-gperf: $(ALL_GCC_CXX)
+all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3
+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@
 
-### other supporting targets
-
-MAKEDIRS= \
-       $(DESTDIR)$(prefix) \
-       $(DESTDIR)$(exec_prefix)
-.PHONY: installdirs
-installdirs: mkinstalldirs
-       $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
-
-dir.info: do-install-info
-       if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
-         $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
-         mv -f dir.info.new dir.info ; \
-       else true ; \
+# 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: multilib.ts
+       @if [ -f multilib.out ] ; then : else \
+         rm -f multilib.ts; $(MAKE) multilib.ts; \
        fi
 
-dist:
-       @echo "Building a full distribution of this tree isn't done"
-       @echo "via 'make dist'.  Check out the etc/ subdirectory" 
-
-etags tags: TAGS
-
-# Right now this just builds TAGS in each subdirectory.  emacs19 has the
-# ability to use several tags files at once, so there is probably no need
-# to combine them into one big TAGS file (like CVS 1.3 does).  We could
-# (if we felt like it) have this Makefile write a piece of elisp which
-# the user could load to tell emacs19 where all the TAGS files we just
-# built are.
-TAGS: do-TAGS
+multilib.ts: 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 ; \
+       echo timestamp > multilib.ts
 
 # 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.113556 seconds and 4 git commands to generate.