OSDN Git Service

* config/xtensa/xtensa.h (TRAMPOLINE_TEMPLATE): Use "no-transform"
[pf3gnuchains/gcc-fork.git] / Makefile.in
index fa9432b..a6d28ac 100644 (file)
@@ -101,10 +101,11 @@ SET_LIB_PATH = @SET_LIB_PATH@
 # Some platforms don't like blank entries, so we remove duplicate,
 # leading and trailing colons.
 REALLY_SET_LIB_PATH = \
+  @SET_GCC_LIB_PATH@ \
   $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
 
 # This is the list of directories to be built for the build system.
-BUILD_CONFIGDIRS = libiberty libbanshee
+BUILD_CONFIGDIRS = libiberty
 # Build programs are put under this directory.
 BUILD_SUBDIR = @build_subdir@
 # This is set by the configure script to the arguments to use when configuring
@@ -148,6 +149,9 @@ SUBDIRS = @configdirs@
 # This is set by the configure script to the arguments to use when configuring
 # directories built for the host system.
 HOST_CONFIGARGS = @host_configargs@
+# Host programs are put under this directory, which is . except if building
+# with srcdir=..
+HOST_SUBDIR = @host_subdir@
 # This is the list of variables to export in the environment when
 # configuring subdirectories for the host system.
 HOST_EXPORTS = \
@@ -170,13 +174,19 @@ HOST_EXPORTS = \
        OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
        TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
        GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
-       GMPINC="$(HOST_GMPINC)"; export GMPINC;
+       GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+       SET_GCC_LIB_PATH_CMD="@SET_GCC_LIB_PATH@"; export SET_GCC_LIB_PATH_CMD; \
+       @SET_GCC_LIB_PATH@
 
 # Similar, for later GCC stages.
 STAGE_HOST_EXPORTS = \
        $(HOST_EXPORTS) \
-       CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
-       CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD;
+       CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
+         -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
+       CC_FOR_BUILD="$(STAGE_CC_WRAPPER) \
+         $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
+         -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
+         -B$(build_tooldir)/bin/"; export CC_FOR_BUILD;
 
 # This is set by the configure script to the list of directories which
 # should be built using the target tools.
@@ -195,7 +205,7 @@ BASE_TARGET_EXPORTS = \
        CC="$(CC_FOR_TARGET)"; export CC; \
        CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
        CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-       CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+       CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
        CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
        GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
        GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
@@ -204,7 +214,9 @@ BASE_TARGET_EXPORTS = \
        LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
        NM="$(NM_FOR_TARGET)"; export NM; \
        RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
-       WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES;
+       WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+       SET_GCC_LIB_PATH_CMD="@SET_GCC_LIB_PATH@"; export SET_GCC_LIB_PATH_CMD; \
+       @SET_GCC_LIB_PATH@
 
 RAW_CXX_TARGET_EXPORTS = \
        $(BASE_TARGET_EXPORTS) \
@@ -245,6 +257,10 @@ CXX_FOR_BUILD = $(CXX)
 BUILD_PREFIX = @BUILD_PREFIX@
 BUILD_PREFIX_1 = @BUILD_PREFIX_1@
 
+# Flags to pass to stage2 and later makes.  They are defined
+# here so that they can be overridden by Makefile fragments.
+BOOT_CFLAGS= -g -O2
+
 CONFIGURED_BISON = @CONFIGURED_BISON@
 BISON = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
            echo $$r/$(BUILD_SUBDIR)/bison/tests/bison ; \
@@ -293,8 +309,9 @@ MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \
 # (Default to avoid splitting info files by setting the threshold high.)
 MAKEINFOFLAGS = --split-size=5000000
 
-EXPECT = `if [ -f $$r/expect/expect ] ; \
-       then echo $$r/expect/expect ; \
+# FIXME: expect may become a build tool?
+EXPECT = `if [ -f $$r/$(HOST_SUBDIR)/expect/expect ] ; \
+       then echo $$r/$(HOST_SUBDIR)/expect/expect ; \
        else echo expect ; fi`
 
 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
@@ -307,7 +324,7 @@ RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
 
 # This is the list of directories that may be needed in RPATH_ENVVAR
 # so that programs built for the host machine work.
-HOST_LIB_PATH = $$r/bfd:$$r/opcodes
+HOST_LIB_PATH = $$r/$(HOST_SUBDIR)/bfd:$$r/$(HOST_SUBDIR)/opcodes
 
 AS = @AS@
 
@@ -348,8 +365,8 @@ FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
 AR_FOR_TARGET=@AR_FOR_TARGET@
 CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@
 USUAL_AR_FOR_TARGET = ` \
-  if [ -f $$r/binutils/ar ] ; then \
-    echo $$r/binutils/ar ; \
+  if [ -f $$r/$(HOST_SUBDIR)/binutils/ar ] ; then \
+    echo $$r/$(HOST_SUBDIR)/binutils/ar ; \
   else \
     if [ '$(host)' = '$(target)' ] ; then \
       echo $(AR); \
@@ -361,9 +378,9 @@ USUAL_AR_FOR_TARGET = ` \
 AS_FOR_TARGET=@AS_FOR_TARGET@
 CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
 USUAL_AS_FOR_TARGET = ` \
-  if [ -f $$r/gas/as-new ] ; then \
-    echo $$r/gas/as-new ; \
-  elif [ -f $$r/gcc/xgcc ]; then \
+  if [ -f $$r/$(HOST_SUBDIR)/gas/as-new ] ; then \
+    echo $$r/$(HOST_SUBDIR)/gas/as-new ; \
+  elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
     $(CC_FOR_TARGET) -print-prog-name=as ; \
   else \
     if [ '$(host)' = '$(target)' ] ; then \
@@ -384,7 +401,8 @@ CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
 # build libgcc2.a.  We define it here so that it can itself be
 # overridden on the command line.
 GCC_FOR_TARGET=@GCC_FOR_TARGET@
-USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
+USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) \
+  $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ $(FLAGS_FOR_TARGET)
 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
 
 CXX_FOR_TARGET = @CXX_FOR_TARGET@
@@ -397,8 +415,8 @@ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
 DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
 CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
 USUAL_DLLTOOL_FOR_TARGET = ` \
-  if [ -f $$r/binutils/dlltool ] ; then \
-    echo $$r/binutils/dlltool ; \
+  if [ -f $$r/$(HOST_SUBDIR)/binutils/dlltool ] ; then \
+    echo $$r/$(HOST_SUBDIR)/binutils/dlltool ; \
   else \
     if [ '$(host)' = '$(target)' ] ; then \
       echo $(DLLTOOL); \
@@ -413,9 +431,9 @@ GFORTRAN_FOR_TARGET = @GFORTRAN_FOR_TARGET@
 LD_FOR_TARGET=@LD_FOR_TARGET@
 CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
 USUAL_LD_FOR_TARGET = ` \
-  if [ -f $$r/ld/ld-new ] ; then \
-    echo $$r/ld/ld-new ; \
-  elif [ -f $$r/gcc/xgcc ]; then \
+  if [ -f $$r/$(HOST_SUBDIR)/ld/ld-new ] ; then \
+    echo $$r/$(HOST_SUBDIR)/ld/ld-new ; \
+  elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
     $(CC_FOR_TARGET) -print-prog-name=ld ; \
   else \
     if [ '$(host)' = '$(target)' ] ; then \
@@ -430,9 +448,9 @@ LDFLAGS_FOR_TARGET =
 NM_FOR_TARGET=@NM_FOR_TARGET@
 CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
 USUAL_NM_FOR_TARGET = ` \
-  if [ -f $$r/binutils/nm-new ] ; then \
-    echo $$r/binutils/nm-new ; \
-  elif [ -f $$r/gcc/xgcc ]; then \
+  if [ -f $$r/$(HOST_SUBDIR)/binutils/nm-new ] ; then \
+    echo $$r/$(HOST_SUBDIR)/binutils/nm-new ; \
+  elif [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ]; then \
     $(CC_FOR_TARGET) -print-prog-name=nm ; \
   else \
     if [ '$(host)' = '$(target)' ] ; then \
@@ -445,8 +463,8 @@ USUAL_NM_FOR_TARGET = ` \
 RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
 CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@
 USUAL_RANLIB_FOR_TARGET = ` \
-  if [ -f $$r/binutils/ranlib ] ; then \
-    echo $$r/binutils/ranlib ; \
+  if [ -f $$r/$(HOST_SUBDIR)/binutils/ranlib ] ; then \
+    echo $$r/$(HOST_SUBDIR)/binutils/ranlib ; \
   else \
     if [ '$(host)' = '$(target)' ] ; then \
       if [ x'$(RANLIB)' != x ]; then \
@@ -462,8 +480,8 @@ USUAL_RANLIB_FOR_TARGET = ` \
 WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
 CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@
 USUAL_WINDRES_FOR_TARGET = ` \
-  if [ -f $$r/binutils/windres ] ; then \
-    echo $$r/binutils/windres ; \
+  if [ -f $$r/$(HOST_SUBDIR)/binutils/windres ] ; then \
+    echo $$r/$(HOST_SUBDIR)/binutils/windres ; \
   else \
     if [ '$(host)' = '$(target)' ] ; then \
       echo $(WINDRES); \
@@ -478,14 +496,6 @@ PICFLAG_FOR_TARGET =
 # Miscellaneous targets and flag lists
 # ------------------------------------
 
-@if gcc-bootstrap
-# Let's leave this as the first rule in the file until toplevel
-# bootstrap is fleshed out completely.
-sorry:
-       @echo Toplevel bootstrap temporarily out of commission.
-       @echo Please reconfigure without --enable-bootstrap
-@endif gcc-bootstrap
-
 # The first rule in the file had better be this one.  Don't put any above it.
 # This lives here to allow makefile fragments to contain dependencies.
 @default_target@:
@@ -551,6 +561,7 @@ BASE_FLAGS_TO_PASS = \
        "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
        "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
        "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+       "CPPFLAGS_FOR_TARGET=$(CPPFLAGS_FOR_TARGET)" \
        "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
        "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
        "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
@@ -666,6 +677,7 @@ configure-host:  \
     maybe-configure-fileutils \
     maybe-configure-findutils \
     maybe-configure-find \
+    maybe-configure-fixincludes \
     maybe-configure-flex \
     maybe-configure-gas \
     maybe-configure-gcc \
@@ -682,7 +694,6 @@ configure-host:  \
     maybe-configure-ld \
     maybe-configure-libcpp \
     maybe-configure-libgui \
-    maybe-configure-libbanshee \
     maybe-configure-libiberty \
     maybe-configure-libtool \
     maybe-configure-m4 \
@@ -713,7 +724,8 @@ configure-host:  \
     maybe-configure-guile \
     maybe-configure-tk \
     maybe-configure-libtermcap \
-    maybe-configure-utils
+    maybe-configure-utils \
+    maybe-configure-gnattools
 .PHONY: configure-target
 configure-target:  \
     maybe-configure-target-libstdc++-v3 \
@@ -746,7 +758,8 @@ all-build:  \
     maybe-all-build-byacc \
     maybe-all-build-flex \
     maybe-all-build-m4 \
-    maybe-all-build-texinfo
+    maybe-all-build-texinfo \
+    maybe-all-build-fixincludes
 .PHONY: all-host
 all-host:  \
     maybe-all-ash \
@@ -767,6 +780,7 @@ all-host:  \
     maybe-all-fileutils \
     maybe-all-findutils \
     maybe-all-find \
+    maybe-all-fixincludes \
     maybe-all-flex \
     maybe-all-gas \
     maybe-all-gcc \
@@ -783,7 +797,6 @@ all-host:  \
     maybe-all-ld \
     maybe-all-libcpp \
     maybe-all-libgui \
-    maybe-all-libbanshee \
     maybe-all-libiberty \
     maybe-all-libtool \
     maybe-all-m4 \
@@ -814,7 +827,8 @@ all-host:  \
     maybe-all-guile \
     maybe-all-tk \
     maybe-all-libtermcap \
-    maybe-all-utils
+    maybe-all-utils \
+    maybe-all-gnattools
 .PHONY: all-target
 all-target:  \
     maybe-all-target-libstdc++-v3 \
@@ -864,6 +878,7 @@ info-host:  \
     maybe-info-fileutils \
     maybe-info-findutils \
     maybe-info-find \
+    maybe-info-fixincludes \
     maybe-info-flex \
     maybe-info-gas \
     maybe-info-gcc \
@@ -880,7 +895,6 @@ info-host:  \
     maybe-info-ld \
     maybe-info-libcpp \
     maybe-info-libgui \
-    maybe-info-libbanshee \
     maybe-info-libiberty \
     maybe-info-libtool \
     maybe-info-m4 \
@@ -911,7 +925,8 @@ info-host:  \
     maybe-info-guile \
     maybe-info-tk \
     maybe-info-libtermcap \
-    maybe-info-utils
+    maybe-info-utils \
+    maybe-info-gnattools
 
 .PHONY: info-target
 info-target:  \
@@ -957,6 +972,7 @@ dvi-host:  \
     maybe-dvi-fileutils \
     maybe-dvi-findutils \
     maybe-dvi-find \
+    maybe-dvi-fixincludes \
     maybe-dvi-flex \
     maybe-dvi-gas \
     maybe-dvi-gcc \
@@ -973,7 +989,6 @@ dvi-host:  \
     maybe-dvi-ld \
     maybe-dvi-libcpp \
     maybe-dvi-libgui \
-    maybe-dvi-libbanshee \
     maybe-dvi-libiberty \
     maybe-dvi-libtool \
     maybe-dvi-m4 \
@@ -1004,7 +1019,8 @@ dvi-host:  \
     maybe-dvi-guile \
     maybe-dvi-tk \
     maybe-dvi-libtermcap \
-    maybe-dvi-utils
+    maybe-dvi-utils \
+    maybe-dvi-gnattools
 
 .PHONY: dvi-target
 dvi-target:  \
@@ -1027,6 +1043,100 @@ dvi-target:  \
     maybe-dvi-target-rda \
     maybe-dvi-target-libada
 
+.PHONY: do-html
+do-html: unstage html-host html-target stage
+
+.PHONY: html-host
+html-host:  \
+    maybe-html-ash \
+    maybe-html-autoconf \
+    maybe-html-automake \
+    maybe-html-bash \
+    maybe-html-bfd \
+    maybe-html-opcodes \
+    maybe-html-binutils \
+    maybe-html-bison \
+    maybe-html-byacc \
+    maybe-html-bzip2 \
+    maybe-html-dejagnu \
+    maybe-html-diff \
+    maybe-html-dosutils \
+    maybe-html-etc \
+    maybe-html-fastjar \
+    maybe-html-fileutils \
+    maybe-html-findutils \
+    maybe-html-find \
+    maybe-html-fixincludes \
+    maybe-html-flex \
+    maybe-html-gas \
+    maybe-html-gcc \
+    maybe-html-gawk \
+    maybe-html-gettext \
+    maybe-html-gnuserv \
+    maybe-html-gprof \
+    maybe-html-gzip \
+    maybe-html-hello \
+    maybe-html-indent \
+    maybe-html-intl \
+    maybe-html-tcl \
+    maybe-html-itcl \
+    maybe-html-ld \
+    maybe-html-libcpp \
+    maybe-html-libgui \
+    maybe-html-libiberty \
+    maybe-html-libtool \
+    maybe-html-m4 \
+    maybe-html-make \
+    maybe-html-mmalloc \
+    maybe-html-patch \
+    maybe-html-perl \
+    maybe-html-prms \
+    maybe-html-rcs \
+    maybe-html-readline \
+    maybe-html-release \
+    maybe-html-recode \
+    maybe-html-sed \
+    maybe-html-send-pr \
+    maybe-html-shellutils \
+    maybe-html-sid \
+    maybe-html-sim \
+    maybe-html-tar \
+    maybe-html-texinfo \
+    maybe-html-textutils \
+    maybe-html-time \
+    maybe-html-uudecode \
+    maybe-html-wdiff \
+    maybe-html-zip \
+    maybe-html-zlib \
+    maybe-html-gdb \
+    maybe-html-expect \
+    maybe-html-guile \
+    maybe-html-tk \
+    maybe-html-libtermcap \
+    maybe-html-utils \
+    maybe-html-gnattools
+
+.PHONY: html-target
+html-target:  \
+    maybe-html-target-libstdc++-v3 \
+    maybe-html-target-libmudflap \
+    maybe-html-target-newlib \
+    maybe-html-target-libgfortran \
+    maybe-html-target-libobjc \
+    maybe-html-target-libtermcap \
+    maybe-html-target-winsup \
+    maybe-html-target-libgloss \
+    maybe-html-target-libiberty \
+    maybe-html-target-gperf \
+    maybe-html-target-examples \
+    maybe-html-target-libffi \
+    maybe-html-target-libjava \
+    maybe-html-target-zlib \
+    maybe-html-target-boehm-gc \
+    maybe-html-target-qthreads \
+    maybe-html-target-rda \
+    maybe-html-target-libada
+
 .PHONY: do-TAGS
 do-TAGS: unstage TAGS-host TAGS-target stage
 
@@ -1050,6 +1160,7 @@ TAGS-host:  \
     maybe-TAGS-fileutils \
     maybe-TAGS-findutils \
     maybe-TAGS-find \
+    maybe-TAGS-fixincludes \
     maybe-TAGS-flex \
     maybe-TAGS-gas \
     maybe-TAGS-gcc \
@@ -1066,7 +1177,6 @@ TAGS-host:  \
     maybe-TAGS-ld \
     maybe-TAGS-libcpp \
     maybe-TAGS-libgui \
-    maybe-TAGS-libbanshee \
     maybe-TAGS-libiberty \
     maybe-TAGS-libtool \
     maybe-TAGS-m4 \
@@ -1097,7 +1207,8 @@ TAGS-host:  \
     maybe-TAGS-guile \
     maybe-TAGS-tk \
     maybe-TAGS-libtermcap \
-    maybe-TAGS-utils
+    maybe-TAGS-utils \
+    maybe-TAGS-gnattools
 
 .PHONY: TAGS-target
 TAGS-target:  \
@@ -1143,6 +1254,7 @@ install-info-host:  \
     maybe-install-info-fileutils \
     maybe-install-info-findutils \
     maybe-install-info-find \
+    maybe-install-info-fixincludes \
     maybe-install-info-flex \
     maybe-install-info-gas \
     maybe-install-info-gcc \
@@ -1159,7 +1271,6 @@ install-info-host:  \
     maybe-install-info-ld \
     maybe-install-info-libcpp \
     maybe-install-info-libgui \
-    maybe-install-info-libbanshee \
     maybe-install-info-libiberty \
     maybe-install-info-libtool \
     maybe-install-info-m4 \
@@ -1190,7 +1301,8 @@ install-info-host:  \
     maybe-install-info-guile \
     maybe-install-info-tk \
     maybe-install-info-libtermcap \
-    maybe-install-info-utils
+    maybe-install-info-utils \
+    maybe-install-info-gnattools
 
 .PHONY: install-info-target
 install-info-target:  \
@@ -1236,6 +1348,7 @@ installcheck-host:  \
     maybe-installcheck-fileutils \
     maybe-installcheck-findutils \
     maybe-installcheck-find \
+    maybe-installcheck-fixincludes \
     maybe-installcheck-flex \
     maybe-installcheck-gas \
     maybe-installcheck-gcc \
@@ -1252,7 +1365,6 @@ installcheck-host:  \
     maybe-installcheck-ld \
     maybe-installcheck-libcpp \
     maybe-installcheck-libgui \
-    maybe-installcheck-libbanshee \
     maybe-installcheck-libiberty \
     maybe-installcheck-libtool \
     maybe-installcheck-m4 \
@@ -1283,7 +1395,8 @@ installcheck-host:  \
     maybe-installcheck-guile \
     maybe-installcheck-tk \
     maybe-installcheck-libtermcap \
-    maybe-installcheck-utils
+    maybe-installcheck-utils \
+    maybe-installcheck-gnattools
 
 .PHONY: installcheck-target
 installcheck-target:  \
@@ -1329,6 +1442,7 @@ mostlyclean-host:  \
     maybe-mostlyclean-fileutils \
     maybe-mostlyclean-findutils \
     maybe-mostlyclean-find \
+    maybe-mostlyclean-fixincludes \
     maybe-mostlyclean-flex \
     maybe-mostlyclean-gas \
     maybe-mostlyclean-gcc \
@@ -1345,7 +1459,6 @@ mostlyclean-host:  \
     maybe-mostlyclean-ld \
     maybe-mostlyclean-libcpp \
     maybe-mostlyclean-libgui \
-    maybe-mostlyclean-libbanshee \
     maybe-mostlyclean-libiberty \
     maybe-mostlyclean-libtool \
     maybe-mostlyclean-m4 \
@@ -1376,7 +1489,8 @@ mostlyclean-host:  \
     maybe-mostlyclean-guile \
     maybe-mostlyclean-tk \
     maybe-mostlyclean-libtermcap \
-    maybe-mostlyclean-utils
+    maybe-mostlyclean-utils \
+    maybe-mostlyclean-gnattools
 
 .PHONY: mostlyclean-target
 mostlyclean-target:  \
@@ -1422,6 +1536,7 @@ clean-host:  \
     maybe-clean-fileutils \
     maybe-clean-findutils \
     maybe-clean-find \
+    maybe-clean-fixincludes \
     maybe-clean-flex \
     maybe-clean-gas \
     maybe-clean-gcc \
@@ -1438,7 +1553,6 @@ clean-host:  \
     maybe-clean-ld \
     maybe-clean-libcpp \
     maybe-clean-libgui \
-    maybe-clean-libbanshee \
     maybe-clean-libiberty \
     maybe-clean-libtool \
     maybe-clean-m4 \
@@ -1469,7 +1583,8 @@ clean-host:  \
     maybe-clean-guile \
     maybe-clean-tk \
     maybe-clean-libtermcap \
-    maybe-clean-utils
+    maybe-clean-utils \
+    maybe-clean-gnattools
 
 .PHONY: clean-target
 clean-target:  \
@@ -1515,6 +1630,7 @@ distclean-host:  \
     maybe-distclean-fileutils \
     maybe-distclean-findutils \
     maybe-distclean-find \
+    maybe-distclean-fixincludes \
     maybe-distclean-flex \
     maybe-distclean-gas \
     maybe-distclean-gcc \
@@ -1531,7 +1647,6 @@ distclean-host:  \
     maybe-distclean-ld \
     maybe-distclean-libcpp \
     maybe-distclean-libgui \
-    maybe-distclean-libbanshee \
     maybe-distclean-libiberty \
     maybe-distclean-libtool \
     maybe-distclean-m4 \
@@ -1562,7 +1677,8 @@ distclean-host:  \
     maybe-distclean-guile \
     maybe-distclean-tk \
     maybe-distclean-libtermcap \
-    maybe-distclean-utils
+    maybe-distclean-utils \
+    maybe-distclean-gnattools
 
 .PHONY: distclean-target
 distclean-target:  \
@@ -1608,6 +1724,7 @@ maintainer-clean-host:  \
     maybe-maintainer-clean-fileutils \
     maybe-maintainer-clean-findutils \
     maybe-maintainer-clean-find \
+    maybe-maintainer-clean-fixincludes \
     maybe-maintainer-clean-flex \
     maybe-maintainer-clean-gas \
     maybe-maintainer-clean-gcc \
@@ -1624,7 +1741,6 @@ maintainer-clean-host:  \
     maybe-maintainer-clean-ld \
     maybe-maintainer-clean-libcpp \
     maybe-maintainer-clean-libgui \
-    maybe-maintainer-clean-libbanshee \
     maybe-maintainer-clean-libiberty \
     maybe-maintainer-clean-libtool \
     maybe-maintainer-clean-m4 \
@@ -1655,7 +1771,8 @@ maintainer-clean-host:  \
     maybe-maintainer-clean-guile \
     maybe-maintainer-clean-tk \
     maybe-maintainer-clean-libtermcap \
-    maybe-maintainer-clean-utils
+    maybe-maintainer-clean-utils \
+    maybe-maintainer-clean-gnattools
 
 .PHONY: maintainer-clean-target
 maintainer-clean-target:  \
@@ -1681,12 +1798,13 @@ maintainer-clean-target:  \
 
 # Here are the targets which correspond to the do-X targets.
 
-.PHONY: info installcheck dvi install-info
+.PHONY: info installcheck dvi html install-info
 .PHONY: clean distclean mostlyclean maintainer-clean realclean
 .PHONY: local-clean local-distclean local-maintainer-clean
 info: do-info
 installcheck: do-installcheck
 dvi: do-dvi
+html: do-html
 
 # Make sure makeinfo is built before we do a `make info', if we're
 # in fact building texinfo.
@@ -1708,6 +1826,9 @@ local-distclean:
          rm -rf $(TARGET_SUBDIR); \
        else true; fi
        -rm -rf $(BUILD_SUBDIR)
+       -if [ "$(HOST_SUBDIR)" != "." ]; then \
+         rm -rf $(HOST_SUBDIR); \
+       else true; fi
        -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
        -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
        -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
@@ -1732,6 +1853,7 @@ clean-target-libgcc:
        (cd gcc/libgcc && find . -type d -print) | \
        while read d; do rm -f gcc/$$d/libgcc.a || : ; done
        -rm -rf gcc/libgcc
+       -rm -f gcc/stmp-dirs
 
 # Check target.
 
@@ -1758,6 +1880,7 @@ do-check: unstage  \
     maybe-check-fileutils \
     maybe-check-findutils \
     maybe-check-find \
+    maybe-check-fixincludes \
     maybe-check-flex \
     maybe-check-gas \
     maybe-check-gcc \
@@ -1774,7 +1897,6 @@ do-check: unstage  \
     maybe-check-ld \
     maybe-check-libcpp \
     maybe-check-libgui \
-    maybe-check-libbanshee \
     maybe-check-libiberty \
     maybe-check-libtool \
     maybe-check-m4 \
@@ -1806,6 +1928,7 @@ do-check: unstage  \
     maybe-check-tk \
     maybe-check-libtermcap \
     maybe-check-utils \
+    maybe-check-gnattools \
     maybe-check-target-libstdc++-v3 \
     maybe-check-target-libmudflap \
     maybe-check-target-newlib \
@@ -1871,6 +1994,7 @@ install-host-nogcc:  \
     maybe-install-fileutils \
     maybe-install-findutils \
     maybe-install-find \
+    maybe-install-fixincludes \
     maybe-install-flex \
     maybe-install-gas \
     maybe-install-gawk \
@@ -1886,7 +2010,6 @@ install-host-nogcc:  \
     maybe-install-ld \
     maybe-install-libcpp \
     maybe-install-libgui \
-    maybe-install-libbanshee \
     maybe-install-libiberty \
     maybe-install-libtool \
     maybe-install-m4 \
@@ -1917,7 +2040,8 @@ install-host-nogcc:  \
     maybe-install-guile \
     maybe-install-tk \
     maybe-install-libtermcap \
-    maybe-install-utils
+    maybe-install-utils \
+    maybe-install-gnattools
 
 .PHONY: install-host
 install-host:  \
@@ -1939,6 +2063,7 @@ install-host:  \
     maybe-install-fileutils \
     maybe-install-findutils \
     maybe-install-find \
+    maybe-install-fixincludes \
     maybe-install-flex \
     maybe-install-gas \
     maybe-install-gcc \
@@ -1955,7 +2080,6 @@ install-host:  \
     maybe-install-ld \
     maybe-install-libcpp \
     maybe-install-libgui \
-    maybe-install-libbanshee \
     maybe-install-libiberty \
     maybe-install-libtool \
     maybe-install-m4 \
@@ -1986,7 +2110,8 @@ install-host:  \
     maybe-install-guile \
     maybe-install-tk \
     maybe-install-libtermcap \
-    maybe-install-utils
+    maybe-install-utils \
+    maybe-install-gnattools
 
 .PHONY: install-target
 install-target:  \
@@ -2077,38 +2202,12 @@ configure-build-libiberty:
        echo Configuring in $(BUILD_SUBDIR)/libiberty; \
        cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(BUILD_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(BUILD_SUBDIR)/libiberty/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       if [ "$(srcdir)" = "." ] ; then \
-         if [ "$(BUILD_SUBDIR)" != "." ] ; then \
-           if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \
-             if [ -f Makefile ]; then \
-               if $(MAKE) distclean; then \
-                 true; \
-               else \
-                 exit 1; \
-               fi; \
-             else \
-               true; \
-             fi; \
-           else \
-             exit 1; \
-           fi; \
-         else \
-           true; \
-         fi; \
-         srcdiroption="--srcdir=."; \
-         libsrcdir="."; \
-       else \
-         srcdiroption="--srcdir=$${topdir}/libiberty"; \
-         libsrcdir="$$s/libiberty"; \
-       fi; \
+       srcdiroption="--srcdir=$${topdir}/libiberty"; \
+       libsrcdir="$$s/libiberty"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(BUILD_CONFIGARGS) $${srcdiroption} \
@@ -2142,38 +2241,12 @@ configure-build-bison:
        echo Configuring in $(BUILD_SUBDIR)/bison; \
        cd "$(BUILD_SUBDIR)/bison" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(BUILD_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(BUILD_SUBDIR)/bison/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       if [ "$(srcdir)" = "." ] ; then \
-         if [ "$(BUILD_SUBDIR)" != "." ] ; then \
-           if $(SHELL) $$s/symlink-tree $${topdir}/bison "no-such-file" ; then \
-             if [ -f Makefile ]; then \
-               if $(MAKE) distclean; then \
-                 true; \
-               else \
-                 exit 1; \
-               fi; \
-             else \
-               true; \
-             fi; \
-           else \
-             exit 1; \
-           fi; \
-         else \
-           true; \
-         fi; \
-         srcdiroption="--srcdir=."; \
-         libsrcdir="."; \
-       else \
-         srcdiroption="--srcdir=$${topdir}/bison"; \
-         libsrcdir="$$s/bison"; \
-       fi; \
+       srcdiroption="--srcdir=$${topdir}/bison"; \
+       libsrcdir="$$s/bison"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(BUILD_CONFIGARGS) $${srcdiroption} \
@@ -2207,38 +2280,12 @@ configure-build-byacc:
        echo Configuring in $(BUILD_SUBDIR)/byacc; \
        cd "$(BUILD_SUBDIR)/byacc" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(BUILD_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(BUILD_SUBDIR)/byacc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       if [ "$(srcdir)" = "." ] ; then \
-         if [ "$(BUILD_SUBDIR)" != "." ] ; then \
-           if $(SHELL) $$s/symlink-tree $${topdir}/byacc "no-such-file" ; then \
-             if [ -f Makefile ]; then \
-               if $(MAKE) distclean; then \
-                 true; \
-               else \
-                 exit 1; \
-               fi; \
-             else \
-               true; \
-             fi; \
-           else \
-             exit 1; \
-           fi; \
-         else \
-           true; \
-         fi; \
-         srcdiroption="--srcdir=."; \
-         libsrcdir="."; \
-       else \
-         srcdiroption="--srcdir=$${topdir}/byacc"; \
-         libsrcdir="$$s/byacc"; \
-       fi; \
+       srcdiroption="--srcdir=$${topdir}/byacc"; \
+       libsrcdir="$$s/byacc"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(BUILD_CONFIGARGS) $${srcdiroption} \
@@ -2272,38 +2319,12 @@ configure-build-flex:
        echo Configuring in $(BUILD_SUBDIR)/flex; \
        cd "$(BUILD_SUBDIR)/flex" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(BUILD_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(BUILD_SUBDIR)/flex/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       if [ "$(srcdir)" = "." ] ; then \
-         if [ "$(BUILD_SUBDIR)" != "." ] ; then \
-           if $(SHELL) $$s/symlink-tree $${topdir}/flex "no-such-file" ; then \
-             if [ -f Makefile ]; then \
-               if $(MAKE) distclean; then \
-                 true; \
-               else \
-                 exit 1; \
-               fi; \
-             else \
-               true; \
-             fi; \
-           else \
-             exit 1; \
-           fi; \
-         else \
-           true; \
-         fi; \
-         srcdiroption="--srcdir=."; \
-         libsrcdir="."; \
-       else \
-         srcdiroption="--srcdir=$${topdir}/flex"; \
-         libsrcdir="$$s/flex"; \
-       fi; \
+       srcdiroption="--srcdir=$${topdir}/flex"; \
+       libsrcdir="$$s/flex"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(BUILD_CONFIGARGS) $${srcdiroption} \
@@ -2337,38 +2358,12 @@ configure-build-m4:
        echo Configuring in $(BUILD_SUBDIR)/m4; \
        cd "$(BUILD_SUBDIR)/m4" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(BUILD_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(BUILD_SUBDIR)/m4/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       if [ "$(srcdir)" = "." ] ; then \
-         if [ "$(BUILD_SUBDIR)" != "." ] ; then \
-           if $(SHELL) $$s/symlink-tree $${topdir}/m4 "no-such-file" ; then \
-             if [ -f Makefile ]; then \
-               if $(MAKE) distclean; then \
-                 true; \
-               else \
-                 exit 1; \
-               fi; \
-             else \
-               true; \
-             fi; \
-           else \
-             exit 1; \
-           fi; \
-         else \
-           true; \
-         fi; \
-         srcdiroption="--srcdir=."; \
-         libsrcdir="."; \
-       else \
-         srcdiroption="--srcdir=$${topdir}/m4"; \
-         libsrcdir="$$s/m4"; \
-       fi; \
+       srcdiroption="--srcdir=$${topdir}/m4"; \
+       libsrcdir="$$s/m4"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(BUILD_CONFIGARGS) $${srcdiroption} \
@@ -2402,38 +2397,12 @@ configure-build-texinfo:
        echo Configuring in $(BUILD_SUBDIR)/texinfo; \
        cd "$(BUILD_SUBDIR)/texinfo" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(BUILD_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(BUILD_SUBDIR)/texinfo/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       if [ "$(srcdir)" = "." ] ; then \
-         if [ "$(BUILD_SUBDIR)" != "." ] ; then \
-           if $(SHELL) $$s/symlink-tree $${topdir}/texinfo "no-such-file" ; then \
-             if [ -f Makefile ]; then \
-               if $(MAKE) distclean; then \
-                 true; \
-               else \
-                 exit 1; \
-               fi; \
-             else \
-               true; \
-             fi; \
-           else \
-             exit 1; \
-           fi; \
-         else \
-           true; \
-         fi; \
-         srcdiroption="--srcdir=."; \
-         libsrcdir="."; \
-       else \
-         srcdiroption="--srcdir=$${topdir}/texinfo"; \
-         libsrcdir="$$s/texinfo"; \
-       fi; \
+       srcdiroption="--srcdir=$${topdir}/texinfo"; \
+       libsrcdir="$$s/texinfo"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(BUILD_CONFIGARGS) $${srcdiroption} \
@@ -2454,6 +2423,45 @@ all-build-texinfo: configure-build-texinfo
          $(MAKE)  $(TARGET-build-texinfo))
 @endif build-texinfo
 
+.PHONY: configure-build-fixincludes maybe-configure-build-fixincludes
+maybe-configure-build-fixincludes:
+@if build-fixincludes
+maybe-configure-build-fixincludes: configure-build-fixincludes
+configure-build-fixincludes:
+       @test ! -f $(BUILD_SUBDIR)/fixincludes/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/fixincludes ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(BUILD_EXPORTS) \
+       echo Configuring in $(BUILD_SUBDIR)/fixincludes; \
+       cd "$(BUILD_SUBDIR)/fixincludes" || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(BUILD_SUBDIR)/fixincludes/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/fixincludes"; \
+       libsrcdir="$$s/fixincludes"; \
+       rm -f no-such-file || : ; \
+       CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+         $(BUILD_CONFIGARGS) $${srcdiroption} \
+         --with-build-subdir="$(BUILD_SUBDIR)"  \
+         || exit 1
+@endif build-fixincludes
+
+.PHONY: all-build-fixincludes maybe-all-build-fixincludes
+maybe-all-build-fixincludes:
+@if build-fixincludes
+TARGET-build-fixincludes=all
+maybe-all-build-fixincludes: all-build-fixincludes
+all-build-fixincludes: configure-build-fixincludes
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(BUILD_EXPORTS) \
+       (cd $(BUILD_SUBDIR)/fixincludes && \
+         $(MAKE)  $(TARGET-build-fixincludes))
+@endif build-fixincludes
+
 
 # --------------------------------------
 # Modules which run on the host machine
@@ -2464,24 +2472,20 @@ maybe-configure-ash:
 @if ash
 maybe-configure-ash: configure-ash
 configure-ash:
-       @test ! -f ash/Makefile || exit 0; \
-       [ -d ash ] || mkdir ash; \
+       @test ! -f $(HOST_SUBDIR)/ash/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ash ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in ash; \
-       cd ash || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ash/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/ash"; \
+       libsrcdir="$$s/ash"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -2490,13 +2494,15 @@ configure-ash:
 .PHONY: all-ash maybe-all-ash
 maybe-all-ash:
 @if ash
+TARGET-ash=all
 maybe-all-ash: all-ash
 all-ash: configure-ash
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd ash && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/ash && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-ash))
 @endif ash
 
 .PHONY: check-ash maybe-check-ash
@@ -2509,7 +2515,8 @@ check-ash:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd ash && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/ash && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif ash
 
@@ -2523,7 +2530,8 @@ install-ash: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd ash && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/ash && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif ash
 
@@ -2545,7 +2553,7 @@ info-ash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in ash" ; \
-       (cd ash && \
+       (cd $(HOST_SUBDIR)/ash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2571,7 +2579,7 @@ dvi-ash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in ash" ; \
-       (cd ash && \
+       (cd $(HOST_SUBDIR)/ash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2581,6 +2589,32 @@ dvi-ash: \
 
 @endif ash
 
+.PHONY: maybe-html-ash html-ash
+maybe-html-ash:
+@if ash
+maybe-html-ash: html-ash
+
+html-ash: \
+    configure-ash 
+       @[ -f ./ash/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in ash" ; \
+       (cd $(HOST_SUBDIR)/ash && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif ash
+
 .PHONY: maybe-TAGS-ash TAGS-ash
 maybe-TAGS-ash:
 @if ash
@@ -2597,7 +2631,7 @@ TAGS-ash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in ash" ; \
-       (cd ash && \
+       (cd $(HOST_SUBDIR)/ash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2624,7 +2658,7 @@ install-info-ash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in ash" ; \
-       (cd ash && \
+       (cd $(HOST_SUBDIR)/ash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2650,7 +2684,7 @@ installcheck-ash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in ash" ; \
-       (cd ash && \
+       (cd $(HOST_SUBDIR)/ash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2675,7 +2709,7 @@ mostlyclean-ash:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in ash" ; \
-       (cd ash && \
+       (cd $(HOST_SUBDIR)/ash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2700,7 +2734,7 @@ clean-ash:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in ash" ; \
-       (cd ash && \
+       (cd $(HOST_SUBDIR)/ash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2725,7 +2759,7 @@ distclean-ash:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in ash" ; \
-       (cd ash && \
+       (cd $(HOST_SUBDIR)/ash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2750,7 +2784,7 @@ maintainer-clean-ash:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in ash" ; \
-       (cd ash && \
+       (cd $(HOST_SUBDIR)/ash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2766,24 +2800,20 @@ maybe-configure-autoconf:
 @if autoconf
 maybe-configure-autoconf: configure-autoconf
 configure-autoconf:
-       @test ! -f autoconf/Makefile || exit 0; \
-       [ -d autoconf ] || mkdir autoconf; \
+       @test ! -f $(HOST_SUBDIR)/autoconf/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/autoconf ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in autoconf; \
-       cd autoconf || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/autoconf/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/autoconf"; \
+       libsrcdir="$$s/autoconf"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -2792,13 +2822,15 @@ configure-autoconf:
 .PHONY: all-autoconf maybe-all-autoconf
 maybe-all-autoconf:
 @if autoconf
+TARGET-autoconf=all
 maybe-all-autoconf: all-autoconf
 all-autoconf: configure-autoconf
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd autoconf && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/autoconf && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-autoconf))
 @endif autoconf
 
 .PHONY: check-autoconf maybe-check-autoconf
@@ -2811,7 +2843,8 @@ check-autoconf:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/autoconf && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif autoconf
 
@@ -2825,7 +2858,8 @@ install-autoconf: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/autoconf && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif autoconf
 
@@ -2847,7 +2881,7 @@ info-autoconf: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in autoconf" ; \
-       (cd autoconf && \
+       (cd $(HOST_SUBDIR)/autoconf && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2873,7 +2907,7 @@ dvi-autoconf: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in autoconf" ; \
-       (cd autoconf && \
+       (cd $(HOST_SUBDIR)/autoconf && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2883,6 +2917,32 @@ dvi-autoconf: \
 
 @endif autoconf
 
+.PHONY: maybe-html-autoconf html-autoconf
+maybe-html-autoconf:
+@if autoconf
+maybe-html-autoconf: html-autoconf
+
+html-autoconf: \
+    configure-autoconf 
+       @[ -f ./autoconf/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in autoconf" ; \
+       (cd $(HOST_SUBDIR)/autoconf && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif autoconf
+
 .PHONY: maybe-TAGS-autoconf TAGS-autoconf
 maybe-TAGS-autoconf:
 @if autoconf
@@ -2899,7 +2959,7 @@ TAGS-autoconf: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in autoconf" ; \
-       (cd autoconf && \
+       (cd $(HOST_SUBDIR)/autoconf && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2926,7 +2986,7 @@ install-info-autoconf: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in autoconf" ; \
-       (cd autoconf && \
+       (cd $(HOST_SUBDIR)/autoconf && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2952,7 +3012,7 @@ installcheck-autoconf: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in autoconf" ; \
-       (cd autoconf && \
+       (cd $(HOST_SUBDIR)/autoconf && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -2977,7 +3037,7 @@ mostlyclean-autoconf:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in autoconf" ; \
-       (cd autoconf && \
+       (cd $(HOST_SUBDIR)/autoconf && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3002,7 +3062,7 @@ clean-autoconf:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in autoconf" ; \
-       (cd autoconf && \
+       (cd $(HOST_SUBDIR)/autoconf && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3027,7 +3087,7 @@ distclean-autoconf:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in autoconf" ; \
-       (cd autoconf && \
+       (cd $(HOST_SUBDIR)/autoconf && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3052,7 +3112,7 @@ maintainer-clean-autoconf:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in autoconf" ; \
-       (cd autoconf && \
+       (cd $(HOST_SUBDIR)/autoconf && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3068,24 +3128,20 @@ maybe-configure-automake:
 @if automake
 maybe-configure-automake: configure-automake
 configure-automake:
-       @test ! -f automake/Makefile || exit 0; \
-       [ -d automake ] || mkdir automake; \
+       @test ! -f $(HOST_SUBDIR)/automake/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/automake ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in automake; \
-       cd automake || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/automake/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/automake"; \
+       libsrcdir="$$s/automake"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -3094,13 +3150,15 @@ configure-automake:
 .PHONY: all-automake maybe-all-automake
 maybe-all-automake:
 @if automake
+TARGET-automake=all
 maybe-all-automake: all-automake
 all-automake: configure-automake
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd automake && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/automake && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-automake))
 @endif automake
 
 .PHONY: check-automake maybe-check-automake
@@ -3113,7 +3171,8 @@ check-automake:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd automake && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/automake && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif automake
 
@@ -3127,7 +3186,8 @@ install-automake: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd automake && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/automake && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif automake
 
@@ -3149,7 +3209,7 @@ info-automake: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in automake" ; \
-       (cd automake && \
+       (cd $(HOST_SUBDIR)/automake && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3175,7 +3235,7 @@ dvi-automake: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in automake" ; \
-       (cd automake && \
+       (cd $(HOST_SUBDIR)/automake && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3185,6 +3245,32 @@ dvi-automake: \
 
 @endif automake
 
+.PHONY: maybe-html-automake html-automake
+maybe-html-automake:
+@if automake
+maybe-html-automake: html-automake
+
+html-automake: \
+    configure-automake 
+       @[ -f ./automake/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in automake" ; \
+       (cd $(HOST_SUBDIR)/automake && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif automake
+
 .PHONY: maybe-TAGS-automake TAGS-automake
 maybe-TAGS-automake:
 @if automake
@@ -3201,7 +3287,7 @@ TAGS-automake: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in automake" ; \
-       (cd automake && \
+       (cd $(HOST_SUBDIR)/automake && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3228,7 +3314,7 @@ install-info-automake: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in automake" ; \
-       (cd automake && \
+       (cd $(HOST_SUBDIR)/automake && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3254,7 +3340,7 @@ installcheck-automake: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in automake" ; \
-       (cd automake && \
+       (cd $(HOST_SUBDIR)/automake && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3279,7 +3365,7 @@ mostlyclean-automake:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in automake" ; \
-       (cd automake && \
+       (cd $(HOST_SUBDIR)/automake && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3304,7 +3390,7 @@ clean-automake:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in automake" ; \
-       (cd automake && \
+       (cd $(HOST_SUBDIR)/automake && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3329,7 +3415,7 @@ distclean-automake:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in automake" ; \
-       (cd automake && \
+       (cd $(HOST_SUBDIR)/automake && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3354,7 +3440,7 @@ maintainer-clean-automake:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in automake" ; \
-       (cd automake && \
+       (cd $(HOST_SUBDIR)/automake && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3370,24 +3456,20 @@ maybe-configure-bash:
 @if bash
 maybe-configure-bash: configure-bash
 configure-bash:
-       @test ! -f bash/Makefile || exit 0; \
-       [ -d bash ] || mkdir bash; \
+       @test ! -f $(HOST_SUBDIR)/bash/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bash ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in bash; \
-       cd bash || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bash/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bash"; \
+       libsrcdir="$$s/bash"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -3396,13 +3478,15 @@ configure-bash:
 .PHONY: all-bash maybe-all-bash
 maybe-all-bash:
 @if bash
+TARGET-bash=all
 maybe-all-bash: all-bash
 all-bash: configure-bash
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bash && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/bash && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-bash))
 @endif bash
 
 .PHONY: check-bash maybe-check-bash
@@ -3415,7 +3499,8 @@ check-bash:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bash && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/bash && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif bash
 
@@ -3429,7 +3514,8 @@ install-bash: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bash && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/bash && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif bash
 
@@ -3451,7 +3537,7 @@ info-bash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in bash" ; \
-       (cd bash && \
+       (cd $(HOST_SUBDIR)/bash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3477,7 +3563,7 @@ dvi-bash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in bash" ; \
-       (cd bash && \
+       (cd $(HOST_SUBDIR)/bash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3487,6 +3573,32 @@ dvi-bash: \
 
 @endif bash
 
+.PHONY: maybe-html-bash html-bash
+maybe-html-bash:
+@if bash
+maybe-html-bash: html-bash
+
+html-bash: \
+    configure-bash 
+       @[ -f ./bash/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in bash" ; \
+       (cd $(HOST_SUBDIR)/bash && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif bash
+
 .PHONY: maybe-TAGS-bash TAGS-bash
 maybe-TAGS-bash:
 @if bash
@@ -3503,7 +3615,7 @@ TAGS-bash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in bash" ; \
-       (cd bash && \
+       (cd $(HOST_SUBDIR)/bash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3530,7 +3642,7 @@ install-info-bash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in bash" ; \
-       (cd bash && \
+       (cd $(HOST_SUBDIR)/bash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3556,7 +3668,7 @@ installcheck-bash: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in bash" ; \
-       (cd bash && \
+       (cd $(HOST_SUBDIR)/bash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3581,7 +3693,7 @@ mostlyclean-bash:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in bash" ; \
-       (cd bash && \
+       (cd $(HOST_SUBDIR)/bash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3606,7 +3718,7 @@ clean-bash:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in bash" ; \
-       (cd bash && \
+       (cd $(HOST_SUBDIR)/bash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3631,7 +3743,7 @@ distclean-bash:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in bash" ; \
-       (cd bash && \
+       (cd $(HOST_SUBDIR)/bash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3656,7 +3768,7 @@ maintainer-clean-bash:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in bash" ; \
-       (cd bash && \
+       (cd $(HOST_SUBDIR)/bash && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3673,24 +3785,20 @@ maybe-configure-bfd:
 maybe-configure-bfd: configure-bfd
 configure-bfd:
        @test -f stage_last && exit 0; \
-       test ! -f bfd/Makefile || exit 0; \
-       [ -d bfd ] || mkdir bfd; \
+       test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in bfd; \
-       cd bfd || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bfd"; \
+       libsrcdir="$$s/bfd"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -3699,6 +3807,7 @@ configure-bfd:
 .PHONY: all-bfd maybe-all-bfd
 maybe-all-bfd:
 @if bfd
+TARGET-bfd=all
 maybe-all-bfd: all-bfd
 all-bfd: configure-bfd
        @test -f stage_last && exit 0; \
@@ -3706,7 +3815,8 @@ all-bfd: configure-bfd
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bfd && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/bfd && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-bfd))
 @endif bfd
 
 .PHONY: check-bfd maybe-check-bfd
@@ -3719,7 +3829,8 @@ check-bfd:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/bfd && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif bfd
 
@@ -3733,7 +3844,8 @@ install-bfd: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/bfd && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif bfd
 
@@ -3755,7 +3867,7 @@ info-bfd: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in bfd" ; \
-       (cd bfd && \
+       (cd $(HOST_SUBDIR)/bfd && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3781,7 +3893,7 @@ dvi-bfd: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in bfd" ; \
-       (cd bfd && \
+       (cd $(HOST_SUBDIR)/bfd && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3791,6 +3903,32 @@ dvi-bfd: \
 
 @endif bfd
 
+.PHONY: maybe-html-bfd html-bfd
+maybe-html-bfd:
+@if bfd
+maybe-html-bfd: html-bfd
+
+html-bfd: \
+    configure-bfd 
+       @[ -f ./bfd/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in bfd" ; \
+       (cd $(HOST_SUBDIR)/bfd && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif bfd
+
 .PHONY: maybe-TAGS-bfd TAGS-bfd
 maybe-TAGS-bfd:
 @if bfd
@@ -3807,7 +3945,7 @@ TAGS-bfd: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in bfd" ; \
-       (cd bfd && \
+       (cd $(HOST_SUBDIR)/bfd && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3834,7 +3972,7 @@ install-info-bfd: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in bfd" ; \
-       (cd bfd && \
+       (cd $(HOST_SUBDIR)/bfd && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3860,7 +3998,7 @@ installcheck-bfd: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in bfd" ; \
-       (cd bfd && \
+       (cd $(HOST_SUBDIR)/bfd && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3885,7 +4023,7 @@ mostlyclean-bfd:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in bfd" ; \
-       (cd bfd && \
+       (cd $(HOST_SUBDIR)/bfd && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3910,7 +4048,7 @@ clean-bfd:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in bfd" ; \
-       (cd bfd && \
+       (cd $(HOST_SUBDIR)/bfd && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3935,7 +4073,7 @@ distclean-bfd:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in bfd" ; \
-       (cd bfd && \
+       (cd $(HOST_SUBDIR)/bfd && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3960,7 +4098,7 @@ maintainer-clean-bfd:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in bfd" ; \
-       (cd bfd && \
+       (cd $(HOST_SUBDIR)/bfd && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -3977,24 +4115,20 @@ maybe-configure-opcodes:
 maybe-configure-opcodes: configure-opcodes
 configure-opcodes:
        @test -f stage_last && exit 0; \
-       test ! -f opcodes/Makefile || exit 0; \
-       [ -d opcodes ] || mkdir opcodes; \
+       test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in opcodes; \
-       cd opcodes || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/opcodes"; \
+       libsrcdir="$$s/opcodes"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -4003,6 +4137,7 @@ configure-opcodes:
 .PHONY: all-opcodes maybe-all-opcodes
 maybe-all-opcodes:
 @if opcodes
+TARGET-opcodes=all
 maybe-all-opcodes: all-opcodes
 all-opcodes: configure-opcodes
        @test -f stage_last && exit 0; \
@@ -4010,7 +4145,8 @@ all-opcodes: configure-opcodes
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd opcodes && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/opcodes && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-opcodes))
 @endif opcodes
 
 .PHONY: check-opcodes maybe-check-opcodes
@@ -4023,7 +4159,8 @@ check-opcodes:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/opcodes && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif opcodes
 
@@ -4037,7 +4174,8 @@ install-opcodes: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/opcodes && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif opcodes
 
@@ -4059,7 +4197,7 @@ info-opcodes: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in opcodes" ; \
-       (cd opcodes && \
+       (cd $(HOST_SUBDIR)/opcodes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4085,7 +4223,7 @@ dvi-opcodes: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in opcodes" ; \
-       (cd opcodes && \
+       (cd $(HOST_SUBDIR)/opcodes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4095,6 +4233,32 @@ dvi-opcodes: \
 
 @endif opcodes
 
+.PHONY: maybe-html-opcodes html-opcodes
+maybe-html-opcodes:
+@if opcodes
+maybe-html-opcodes: html-opcodes
+
+html-opcodes: \
+    configure-opcodes 
+       @[ -f ./opcodes/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in opcodes" ; \
+       (cd $(HOST_SUBDIR)/opcodes && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif opcodes
+
 .PHONY: maybe-TAGS-opcodes TAGS-opcodes
 maybe-TAGS-opcodes:
 @if opcodes
@@ -4111,7 +4275,7 @@ TAGS-opcodes: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in opcodes" ; \
-       (cd opcodes && \
+       (cd $(HOST_SUBDIR)/opcodes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4138,7 +4302,7 @@ install-info-opcodes: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in opcodes" ; \
-       (cd opcodes && \
+       (cd $(HOST_SUBDIR)/opcodes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4164,7 +4328,7 @@ installcheck-opcodes: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in opcodes" ; \
-       (cd opcodes && \
+       (cd $(HOST_SUBDIR)/opcodes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4189,7 +4353,7 @@ mostlyclean-opcodes:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in opcodes" ; \
-       (cd opcodes && \
+       (cd $(HOST_SUBDIR)/opcodes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4214,7 +4378,7 @@ clean-opcodes:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in opcodes" ; \
-       (cd opcodes && \
+       (cd $(HOST_SUBDIR)/opcodes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4239,7 +4403,7 @@ distclean-opcodes:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in opcodes" ; \
-       (cd opcodes && \
+       (cd $(HOST_SUBDIR)/opcodes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4264,7 +4428,7 @@ maintainer-clean-opcodes:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in opcodes" ; \
-       (cd opcodes && \
+       (cd $(HOST_SUBDIR)/opcodes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4281,24 +4445,20 @@ maybe-configure-binutils:
 maybe-configure-binutils: configure-binutils
 configure-binutils:
        @test -f stage_last && exit 0; \
-       test ! -f binutils/Makefile || exit 0; \
-       [ -d binutils ] || mkdir binutils; \
+       test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in binutils; \
-       cd binutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/binutils"; \
+       libsrcdir="$$s/binutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -4307,6 +4467,7 @@ configure-binutils:
 .PHONY: all-binutils maybe-all-binutils
 maybe-all-binutils:
 @if binutils
+TARGET-binutils=all
 maybe-all-binutils: all-binutils
 all-binutils: configure-binutils
        @test -f stage_last && exit 0; \
@@ -4314,7 +4475,8 @@ all-binutils: configure-binutils
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd binutils && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/binutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-binutils))
 @endif binutils
 
 .PHONY: check-binutils maybe-check-binutils
@@ -4327,7 +4489,8 @@ check-binutils:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/binutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif binutils
 
@@ -4341,7 +4504,8 @@ install-binutils: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/binutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif binutils
 
@@ -4363,7 +4527,7 @@ info-binutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in binutils" ; \
-       (cd binutils && \
+       (cd $(HOST_SUBDIR)/binutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4389,7 +4553,7 @@ dvi-binutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in binutils" ; \
-       (cd binutils && \
+       (cd $(HOST_SUBDIR)/binutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4399,6 +4563,32 @@ dvi-binutils: \
 
 @endif binutils
 
+.PHONY: maybe-html-binutils html-binutils
+maybe-html-binutils:
+@if binutils
+maybe-html-binutils: html-binutils
+
+html-binutils: \
+    configure-binutils 
+       @[ -f ./binutils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in binutils" ; \
+       (cd $(HOST_SUBDIR)/binutils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif binutils
+
 .PHONY: maybe-TAGS-binutils TAGS-binutils
 maybe-TAGS-binutils:
 @if binutils
@@ -4415,7 +4605,7 @@ TAGS-binutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in binutils" ; \
-       (cd binutils && \
+       (cd $(HOST_SUBDIR)/binutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4442,7 +4632,7 @@ install-info-binutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in binutils" ; \
-       (cd binutils && \
+       (cd $(HOST_SUBDIR)/binutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4468,7 +4658,7 @@ installcheck-binutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in binutils" ; \
-       (cd binutils && \
+       (cd $(HOST_SUBDIR)/binutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4493,7 +4683,7 @@ mostlyclean-binutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in binutils" ; \
-       (cd binutils && \
+       (cd $(HOST_SUBDIR)/binutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4518,7 +4708,7 @@ clean-binutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in binutils" ; \
-       (cd binutils && \
+       (cd $(HOST_SUBDIR)/binutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4543,7 +4733,7 @@ distclean-binutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in binutils" ; \
-       (cd binutils && \
+       (cd $(HOST_SUBDIR)/binutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4568,7 +4758,7 @@ maintainer-clean-binutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in binutils" ; \
-       (cd binutils && \
+       (cd $(HOST_SUBDIR)/binutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4584,24 +4774,20 @@ maybe-configure-bison:
 @if bison
 maybe-configure-bison: configure-bison
 configure-bison:
-       @test ! -f bison/Makefile || exit 0; \
-       [ -d bison ] || mkdir bison; \
+       @test ! -f $(HOST_SUBDIR)/bison/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bison ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in bison; \
-       cd bison || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bison/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bison"; \
+       libsrcdir="$$s/bison"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -4610,13 +4796,15 @@ configure-bison:
 .PHONY: all-bison maybe-all-bison
 maybe-all-bison:
 @if bison
+TARGET-bison=all
 maybe-all-bison: all-bison
 all-bison: configure-bison
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bison && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/bison && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-bison))
 @endif bison
 
 .PHONY: check-bison maybe-check-bison
@@ -4631,7 +4819,8 @@ check-bison:
          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          $(HOST_EXPORTS) \
-         (cd bison && $(MAKE) $(FLAGS_TO_PASS)  check); \
+         (cd $(HOST_SUBDIR)/bison && \
+           $(MAKE) $(FLAGS_TO_PASS)  check)
        fi
 
 @endif bison
@@ -4646,7 +4835,8 @@ install-bison: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bison && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/bison && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif bison
 
@@ -4668,7 +4858,7 @@ info-bison: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in bison" ; \
-       (cd bison && \
+       (cd $(HOST_SUBDIR)/bison && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4694,7 +4884,7 @@ dvi-bison: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in bison" ; \
-       (cd bison && \
+       (cd $(HOST_SUBDIR)/bison && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4704,6 +4894,32 @@ dvi-bison: \
 
 @endif bison
 
+.PHONY: maybe-html-bison html-bison
+maybe-html-bison:
+@if bison
+maybe-html-bison: html-bison
+
+html-bison: \
+    configure-bison 
+       @[ -f ./bison/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in bison" ; \
+       (cd $(HOST_SUBDIR)/bison && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif bison
+
 .PHONY: maybe-TAGS-bison TAGS-bison
 maybe-TAGS-bison:
 @if bison
@@ -4720,7 +4936,7 @@ TAGS-bison: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in bison" ; \
-       (cd bison && \
+       (cd $(HOST_SUBDIR)/bison && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4747,7 +4963,7 @@ install-info-bison: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in bison" ; \
-       (cd bison && \
+       (cd $(HOST_SUBDIR)/bison && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4773,7 +4989,7 @@ installcheck-bison: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in bison" ; \
-       (cd bison && \
+       (cd $(HOST_SUBDIR)/bison && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4798,7 +5014,7 @@ mostlyclean-bison:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in bison" ; \
-       (cd bison && \
+       (cd $(HOST_SUBDIR)/bison && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4823,7 +5039,7 @@ clean-bison:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in bison" ; \
-       (cd bison && \
+       (cd $(HOST_SUBDIR)/bison && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4848,7 +5064,7 @@ distclean-bison:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in bison" ; \
-       (cd bison && \
+       (cd $(HOST_SUBDIR)/bison && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4873,7 +5089,7 @@ maintainer-clean-bison:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in bison" ; \
-       (cd bison && \
+       (cd $(HOST_SUBDIR)/bison && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4889,24 +5105,20 @@ maybe-configure-byacc:
 @if byacc
 maybe-configure-byacc: configure-byacc
 configure-byacc:
-       @test ! -f byacc/Makefile || exit 0; \
-       [ -d byacc ] || mkdir byacc; \
+       @test ! -f $(HOST_SUBDIR)/byacc/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/byacc ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in byacc; \
-       cd byacc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/byacc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/byacc"; \
+       libsrcdir="$$s/byacc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -4915,13 +5127,15 @@ configure-byacc:
 .PHONY: all-byacc maybe-all-byacc
 maybe-all-byacc:
 @if byacc
+TARGET-byacc=all
 maybe-all-byacc: all-byacc
 all-byacc: configure-byacc
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd byacc && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/byacc && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-byacc))
 @endif byacc
 
 .PHONY: check-byacc maybe-check-byacc
@@ -4936,7 +5150,8 @@ check-byacc:
          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          $(HOST_EXPORTS) \
-         (cd byacc && $(MAKE) $(FLAGS_TO_PASS)  check); \
+         (cd $(HOST_SUBDIR)/byacc && \
+           $(MAKE) $(FLAGS_TO_PASS)  check)
        fi
 
 @endif byacc
@@ -4951,7 +5166,8 @@ install-byacc: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/byacc && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif byacc
 
@@ -4973,7 +5189,7 @@ info-byacc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in byacc" ; \
-       (cd byacc && \
+       (cd $(HOST_SUBDIR)/byacc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -4999,7 +5215,7 @@ dvi-byacc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in byacc" ; \
-       (cd byacc && \
+       (cd $(HOST_SUBDIR)/byacc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5009,6 +5225,32 @@ dvi-byacc: \
 
 @endif byacc
 
+.PHONY: maybe-html-byacc html-byacc
+maybe-html-byacc:
+@if byacc
+maybe-html-byacc: html-byacc
+
+html-byacc: \
+    configure-byacc 
+       @[ -f ./byacc/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in byacc" ; \
+       (cd $(HOST_SUBDIR)/byacc && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif byacc
+
 .PHONY: maybe-TAGS-byacc TAGS-byacc
 maybe-TAGS-byacc:
 @if byacc
@@ -5025,7 +5267,7 @@ TAGS-byacc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in byacc" ; \
-       (cd byacc && \
+       (cd $(HOST_SUBDIR)/byacc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5052,7 +5294,7 @@ install-info-byacc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in byacc" ; \
-       (cd byacc && \
+       (cd $(HOST_SUBDIR)/byacc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5078,7 +5320,7 @@ installcheck-byacc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in byacc" ; \
-       (cd byacc && \
+       (cd $(HOST_SUBDIR)/byacc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5103,7 +5345,7 @@ mostlyclean-byacc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in byacc" ; \
-       (cd byacc && \
+       (cd $(HOST_SUBDIR)/byacc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5128,7 +5370,7 @@ clean-byacc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in byacc" ; \
-       (cd byacc && \
+       (cd $(HOST_SUBDIR)/byacc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5153,7 +5395,7 @@ distclean-byacc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in byacc" ; \
-       (cd byacc && \
+       (cd $(HOST_SUBDIR)/byacc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5178,7 +5420,7 @@ maintainer-clean-byacc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in byacc" ; \
-       (cd byacc && \
+       (cd $(HOST_SUBDIR)/byacc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5194,24 +5436,20 @@ maybe-configure-bzip2:
 @if bzip2
 maybe-configure-bzip2: configure-bzip2
 configure-bzip2:
-       @test ! -f bzip2/Makefile || exit 0; \
-       [ -d bzip2 ] || mkdir bzip2; \
+       @test ! -f $(HOST_SUBDIR)/bzip2/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bzip2 ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in bzip2; \
-       cd bzip2 || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bzip2/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bzip2"; \
+       libsrcdir="$$s/bzip2"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -5220,13 +5458,15 @@ configure-bzip2:
 .PHONY: all-bzip2 maybe-all-bzip2
 maybe-all-bzip2:
 @if bzip2
+TARGET-bzip2=all
 maybe-all-bzip2: all-bzip2
 all-bzip2: configure-bzip2
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/bzip2 && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-bzip2))
 @endif bzip2
 
 .PHONY: check-bzip2 maybe-check-bzip2
@@ -5239,7 +5479,8 @@ check-bzip2:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/bzip2 && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif bzip2
 
@@ -5253,7 +5494,8 @@ install-bzip2: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/bzip2 && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif bzip2
 
@@ -5275,7 +5517,7 @@ info-bzip2: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in bzip2" ; \
-       (cd bzip2 && \
+       (cd $(HOST_SUBDIR)/bzip2 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5301,7 +5543,7 @@ dvi-bzip2: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in bzip2" ; \
-       (cd bzip2 && \
+       (cd $(HOST_SUBDIR)/bzip2 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5311,6 +5553,32 @@ dvi-bzip2: \
 
 @endif bzip2
 
+.PHONY: maybe-html-bzip2 html-bzip2
+maybe-html-bzip2:
+@if bzip2
+maybe-html-bzip2: html-bzip2
+
+html-bzip2: \
+    configure-bzip2 
+       @[ -f ./bzip2/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in bzip2" ; \
+       (cd $(HOST_SUBDIR)/bzip2 && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif bzip2
+
 .PHONY: maybe-TAGS-bzip2 TAGS-bzip2
 maybe-TAGS-bzip2:
 @if bzip2
@@ -5327,7 +5595,7 @@ TAGS-bzip2: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in bzip2" ; \
-       (cd bzip2 && \
+       (cd $(HOST_SUBDIR)/bzip2 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5354,7 +5622,7 @@ install-info-bzip2: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in bzip2" ; \
-       (cd bzip2 && \
+       (cd $(HOST_SUBDIR)/bzip2 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5380,7 +5648,7 @@ installcheck-bzip2: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in bzip2" ; \
-       (cd bzip2 && \
+       (cd $(HOST_SUBDIR)/bzip2 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5405,7 +5673,7 @@ mostlyclean-bzip2:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in bzip2" ; \
-       (cd bzip2 && \
+       (cd $(HOST_SUBDIR)/bzip2 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5430,7 +5698,7 @@ clean-bzip2:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in bzip2" ; \
-       (cd bzip2 && \
+       (cd $(HOST_SUBDIR)/bzip2 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5455,7 +5723,7 @@ distclean-bzip2:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in bzip2" ; \
-       (cd bzip2 && \
+       (cd $(HOST_SUBDIR)/bzip2 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5480,7 +5748,7 @@ maintainer-clean-bzip2:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in bzip2" ; \
-       (cd bzip2 && \
+       (cd $(HOST_SUBDIR)/bzip2 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5496,24 +5764,20 @@ maybe-configure-dejagnu:
 @if dejagnu
 maybe-configure-dejagnu: configure-dejagnu
 configure-dejagnu:
-       @test ! -f dejagnu/Makefile || exit 0; \
-       [ -d dejagnu ] || mkdir dejagnu; \
+       @test ! -f $(HOST_SUBDIR)/dejagnu/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/dejagnu ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in dejagnu; \
-       cd dejagnu || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/dejagnu/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/dejagnu"; \
+       libsrcdir="$$s/dejagnu"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -5522,13 +5786,15 @@ configure-dejagnu:
 .PHONY: all-dejagnu maybe-all-dejagnu
 maybe-all-dejagnu:
 @if dejagnu
+TARGET-dejagnu=all
 maybe-all-dejagnu: all-dejagnu
 all-dejagnu: configure-dejagnu
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/dejagnu && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-dejagnu))
 @endif dejagnu
 
 .PHONY: check-dejagnu maybe-check-dejagnu
@@ -5541,7 +5807,8 @@ check-dejagnu:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/dejagnu && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif dejagnu
 
@@ -5555,7 +5822,8 @@ install-dejagnu: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/dejagnu && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif dejagnu
 
@@ -5577,7 +5845,7 @@ info-dejagnu: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in dejagnu" ; \
-       (cd dejagnu && \
+       (cd $(HOST_SUBDIR)/dejagnu && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5603,7 +5871,7 @@ dvi-dejagnu: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in dejagnu" ; \
-       (cd dejagnu && \
+       (cd $(HOST_SUBDIR)/dejagnu && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5613,6 +5881,32 @@ dvi-dejagnu: \
 
 @endif dejagnu
 
+.PHONY: maybe-html-dejagnu html-dejagnu
+maybe-html-dejagnu:
+@if dejagnu
+maybe-html-dejagnu: html-dejagnu
+
+html-dejagnu: \
+    configure-dejagnu 
+       @[ -f ./dejagnu/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in dejagnu" ; \
+       (cd $(HOST_SUBDIR)/dejagnu && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif dejagnu
+
 .PHONY: maybe-TAGS-dejagnu TAGS-dejagnu
 maybe-TAGS-dejagnu:
 @if dejagnu
@@ -5629,7 +5923,7 @@ TAGS-dejagnu: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in dejagnu" ; \
-       (cd dejagnu && \
+       (cd $(HOST_SUBDIR)/dejagnu && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5656,7 +5950,7 @@ install-info-dejagnu: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in dejagnu" ; \
-       (cd dejagnu && \
+       (cd $(HOST_SUBDIR)/dejagnu && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5682,7 +5976,7 @@ installcheck-dejagnu: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in dejagnu" ; \
-       (cd dejagnu && \
+       (cd $(HOST_SUBDIR)/dejagnu && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5707,7 +6001,7 @@ mostlyclean-dejagnu:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in dejagnu" ; \
-       (cd dejagnu && \
+       (cd $(HOST_SUBDIR)/dejagnu && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5732,7 +6026,7 @@ clean-dejagnu:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in dejagnu" ; \
-       (cd dejagnu && \
+       (cd $(HOST_SUBDIR)/dejagnu && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5757,7 +6051,7 @@ distclean-dejagnu:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in dejagnu" ; \
-       (cd dejagnu && \
+       (cd $(HOST_SUBDIR)/dejagnu && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5782,7 +6076,7 @@ maintainer-clean-dejagnu:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in dejagnu" ; \
-       (cd dejagnu && \
+       (cd $(HOST_SUBDIR)/dejagnu && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5798,24 +6092,20 @@ maybe-configure-diff:
 @if diff
 maybe-configure-diff: configure-diff
 configure-diff:
-       @test ! -f diff/Makefile || exit 0; \
-       [ -d diff ] || mkdir diff; \
+       @test ! -f $(HOST_SUBDIR)/diff/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/diff ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in diff; \
-       cd diff || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/diff/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/diff"; \
+       libsrcdir="$$s/diff"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -5824,13 +6114,15 @@ configure-diff:
 .PHONY: all-diff maybe-all-diff
 maybe-all-diff:
 @if diff
+TARGET-diff=all
 maybe-all-diff: all-diff
 all-diff: configure-diff
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd diff && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/diff && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-diff))
 @endif diff
 
 .PHONY: check-diff maybe-check-diff
@@ -5843,7 +6135,8 @@ check-diff:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd diff && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/diff && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif diff
 
@@ -5857,7 +6150,8 @@ install-diff: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd diff && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/diff && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif diff
 
@@ -5879,7 +6173,7 @@ info-diff: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in diff" ; \
-       (cd diff && \
+       (cd $(HOST_SUBDIR)/diff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5905,7 +6199,7 @@ dvi-diff: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in diff" ; \
-       (cd diff && \
+       (cd $(HOST_SUBDIR)/diff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5915,12 +6209,12 @@ dvi-diff: \
 
 @endif diff
 
-.PHONY: maybe-TAGS-diff TAGS-diff
-maybe-TAGS-diff:
+.PHONY: maybe-html-diff html-diff
+maybe-html-diff:
 @if diff
-maybe-TAGS-diff: TAGS-diff
+maybe-html-diff: html-diff
 
-TAGS-diff: \
+html-diff: \
     configure-diff 
        @[ -f ./diff/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
@@ -5930,21 +6224,47 @@ TAGS-diff: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing TAGS in diff" ; \
-       (cd diff && \
+       echo "Doing html in diff" ; \
+       (cd $(HOST_SUBDIR)/diff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 TAGS) \
+                 html) \
          || exit 1
 
 @endif diff
 
-.PHONY: maybe-install-info-diff install-info-diff
-maybe-install-info-diff:
+.PHONY: maybe-TAGS-diff TAGS-diff
+maybe-TAGS-diff:
 @if diff
-maybe-install-info-diff: install-info-diff
+maybe-TAGS-diff: TAGS-diff
+
+TAGS-diff: \
+    configure-diff 
+       @[ -f ./diff/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in diff" ; \
+       (cd $(HOST_SUBDIR)/diff && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 TAGS) \
+         || exit 1
+
+@endif diff
+
+.PHONY: maybe-install-info-diff install-info-diff
+maybe-install-info-diff:
+@if diff
+maybe-install-info-diff: install-info-diff
 
 install-info-diff: \
     configure-diff \
@@ -5958,7 +6278,7 @@ install-info-diff: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in diff" ; \
-       (cd diff && \
+       (cd $(HOST_SUBDIR)/diff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -5984,7 +6304,7 @@ installcheck-diff: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in diff" ; \
-       (cd diff && \
+       (cd $(HOST_SUBDIR)/diff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6009,7 +6329,7 @@ mostlyclean-diff:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in diff" ; \
-       (cd diff && \
+       (cd $(HOST_SUBDIR)/diff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6034,7 +6354,7 @@ clean-diff:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in diff" ; \
-       (cd diff && \
+       (cd $(HOST_SUBDIR)/diff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6059,7 +6379,7 @@ distclean-diff:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in diff" ; \
-       (cd diff && \
+       (cd $(HOST_SUBDIR)/diff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6084,7 +6404,7 @@ maintainer-clean-diff:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in diff" ; \
-       (cd diff && \
+       (cd $(HOST_SUBDIR)/diff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6100,24 +6420,20 @@ maybe-configure-dosutils:
 @if dosutils
 maybe-configure-dosutils: configure-dosutils
 configure-dosutils:
-       @test ! -f dosutils/Makefile || exit 0; \
-       [ -d dosutils ] || mkdir dosutils; \
+       @test ! -f $(HOST_SUBDIR)/dosutils/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/dosutils ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in dosutils; \
-       cd dosutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/dosutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/dosutils"; \
+       libsrcdir="$$s/dosutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -6126,13 +6442,15 @@ configure-dosutils:
 .PHONY: all-dosutils maybe-all-dosutils
 maybe-all-dosutils:
 @if dosutils
+TARGET-dosutils=all
 maybe-all-dosutils: all-dosutils
 all-dosutils: configure-dosutils
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd dosutils && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/dosutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-dosutils))
 @endif dosutils
 
 .PHONY: check-dosutils maybe-check-dosutils
@@ -6154,7 +6472,8 @@ install-dosutils: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/dosutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif dosutils
 
@@ -6176,7 +6495,7 @@ info-dosutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in dosutils" ; \
-       (cd dosutils && \
+       (cd $(HOST_SUBDIR)/dosutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6202,7 +6521,7 @@ dvi-dosutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in dosutils" ; \
-       (cd dosutils && \
+       (cd $(HOST_SUBDIR)/dosutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6212,6 +6531,32 @@ dvi-dosutils: \
 
 @endif dosutils
 
+.PHONY: maybe-html-dosutils html-dosutils
+maybe-html-dosutils:
+@if dosutils
+maybe-html-dosutils: html-dosutils
+
+html-dosutils: \
+    configure-dosutils 
+       @[ -f ./dosutils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in dosutils" ; \
+       (cd $(HOST_SUBDIR)/dosutils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif dosutils
+
 .PHONY: maybe-TAGS-dosutils TAGS-dosutils
 maybe-TAGS-dosutils:
 @if dosutils
@@ -6228,7 +6573,7 @@ TAGS-dosutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in dosutils" ; \
-       (cd dosutils && \
+       (cd $(HOST_SUBDIR)/dosutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6255,7 +6600,7 @@ install-info-dosutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in dosutils" ; \
-       (cd dosutils && \
+       (cd $(HOST_SUBDIR)/dosutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6281,7 +6626,7 @@ installcheck-dosutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in dosutils" ; \
-       (cd dosutils && \
+       (cd $(HOST_SUBDIR)/dosutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6306,7 +6651,7 @@ mostlyclean-dosutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in dosutils" ; \
-       (cd dosutils && \
+       (cd $(HOST_SUBDIR)/dosutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6331,7 +6676,7 @@ clean-dosutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in dosutils" ; \
-       (cd dosutils && \
+       (cd $(HOST_SUBDIR)/dosutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6356,7 +6701,7 @@ distclean-dosutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in dosutils" ; \
-       (cd dosutils && \
+       (cd $(HOST_SUBDIR)/dosutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6381,7 +6726,7 @@ maintainer-clean-dosutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in dosutils" ; \
-       (cd dosutils && \
+       (cd $(HOST_SUBDIR)/dosutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6397,24 +6742,20 @@ maybe-configure-etc:
 @if etc
 maybe-configure-etc: configure-etc
 configure-etc:
-       @test ! -f etc/Makefile || exit 0; \
-       [ -d etc ] || mkdir etc; \
+       @test ! -f $(HOST_SUBDIR)/etc/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/etc ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in etc; \
-       cd etc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/etc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/etc"; \
+       libsrcdir="$$s/etc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -6423,13 +6764,15 @@ configure-etc:
 .PHONY: all-etc maybe-all-etc
 maybe-all-etc:
 @if etc
+TARGET-etc=all
 maybe-all-etc: all-etc
 all-etc: configure-etc
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd etc && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/etc && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-etc))
 @endif etc
 
 .PHONY: check-etc maybe-check-etc
@@ -6442,7 +6785,8 @@ check-etc:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd etc && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/etc && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif etc
 
@@ -6456,7 +6800,8 @@ install-etc: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd etc && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/etc && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif etc
 
@@ -6478,7 +6823,7 @@ info-etc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in etc" ; \
-       (cd etc && \
+       (cd $(HOST_SUBDIR)/etc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6504,7 +6849,7 @@ dvi-etc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in etc" ; \
-       (cd etc && \
+       (cd $(HOST_SUBDIR)/etc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6514,6 +6859,32 @@ dvi-etc: \
 
 @endif etc
 
+.PHONY: maybe-html-etc html-etc
+maybe-html-etc:
+@if etc
+maybe-html-etc: html-etc
+
+html-etc: \
+    configure-etc 
+       @[ -f ./etc/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in etc" ; \
+       (cd $(HOST_SUBDIR)/etc && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif etc
+
 .PHONY: maybe-TAGS-etc TAGS-etc
 maybe-TAGS-etc:
 @if etc
@@ -6530,7 +6901,7 @@ TAGS-etc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in etc" ; \
-       (cd etc && \
+       (cd $(HOST_SUBDIR)/etc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6557,7 +6928,7 @@ install-info-etc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in etc" ; \
-       (cd etc && \
+       (cd $(HOST_SUBDIR)/etc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6583,7 +6954,7 @@ installcheck-etc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in etc" ; \
-       (cd etc && \
+       (cd $(HOST_SUBDIR)/etc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6608,7 +6979,7 @@ mostlyclean-etc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in etc" ; \
-       (cd etc && \
+       (cd $(HOST_SUBDIR)/etc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6633,7 +7004,7 @@ clean-etc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in etc" ; \
-       (cd etc && \
+       (cd $(HOST_SUBDIR)/etc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6658,7 +7029,7 @@ distclean-etc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in etc" ; \
-       (cd etc && \
+       (cd $(HOST_SUBDIR)/etc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6683,7 +7054,7 @@ maintainer-clean-etc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in etc" ; \
-       (cd etc && \
+       (cd $(HOST_SUBDIR)/etc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6699,24 +7070,20 @@ maybe-configure-fastjar:
 @if fastjar
 maybe-configure-fastjar: configure-fastjar
 configure-fastjar:
-       @test ! -f fastjar/Makefile || exit 0; \
-       [ -d fastjar ] || mkdir fastjar; \
+       @test ! -f $(HOST_SUBDIR)/fastjar/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fastjar ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in fastjar; \
-       cd fastjar || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/fastjar/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/fastjar"; \
+       libsrcdir="$$s/fastjar"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -6725,13 +7092,15 @@ configure-fastjar:
 .PHONY: all-fastjar maybe-all-fastjar
 maybe-all-fastjar:
 @if fastjar
+TARGET-fastjar=all
 maybe-all-fastjar: all-fastjar
 all-fastjar: configure-fastjar
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd fastjar && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/fastjar && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-fastjar))
 @endif fastjar
 
 .PHONY: check-fastjar maybe-check-fastjar
@@ -6746,7 +7115,8 @@ check-fastjar:
          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          $(HOST_EXPORTS) \
-         (cd fastjar && $(MAKE) $(FLAGS_TO_PASS)  check); \
+         (cd $(HOST_SUBDIR)/fastjar && \
+           $(MAKE) $(FLAGS_TO_PASS)  check)
        fi
 
 @endif fastjar
@@ -6761,7 +7131,8 @@ install-fastjar: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/fastjar && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif fastjar
 
@@ -6783,7 +7154,7 @@ info-fastjar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in fastjar" ; \
-       (cd fastjar && \
+       (cd $(HOST_SUBDIR)/fastjar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6809,7 +7180,7 @@ dvi-fastjar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in fastjar" ; \
-       (cd fastjar && \
+       (cd $(HOST_SUBDIR)/fastjar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6819,6 +7190,32 @@ dvi-fastjar: \
 
 @endif fastjar
 
+.PHONY: maybe-html-fastjar html-fastjar
+maybe-html-fastjar:
+@if fastjar
+maybe-html-fastjar: html-fastjar
+
+html-fastjar: \
+    configure-fastjar 
+       @[ -f ./fastjar/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in fastjar" ; \
+       (cd $(HOST_SUBDIR)/fastjar && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif fastjar
+
 .PHONY: maybe-TAGS-fastjar TAGS-fastjar
 maybe-TAGS-fastjar:
 @if fastjar
@@ -6835,7 +7232,7 @@ TAGS-fastjar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in fastjar" ; \
-       (cd fastjar && \
+       (cd $(HOST_SUBDIR)/fastjar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6862,7 +7259,7 @@ install-info-fastjar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in fastjar" ; \
-       (cd fastjar && \
+       (cd $(HOST_SUBDIR)/fastjar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6888,7 +7285,7 @@ installcheck-fastjar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in fastjar" ; \
-       (cd fastjar && \
+       (cd $(HOST_SUBDIR)/fastjar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6913,7 +7310,7 @@ mostlyclean-fastjar:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in fastjar" ; \
-       (cd fastjar && \
+       (cd $(HOST_SUBDIR)/fastjar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6938,7 +7335,7 @@ clean-fastjar:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in fastjar" ; \
-       (cd fastjar && \
+       (cd $(HOST_SUBDIR)/fastjar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6963,7 +7360,7 @@ distclean-fastjar:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in fastjar" ; \
-       (cd fastjar && \
+       (cd $(HOST_SUBDIR)/fastjar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -6988,7 +7385,7 @@ maintainer-clean-fastjar:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in fastjar" ; \
-       (cd fastjar && \
+       (cd $(HOST_SUBDIR)/fastjar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7004,24 +7401,20 @@ maybe-configure-fileutils:
 @if fileutils
 maybe-configure-fileutils: configure-fileutils
 configure-fileutils:
-       @test ! -f fileutils/Makefile || exit 0; \
-       [ -d fileutils ] || mkdir fileutils; \
+       @test ! -f $(HOST_SUBDIR)/fileutils/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fileutils ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in fileutils; \
-       cd fileutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/fileutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/fileutils"; \
+       libsrcdir="$$s/fileutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -7030,13 +7423,15 @@ configure-fileutils:
 .PHONY: all-fileutils maybe-all-fileutils
 maybe-all-fileutils:
 @if fileutils
+TARGET-fileutils=all
 maybe-all-fileutils: all-fileutils
 all-fileutils: configure-fileutils
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd fileutils && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/fileutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-fileutils))
 @endif fileutils
 
 .PHONY: check-fileutils maybe-check-fileutils
@@ -7049,7 +7444,8 @@ check-fileutils:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/fileutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif fileutils
 
@@ -7063,7 +7459,8 @@ install-fileutils: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/fileutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif fileutils
 
@@ -7085,7 +7482,7 @@ info-fileutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in fileutils" ; \
-       (cd fileutils && \
+       (cd $(HOST_SUBDIR)/fileutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7111,7 +7508,7 @@ dvi-fileutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in fileutils" ; \
-       (cd fileutils && \
+       (cd $(HOST_SUBDIR)/fileutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7121,6 +7518,32 @@ dvi-fileutils: \
 
 @endif fileutils
 
+.PHONY: maybe-html-fileutils html-fileutils
+maybe-html-fileutils:
+@if fileutils
+maybe-html-fileutils: html-fileutils
+
+html-fileutils: \
+    configure-fileutils 
+       @[ -f ./fileutils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in fileutils" ; \
+       (cd $(HOST_SUBDIR)/fileutils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif fileutils
+
 .PHONY: maybe-TAGS-fileutils TAGS-fileutils
 maybe-TAGS-fileutils:
 @if fileutils
@@ -7137,7 +7560,7 @@ TAGS-fileutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in fileutils" ; \
-       (cd fileutils && \
+       (cd $(HOST_SUBDIR)/fileutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7164,7 +7587,7 @@ install-info-fileutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in fileutils" ; \
-       (cd fileutils && \
+       (cd $(HOST_SUBDIR)/fileutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7190,7 +7613,7 @@ installcheck-fileutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in fileutils" ; \
-       (cd fileutils && \
+       (cd $(HOST_SUBDIR)/fileutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7215,7 +7638,7 @@ mostlyclean-fileutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in fileutils" ; \
-       (cd fileutils && \
+       (cd $(HOST_SUBDIR)/fileutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7240,7 +7663,7 @@ clean-fileutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in fileutils" ; \
-       (cd fileutils && \
+       (cd $(HOST_SUBDIR)/fileutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7265,7 +7688,7 @@ distclean-fileutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in fileutils" ; \
-       (cd fileutils && \
+       (cd $(HOST_SUBDIR)/fileutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7290,7 +7713,7 @@ maintainer-clean-fileutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in fileutils" ; \
-       (cd fileutils && \
+       (cd $(HOST_SUBDIR)/fileutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7306,24 +7729,20 @@ maybe-configure-findutils:
 @if findutils
 maybe-configure-findutils: configure-findutils
 configure-findutils:
-       @test ! -f findutils/Makefile || exit 0; \
-       [ -d findutils ] || mkdir findutils; \
+       @test ! -f $(HOST_SUBDIR)/findutils/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/findutils ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in findutils; \
-       cd findutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/findutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/findutils"; \
+       libsrcdir="$$s/findutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -7332,13 +7751,15 @@ configure-findutils:
 .PHONY: all-findutils maybe-all-findutils
 maybe-all-findutils:
 @if findutils
+TARGET-findutils=all
 maybe-all-findutils: all-findutils
 all-findutils: configure-findutils
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd findutils && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/findutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-findutils))
 @endif findutils
 
 .PHONY: check-findutils maybe-check-findutils
@@ -7351,7 +7772,8 @@ check-findutils:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/findutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif findutils
 
@@ -7365,7 +7787,8 @@ install-findutils: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/findutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif findutils
 
@@ -7387,7 +7810,7 @@ info-findutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in findutils" ; \
-       (cd findutils && \
+       (cd $(HOST_SUBDIR)/findutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7413,7 +7836,7 @@ dvi-findutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in findutils" ; \
-       (cd findutils && \
+       (cd $(HOST_SUBDIR)/findutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7423,6 +7846,32 @@ dvi-findutils: \
 
 @endif findutils
 
+.PHONY: maybe-html-findutils html-findutils
+maybe-html-findutils:
+@if findutils
+maybe-html-findutils: html-findutils
+
+html-findutils: \
+    configure-findutils 
+       @[ -f ./findutils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in findutils" ; \
+       (cd $(HOST_SUBDIR)/findutils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif findutils
+
 .PHONY: maybe-TAGS-findutils TAGS-findutils
 maybe-TAGS-findutils:
 @if findutils
@@ -7439,7 +7888,7 @@ TAGS-findutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in findutils" ; \
-       (cd findutils && \
+       (cd $(HOST_SUBDIR)/findutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7466,7 +7915,7 @@ install-info-findutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in findutils" ; \
-       (cd findutils && \
+       (cd $(HOST_SUBDIR)/findutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7492,7 +7941,7 @@ installcheck-findutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in findutils" ; \
-       (cd findutils && \
+       (cd $(HOST_SUBDIR)/findutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7517,7 +7966,7 @@ mostlyclean-findutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in findutils" ; \
-       (cd findutils && \
+       (cd $(HOST_SUBDIR)/findutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7542,7 +7991,7 @@ clean-findutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in findutils" ; \
-       (cd findutils && \
+       (cd $(HOST_SUBDIR)/findutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7567,7 +8016,7 @@ distclean-findutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in findutils" ; \
-       (cd findutils && \
+       (cd $(HOST_SUBDIR)/findutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7592,7 +8041,7 @@ maintainer-clean-findutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in findutils" ; \
-       (cd findutils && \
+       (cd $(HOST_SUBDIR)/findutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7608,24 +8057,20 @@ maybe-configure-find:
 @if find
 maybe-configure-find: configure-find
 configure-find:
-       @test ! -f find/Makefile || exit 0; \
-       [ -d find ] || mkdir find; \
+       @test ! -f $(HOST_SUBDIR)/find/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/find ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in find; \
-       cd find || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/find/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/find"; \
+       libsrcdir="$$s/find"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -7634,13 +8079,15 @@ configure-find:
 .PHONY: all-find maybe-all-find
 maybe-all-find:
 @if find
+TARGET-find=all
 maybe-all-find: all-find
 all-find: configure-find
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd find && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/find && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-find))
 @endif find
 
 .PHONY: check-find maybe-check-find
@@ -7653,7 +8100,8 @@ check-find:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd find && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/find && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif find
 
@@ -7667,7 +8115,8 @@ install-find: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd find && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/find && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif find
 
@@ -7689,7 +8138,7 @@ info-find: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in find" ; \
-       (cd find && \
+       (cd $(HOST_SUBDIR)/find && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7715,7 +8164,7 @@ dvi-find: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in find" ; \
-       (cd find && \
+       (cd $(HOST_SUBDIR)/find && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7725,6 +8174,32 @@ dvi-find: \
 
 @endif find
 
+.PHONY: maybe-html-find html-find
+maybe-html-find:
+@if find
+maybe-html-find: html-find
+
+html-find: \
+    configure-find 
+       @[ -f ./find/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in find" ; \
+       (cd $(HOST_SUBDIR)/find && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif find
+
 .PHONY: maybe-TAGS-find TAGS-find
 maybe-TAGS-find:
 @if find
@@ -7741,7 +8216,7 @@ TAGS-find: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in find" ; \
-       (cd find && \
+       (cd $(HOST_SUBDIR)/find && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7768,7 +8243,7 @@ install-info-find: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in find" ; \
-       (cd find && \
+       (cd $(HOST_SUBDIR)/find && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7794,7 +8269,7 @@ installcheck-find: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in find" ; \
-       (cd find && \
+       (cd $(HOST_SUBDIR)/find && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7819,7 +8294,7 @@ mostlyclean-find:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in find" ; \
-       (cd find && \
+       (cd $(HOST_SUBDIR)/find && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7844,7 +8319,7 @@ clean-find:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in find" ; \
-       (cd find && \
+       (cd $(HOST_SUBDIR)/find && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7869,7 +8344,7 @@ distclean-find:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in find" ; \
-       (cd find && \
+       (cd $(HOST_SUBDIR)/find && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7894,7 +8369,7 @@ maintainer-clean-find:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in find" ; \
-       (cd find && \
+       (cd $(HOST_SUBDIR)/find && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -7905,87 +8380,104 @@ maintainer-clean-find:
 @endif find
 
 
-.PHONY: configure-flex maybe-configure-flex
-maybe-configure-flex:
-@if flex
-maybe-configure-flex: configure-flex
-configure-flex:
-       @test ! -f flex/Makefile || exit 0; \
-       [ -d flex ] || mkdir flex; \
+.PHONY: configure-fixincludes maybe-configure-fixincludes
+maybe-configure-fixincludes:
+@if fixincludes
+maybe-configure-fixincludes: configure-fixincludes
+configure-fixincludes:
+       @test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
-       echo Configuring in flex; \
-       cd flex || exit 1; \
+       echo Configuring in fixincludes; \
+       cd $(HOST_SUBDIR)/fixincludes || 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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/fixincludes"; \
+       libsrcdir="$$s/fixincludes"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
-@endif flex
+@endif fixincludes
 
-.PHONY: all-flex maybe-all-flex
-maybe-all-flex:
-@if flex
-maybe-all-flex: all-flex
-all-flex: configure-flex
+.PHONY: all-fixincludes maybe-all-fixincludes
+maybe-all-fixincludes:
+@if fixincludes
+TARGET-fixincludes=all
+maybe-all-fixincludes: all-fixincludes
+all-fixincludes: configure-fixincludes
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd flex && $(MAKE) $(FLAGS_TO_PASS)  all)
-@endif flex
+       (cd $(HOST_SUBDIR)/fixincludes && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-fixincludes))
+@endif fixincludes
 
-.PHONY: check-flex maybe-check-flex
-maybe-check-flex:
-@if flex
-maybe-check-flex: check-flex
+.PHONY: check-fixincludes maybe-check-fixincludes
+maybe-check-fixincludes:
+@if fixincludes
+maybe-check-fixincludes: check-fixincludes
 
-# This module is only tested in a native toolchain.
-check-flex:
-       @if [ '$(host)' = '$(target)' ] ; then \
-         r=`${PWD_COMMAND}`; export r; \
-         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-         $(SET_LIB_PATH) \
-         $(HOST_EXPORTS) \
-         (cd flex && $(MAKE) $(FLAGS_TO_PASS)  check); \
-       fi
+check-fixincludes:
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/fixincludes && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
-@endif flex
+@endif fixincludes
 
-.PHONY: install-flex maybe-install-flex
-maybe-install-flex:
-@if flex
-maybe-install-flex: install-flex
+.PHONY: install-fixincludes maybe-install-fixincludes
+maybe-install-fixincludes:
+@if fixincludes
+maybe-install-fixincludes: install-fixincludes
 
-install-flex: installdirs
+install-fixincludes: installdirs
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd flex && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/fixincludes && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
-@endif flex
+@endif fixincludes
 
 # Other targets (info, dvi, etc.)
 
-.PHONY: maybe-info-flex info-flex
-maybe-info-flex:
-@if flex
-maybe-info-flex: info-flex
+.PHONY: maybe-info-fixincludes info-fixincludes
+maybe-info-fixincludes:
+@if fixincludes
+maybe-info-fixincludes: info-fixincludes
 
-info-flex: \
-    configure-flex 
-       @[ -f ./flex/Makefile ] || exit 0; \
+# fixincludes doesn't support info.
+info-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-dvi-fixincludes dvi-fixincludes
+maybe-dvi-fixincludes:
+@if fixincludes
+maybe-dvi-fixincludes: dvi-fixincludes
+
+# fixincludes doesn't support dvi.
+dvi-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-html-fixincludes html-fixincludes
+maybe-html-fixincludes:
+@if fixincludes
+maybe-html-fixincludes: html-fixincludes
+
+html-fixincludes: \
+    configure-fixincludes 
+       @[ -f ./fixincludes/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -7993,25 +8485,54 @@ info-flex: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing info in flex" ; \
-       (cd flex && \
+       echo "Doing html in fixincludes" ; \
+       (cd $(HOST_SUBDIR)/fixincludes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 info) \
+                 html) \
          || exit 1
 
-@endif flex
+@endif fixincludes
 
-.PHONY: maybe-dvi-flex dvi-flex
-maybe-dvi-flex:
-@if flex
-maybe-dvi-flex: dvi-flex
+.PHONY: maybe-TAGS-fixincludes TAGS-fixincludes
+maybe-TAGS-fixincludes:
+@if fixincludes
+maybe-TAGS-fixincludes: TAGS-fixincludes
 
-dvi-flex: \
-    configure-flex 
-       @[ -f ./flex/Makefile ] || exit 0; \
+# fixincludes doesn't support TAGS.
+TAGS-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-install-info-fixincludes install-info-fixincludes
+maybe-install-info-fixincludes:
+@if fixincludes
+maybe-install-info-fixincludes: install-info-fixincludes
+
+# fixincludes doesn't support install-info.
+install-info-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-installcheck-fixincludes installcheck-fixincludes
+maybe-installcheck-fixincludes:
+@if fixincludes
+maybe-installcheck-fixincludes: installcheck-fixincludes
+
+# fixincludes doesn't support installcheck.
+installcheck-fixincludes:
+
+@endif fixincludes
+
+.PHONY: maybe-mostlyclean-fixincludes mostlyclean-fixincludes
+maybe-mostlyclean-fixincludes:
+@if fixincludes
+maybe-mostlyclean-fixincludes: mostlyclean-fixincludes
+
+mostlyclean-fixincludes: 
+       @[ -f ./fixincludes/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -8019,25 +8540,24 @@ dvi-flex: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing dvi in flex" ; \
-       (cd flex && \
+       echo "Doing mostlyclean in fixincludes" ; \
+       (cd $(HOST_SUBDIR)/fixincludes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 dvi) \
+                 mostlyclean) \
          || exit 1
 
-@endif flex
+@endif fixincludes
 
-.PHONY: maybe-TAGS-flex TAGS-flex
-maybe-TAGS-flex:
-@if flex
-maybe-TAGS-flex: TAGS-flex
+.PHONY: maybe-clean-fixincludes clean-fixincludes
+maybe-clean-fixincludes:
+@if fixincludes
+maybe-clean-fixincludes: clean-fixincludes
 
-TAGS-flex: \
-    configure-flex 
-       @[ -f ./flex/Makefile ] || exit 0; \
+clean-fixincludes: 
+       @[ -f ./fixincludes/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -8045,26 +8565,24 @@ TAGS-flex: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing TAGS in flex" ; \
-       (cd flex && \
+       echo "Doing clean in fixincludes" ; \
+       (cd $(HOST_SUBDIR)/fixincludes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 TAGS) \
+                 clean) \
          || exit 1
 
-@endif flex
+@endif fixincludes
 
-.PHONY: maybe-install-info-flex install-info-flex
-maybe-install-info-flex:
-@if flex
-maybe-install-info-flex: install-info-flex
+.PHONY: maybe-distclean-fixincludes distclean-fixincludes
+maybe-distclean-fixincludes:
+@if fixincludes
+maybe-distclean-fixincludes: distclean-fixincludes
 
-install-info-flex: \
-    configure-flex \
-    info-flex 
-       @[ -f ./flex/Makefile ] || exit 0; \
+distclean-fixincludes: 
+       @[ -f ./fixincludes/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -8072,25 +8590,24 @@ install-info-flex: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing install-info in flex" ; \
-       (cd flex && \
+       echo "Doing distclean in fixincludes" ; \
+       (cd $(HOST_SUBDIR)/fixincludes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 install-info) \
+                 distclean) \
          || exit 1
 
-@endif flex
+@endif fixincludes
 
-.PHONY: maybe-installcheck-flex installcheck-flex
-maybe-installcheck-flex:
-@if flex
-maybe-installcheck-flex: installcheck-flex
+.PHONY: maybe-maintainer-clean-fixincludes maintainer-clean-fixincludes
+maybe-maintainer-clean-fixincludes:
+@if fixincludes
+maybe-maintainer-clean-fixincludes: maintainer-clean-fixincludes
 
-installcheck-flex: \
-    configure-flex 
-       @[ -f ./flex/Makefile ] || exit 0; \
+maintainer-clean-fixincludes: 
+       @[ -f ./fixincludes/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -8098,24 +8615,255 @@ installcheck-flex: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing installcheck in flex" ; \
-       (cd flex && \
+       echo "Doing maintainer-clean in fixincludes" ; \
+       (cd $(HOST_SUBDIR)/fixincludes && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 installcheck) \
+                 maintainer-clean) \
          || exit 1
 
-@endif flex
+@endif fixincludes
 
-.PHONY: maybe-mostlyclean-flex mostlyclean-flex
-maybe-mostlyclean-flex:
-@if flex
-maybe-mostlyclean-flex: mostlyclean-flex
 
-mostlyclean-flex: 
-       @[ -f ./flex/Makefile ] || exit 0; \
+.PHONY: configure-flex maybe-configure-flex
+maybe-configure-flex:
+@if flex
+maybe-configure-flex: configure-flex
+configure-flex:
+       @test ! -f $(HOST_SUBDIR)/flex/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/flex ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       echo Configuring in flex; \
+       cd $(HOST_SUBDIR)/flex || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/flex/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/flex"; \
+       libsrcdir="$$s/flex"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption}  \
+         || exit 1
+@endif flex
+
+.PHONY: all-flex maybe-all-flex
+maybe-all-flex:
+@if flex
+TARGET-flex=all
+maybe-all-flex: all-flex
+all-flex: configure-flex
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/flex && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-flex))
+@endif flex
+
+.PHONY: check-flex maybe-check-flex
+maybe-check-flex:
+@if flex
+maybe-check-flex: check-flex
+
+# This module is only tested in a native toolchain.
+check-flex:
+       @if [ '$(host)' = '$(target)' ] ; then \
+         r=`${PWD_COMMAND}`; export r; \
+         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+         $(SET_LIB_PATH) \
+         $(HOST_EXPORTS) \
+         (cd $(HOST_SUBDIR)/flex && \
+           $(MAKE) $(FLAGS_TO_PASS)  check)
+       fi
+
+@endif flex
+
+.PHONY: install-flex maybe-install-flex
+maybe-install-flex:
+@if flex
+maybe-install-flex: install-flex
+
+install-flex: installdirs
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/flex && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
+
+@endif flex
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-flex info-flex
+maybe-info-flex:
+@if flex
+maybe-info-flex: info-flex
+
+info-flex: \
+    configure-flex 
+       @[ -f ./flex/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing info in flex" ; \
+       (cd $(HOST_SUBDIR)/flex && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 info) \
+         || exit 1
+
+@endif flex
+
+.PHONY: maybe-dvi-flex dvi-flex
+maybe-dvi-flex:
+@if flex
+maybe-dvi-flex: dvi-flex
+
+dvi-flex: \
+    configure-flex 
+       @[ -f ./flex/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing dvi in flex" ; \
+       (cd $(HOST_SUBDIR)/flex && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 dvi) \
+         || exit 1
+
+@endif flex
+
+.PHONY: maybe-html-flex html-flex
+maybe-html-flex:
+@if flex
+maybe-html-flex: html-flex
+
+html-flex: \
+    configure-flex 
+       @[ -f ./flex/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in flex" ; \
+       (cd $(HOST_SUBDIR)/flex && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif flex
+
+.PHONY: maybe-TAGS-flex TAGS-flex
+maybe-TAGS-flex:
+@if flex
+maybe-TAGS-flex: TAGS-flex
+
+TAGS-flex: \
+    configure-flex 
+       @[ -f ./flex/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in flex" ; \
+       (cd $(HOST_SUBDIR)/flex && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 TAGS) \
+         || exit 1
+
+@endif flex
+
+.PHONY: maybe-install-info-flex install-info-flex
+maybe-install-info-flex:
+@if flex
+maybe-install-info-flex: install-info-flex
+
+install-info-flex: \
+    configure-flex \
+    info-flex 
+       @[ -f ./flex/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-info in flex" ; \
+       (cd $(HOST_SUBDIR)/flex && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 install-info) \
+         || exit 1
+
+@endif flex
+
+.PHONY: maybe-installcheck-flex installcheck-flex
+maybe-installcheck-flex:
+@if flex
+maybe-installcheck-flex: installcheck-flex
+
+installcheck-flex: \
+    configure-flex 
+       @[ -f ./flex/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing installcheck in flex" ; \
+       (cd $(HOST_SUBDIR)/flex && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 installcheck) \
+         || exit 1
+
+@endif flex
+
+.PHONY: maybe-mostlyclean-flex mostlyclean-flex
+maybe-mostlyclean-flex:
+@if flex
+maybe-mostlyclean-flex: mostlyclean-flex
+
+mostlyclean-flex: 
+       @[ -f ./flex/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -8124,7 +8872,7 @@ mostlyclean-flex:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in flex" ; \
-       (cd flex && \
+       (cd $(HOST_SUBDIR)/flex && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8149,7 +8897,7 @@ clean-flex:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in flex" ; \
-       (cd flex && \
+       (cd $(HOST_SUBDIR)/flex && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8174,7 +8922,7 @@ distclean-flex:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in flex" ; \
-       (cd flex && \
+       (cd $(HOST_SUBDIR)/flex && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8199,7 +8947,7 @@ maintainer-clean-flex:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in flex" ; \
-       (cd flex && \
+       (cd $(HOST_SUBDIR)/flex && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8216,24 +8964,20 @@ maybe-configure-gas:
 maybe-configure-gas: configure-gas
 configure-gas:
        @test -f stage_last && exit 0; \
-       test ! -f gas/Makefile || exit 0; \
-       [ -d gas ] || mkdir gas; \
+       test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in gas; \
-       cd gas || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gas"; \
+       libsrcdir="$$s/gas"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -8242,6 +8986,7 @@ configure-gas:
 .PHONY: all-gas maybe-all-gas
 maybe-all-gas:
 @if gas
+TARGET-gas=all
 maybe-all-gas: all-gas
 all-gas: configure-gas
        @test -f stage_last && exit 0; \
@@ -8249,7 +8994,8 @@ all-gas: configure-gas
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gas && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/gas && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-gas))
 @endif gas
 
 .PHONY: check-gas maybe-check-gas
@@ -8262,7 +9008,8 @@ check-gas:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gas && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/gas && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif gas
 
@@ -8276,7 +9023,8 @@ install-gas: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gas && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/gas && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif gas
 
@@ -8298,7 +9046,7 @@ info-gas: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in gas" ; \
-       (cd gas && \
+       (cd $(HOST_SUBDIR)/gas && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8324,7 +9072,7 @@ dvi-gas: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in gas" ; \
-       (cd gas && \
+       (cd $(HOST_SUBDIR)/gas && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8334,6 +9082,32 @@ dvi-gas: \
 
 @endif gas
 
+.PHONY: maybe-html-gas html-gas
+maybe-html-gas:
+@if gas
+maybe-html-gas: html-gas
+
+html-gas: \
+    configure-gas 
+       @[ -f ./gas/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in gas" ; \
+       (cd $(HOST_SUBDIR)/gas && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif gas
+
 .PHONY: maybe-TAGS-gas TAGS-gas
 maybe-TAGS-gas:
 @if gas
@@ -8350,7 +9124,7 @@ TAGS-gas: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in gas" ; \
-       (cd gas && \
+       (cd $(HOST_SUBDIR)/gas && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8377,7 +9151,7 @@ install-info-gas: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in gas" ; \
-       (cd gas && \
+       (cd $(HOST_SUBDIR)/gas && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8403,7 +9177,7 @@ installcheck-gas: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in gas" ; \
-       (cd gas && \
+       (cd $(HOST_SUBDIR)/gas && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8428,7 +9202,7 @@ mostlyclean-gas:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in gas" ; \
-       (cd gas && \
+       (cd $(HOST_SUBDIR)/gas && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8453,7 +9227,7 @@ clean-gas:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in gas" ; \
-       (cd gas && \
+       (cd $(HOST_SUBDIR)/gas && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8478,7 +9252,7 @@ distclean-gas:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in gas" ; \
-       (cd gas && \
+       (cd $(HOST_SUBDIR)/gas && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8503,7 +9277,7 @@ maintainer-clean-gas:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in gas" ; \
-       (cd gas && \
+       (cd $(HOST_SUBDIR)/gas && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8520,24 +9294,20 @@ maybe-configure-gcc:
 maybe-configure-gcc: configure-gcc
 configure-gcc:
        @test -f stage_last && exit 0; \
-       test ! -f gcc/Makefile || exit 0; \
-       [ -d gcc ] || mkdir gcc; \
+       test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in gcc; \
-       cd gcc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gcc"; \
+       libsrcdir="$$s/gcc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -8546,6 +9316,7 @@ configure-gcc:
 .PHONY: all-gcc maybe-all-gcc
 maybe-all-gcc:
 @if gcc
+TARGET-gcc=`if [ -f gcc/stage_last ]; then echo quickstrap ; else echo all; fi`
 maybe-all-gcc: all-gcc
 all-gcc: configure-gcc
        @test -f stage_last && exit 0; \
@@ -8553,8 +9324,8 @@ all-gcc: configure-gcc
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gcc && $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)  \
-           `if [ -f gcc/stage_last ]; then echo quickstrap ; else echo all; fi` )
+       (cd $(HOST_SUBDIR)/gcc && \
+         $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) $(TARGET-gcc))
 @endif gcc
 
 .PHONY: check-gcc maybe-check-gcc
@@ -8567,7 +9338,8 @@ check-gcc:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gcc && $(MAKE) $(FLAGS_TO_PASS)$(EXTRA_GCC_FLAGS) check)
+       (cd $(HOST_SUBDIR)/gcc && \
+         $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) check)
 
 @endif gcc
 
@@ -8581,7 +9353,8 @@ install-gcc: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gcc && $(MAKE) $(FLAGS_TO_PASS)$(EXTRA_GCC_FLAGS) install)
+       (cd $(HOST_SUBDIR)/gcc && \
+         $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) install)
 
 @endif gcc
 
@@ -8603,7 +9376,7 @@ info-gcc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in gcc" ; \
-       (cd gcc && \
+       (cd $(HOST_SUBDIR)/gcc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8629,7 +9402,7 @@ dvi-gcc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in gcc" ; \
-       (cd gcc && \
+       (cd $(HOST_SUBDIR)/gcc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8639,6 +9412,32 @@ dvi-gcc: \
 
 @endif gcc
 
+.PHONY: maybe-html-gcc html-gcc
+maybe-html-gcc:
+@if gcc
+maybe-html-gcc: html-gcc
+
+html-gcc: \
+    configure-gcc 
+       @[ -f ./gcc/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in gcc" ; \
+       (cd $(HOST_SUBDIR)/gcc && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif gcc
+
 .PHONY: maybe-TAGS-gcc TAGS-gcc
 maybe-TAGS-gcc:
 @if gcc
@@ -8655,7 +9454,7 @@ TAGS-gcc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in gcc" ; \
-       (cd gcc && \
+       (cd $(HOST_SUBDIR)/gcc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8682,7 +9481,7 @@ install-info-gcc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in gcc" ; \
-       (cd gcc && \
+       (cd $(HOST_SUBDIR)/gcc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8708,7 +9507,7 @@ installcheck-gcc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in gcc" ; \
-       (cd gcc && \
+       (cd $(HOST_SUBDIR)/gcc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8733,7 +9532,7 @@ mostlyclean-gcc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in gcc" ; \
-       (cd gcc && \
+       (cd $(HOST_SUBDIR)/gcc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8758,7 +9557,7 @@ clean-gcc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in gcc" ; \
-       (cd gcc && \
+       (cd $(HOST_SUBDIR)/gcc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8783,7 +9582,7 @@ distclean-gcc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in gcc" ; \
-       (cd gcc && \
+       (cd $(HOST_SUBDIR)/gcc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8808,7 +9607,7 @@ maintainer-clean-gcc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in gcc" ; \
-       (cd gcc && \
+       (cd $(HOST_SUBDIR)/gcc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8824,24 +9623,20 @@ maybe-configure-gawk:
 @if gawk
 maybe-configure-gawk: configure-gawk
 configure-gawk:
-       @test ! -f gawk/Makefile || exit 0; \
-       [ -d gawk ] || mkdir gawk; \
+       @test ! -f $(HOST_SUBDIR)/gawk/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gawk ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in gawk; \
-       cd gawk || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gawk/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gawk"; \
+       libsrcdir="$$s/gawk"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -8850,13 +9645,15 @@ configure-gawk:
 .PHONY: all-gawk maybe-all-gawk
 maybe-all-gawk:
 @if gawk
+TARGET-gawk=all
 maybe-all-gawk: all-gawk
 all-gawk: configure-gawk
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gawk && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/gawk && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-gawk))
 @endif gawk
 
 .PHONY: check-gawk maybe-check-gawk
@@ -8869,7 +9666,8 @@ check-gawk:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/gawk && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif gawk
 
@@ -8883,7 +9681,8 @@ install-gawk: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/gawk && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif gawk
 
@@ -8905,7 +9704,7 @@ info-gawk: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in gawk" ; \
-       (cd gawk && \
+       (cd $(HOST_SUBDIR)/gawk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8931,7 +9730,7 @@ dvi-gawk: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in gawk" ; \
-       (cd gawk && \
+       (cd $(HOST_SUBDIR)/gawk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -8941,12 +9740,12 @@ dvi-gawk: \
 
 @endif gawk
 
-.PHONY: maybe-TAGS-gawk TAGS-gawk
-maybe-TAGS-gawk:
+.PHONY: maybe-html-gawk html-gawk
+maybe-html-gawk:
 @if gawk
-maybe-TAGS-gawk: TAGS-gawk
+maybe-html-gawk: html-gawk
 
-TAGS-gawk: \
+html-gawk: \
     configure-gawk 
        @[ -f ./gawk/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
@@ -8956,23 +9755,49 @@ TAGS-gawk: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing TAGS in gawk" ; \
-       (cd gawk && \
+       echo "Doing html in gawk" ; \
+       (cd $(HOST_SUBDIR)/gawk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 TAGS) \
+                 html) \
          || exit 1
 
 @endif gawk
 
-.PHONY: maybe-install-info-gawk install-info-gawk
-maybe-install-info-gawk:
+.PHONY: maybe-TAGS-gawk TAGS-gawk
+maybe-TAGS-gawk:
 @if gawk
-maybe-install-info-gawk: install-info-gawk
+maybe-TAGS-gawk: TAGS-gawk
 
-install-info-gawk: \
+TAGS-gawk: \
+    configure-gawk 
+       @[ -f ./gawk/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in gawk" ; \
+       (cd $(HOST_SUBDIR)/gawk && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 TAGS) \
+         || exit 1
+
+@endif gawk
+
+.PHONY: maybe-install-info-gawk install-info-gawk
+maybe-install-info-gawk:
+@if gawk
+maybe-install-info-gawk: install-info-gawk
+
+install-info-gawk: \
     configure-gawk \
     info-gawk 
        @[ -f ./gawk/Makefile ] || exit 0; \
@@ -8984,7 +9809,7 @@ install-info-gawk: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in gawk" ; \
-       (cd gawk && \
+       (cd $(HOST_SUBDIR)/gawk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9010,7 +9835,7 @@ installcheck-gawk: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in gawk" ; \
-       (cd gawk && \
+       (cd $(HOST_SUBDIR)/gawk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9035,7 +9860,7 @@ mostlyclean-gawk:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in gawk" ; \
-       (cd gawk && \
+       (cd $(HOST_SUBDIR)/gawk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9060,7 +9885,7 @@ clean-gawk:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in gawk" ; \
-       (cd gawk && \
+       (cd $(HOST_SUBDIR)/gawk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9085,7 +9910,7 @@ distclean-gawk:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in gawk" ; \
-       (cd gawk && \
+       (cd $(HOST_SUBDIR)/gawk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9110,7 +9935,7 @@ maintainer-clean-gawk:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in gawk" ; \
-       (cd gawk && \
+       (cd $(HOST_SUBDIR)/gawk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9126,24 +9951,20 @@ maybe-configure-gettext:
 @if gettext
 maybe-configure-gettext: configure-gettext
 configure-gettext:
-       @test ! -f gettext/Makefile || exit 0; \
-       [ -d gettext ] || mkdir gettext; \
+       @test ! -f $(HOST_SUBDIR)/gettext/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gettext ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in gettext; \
-       cd gettext || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gettext/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gettext"; \
+       libsrcdir="$$s/gettext"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -9152,13 +9973,15 @@ configure-gettext:
 .PHONY: all-gettext maybe-all-gettext
 maybe-all-gettext:
 @if gettext
+TARGET-gettext=all
 maybe-all-gettext: all-gettext
 all-gettext: configure-gettext
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gettext && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/gettext && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-gettext))
 @endif gettext
 
 .PHONY: check-gettext maybe-check-gettext
@@ -9171,7 +9994,8 @@ check-gettext:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/gettext && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif gettext
 
@@ -9185,7 +10009,8 @@ install-gettext: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/gettext && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif gettext
 
@@ -9207,7 +10032,7 @@ info-gettext: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in gettext" ; \
-       (cd gettext && \
+       (cd $(HOST_SUBDIR)/gettext && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9233,7 +10058,7 @@ dvi-gettext: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in gettext" ; \
-       (cd gettext && \
+       (cd $(HOST_SUBDIR)/gettext && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9243,6 +10068,32 @@ dvi-gettext: \
 
 @endif gettext
 
+.PHONY: maybe-html-gettext html-gettext
+maybe-html-gettext:
+@if gettext
+maybe-html-gettext: html-gettext
+
+html-gettext: \
+    configure-gettext 
+       @[ -f ./gettext/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in gettext" ; \
+       (cd $(HOST_SUBDIR)/gettext && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif gettext
+
 .PHONY: maybe-TAGS-gettext TAGS-gettext
 maybe-TAGS-gettext:
 @if gettext
@@ -9259,7 +10110,7 @@ TAGS-gettext: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in gettext" ; \
-       (cd gettext && \
+       (cd $(HOST_SUBDIR)/gettext && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9286,7 +10137,7 @@ install-info-gettext: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in gettext" ; \
-       (cd gettext && \
+       (cd $(HOST_SUBDIR)/gettext && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9312,7 +10163,7 @@ installcheck-gettext: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in gettext" ; \
-       (cd gettext && \
+       (cd $(HOST_SUBDIR)/gettext && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9337,7 +10188,7 @@ mostlyclean-gettext:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in gettext" ; \
-       (cd gettext && \
+       (cd $(HOST_SUBDIR)/gettext && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9362,7 +10213,7 @@ clean-gettext:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in gettext" ; \
-       (cd gettext && \
+       (cd $(HOST_SUBDIR)/gettext && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9387,7 +10238,7 @@ distclean-gettext:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in gettext" ; \
-       (cd gettext && \
+       (cd $(HOST_SUBDIR)/gettext && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9412,7 +10263,7 @@ maintainer-clean-gettext:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in gettext" ; \
-       (cd gettext && \
+       (cd $(HOST_SUBDIR)/gettext && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9428,24 +10279,20 @@ maybe-configure-gnuserv:
 @if gnuserv
 maybe-configure-gnuserv: configure-gnuserv
 configure-gnuserv:
-       @test ! -f gnuserv/Makefile || exit 0; \
-       [ -d gnuserv ] || mkdir gnuserv; \
+       @test ! -f $(HOST_SUBDIR)/gnuserv/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gnuserv ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in gnuserv; \
-       cd gnuserv || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gnuserv/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gnuserv"; \
+       libsrcdir="$$s/gnuserv"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -9454,13 +10301,15 @@ configure-gnuserv:
 .PHONY: all-gnuserv maybe-all-gnuserv
 maybe-all-gnuserv:
 @if gnuserv
+TARGET-gnuserv=all
 maybe-all-gnuserv: all-gnuserv
 all-gnuserv: configure-gnuserv
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/gnuserv && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-gnuserv))
 @endif gnuserv
 
 .PHONY: check-gnuserv maybe-check-gnuserv
@@ -9473,7 +10322,8 @@ check-gnuserv:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/gnuserv && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif gnuserv
 
@@ -9487,7 +10337,8 @@ install-gnuserv: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/gnuserv && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif gnuserv
 
@@ -9509,7 +10360,7 @@ info-gnuserv: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in gnuserv" ; \
-       (cd gnuserv && \
+       (cd $(HOST_SUBDIR)/gnuserv && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9535,7 +10386,7 @@ dvi-gnuserv: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in gnuserv" ; \
-       (cd gnuserv && \
+       (cd $(HOST_SUBDIR)/gnuserv && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9545,6 +10396,32 @@ dvi-gnuserv: \
 
 @endif gnuserv
 
+.PHONY: maybe-html-gnuserv html-gnuserv
+maybe-html-gnuserv:
+@if gnuserv
+maybe-html-gnuserv: html-gnuserv
+
+html-gnuserv: \
+    configure-gnuserv 
+       @[ -f ./gnuserv/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in gnuserv" ; \
+       (cd $(HOST_SUBDIR)/gnuserv && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif gnuserv
+
 .PHONY: maybe-TAGS-gnuserv TAGS-gnuserv
 maybe-TAGS-gnuserv:
 @if gnuserv
@@ -9561,7 +10438,7 @@ TAGS-gnuserv: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in gnuserv" ; \
-       (cd gnuserv && \
+       (cd $(HOST_SUBDIR)/gnuserv && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9588,7 +10465,7 @@ install-info-gnuserv: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in gnuserv" ; \
-       (cd gnuserv && \
+       (cd $(HOST_SUBDIR)/gnuserv && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9614,7 +10491,7 @@ installcheck-gnuserv: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in gnuserv" ; \
-       (cd gnuserv && \
+       (cd $(HOST_SUBDIR)/gnuserv && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9639,7 +10516,7 @@ mostlyclean-gnuserv:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in gnuserv" ; \
-       (cd gnuserv && \
+       (cd $(HOST_SUBDIR)/gnuserv && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9664,7 +10541,7 @@ clean-gnuserv:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in gnuserv" ; \
-       (cd gnuserv && \
+       (cd $(HOST_SUBDIR)/gnuserv && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9689,7 +10566,7 @@ distclean-gnuserv:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in gnuserv" ; \
-       (cd gnuserv && \
+       (cd $(HOST_SUBDIR)/gnuserv && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9714,7 +10591,7 @@ maintainer-clean-gnuserv:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in gnuserv" ; \
-       (cd gnuserv && \
+       (cd $(HOST_SUBDIR)/gnuserv && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9730,24 +10607,20 @@ maybe-configure-gprof:
 @if gprof
 maybe-configure-gprof: configure-gprof
 configure-gprof:
-       @test ! -f gprof/Makefile || exit 0; \
-       [ -d gprof ] || mkdir gprof; \
+       @test ! -f $(HOST_SUBDIR)/gprof/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprof ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in gprof; \
-       cd gprof || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gprof/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gprof"; \
+       libsrcdir="$$s/gprof"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -9756,13 +10629,15 @@ configure-gprof:
 .PHONY: all-gprof maybe-all-gprof
 maybe-all-gprof:
 @if gprof
+TARGET-gprof=all
 maybe-all-gprof: all-gprof
 all-gprof: configure-gprof
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gprof && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/gprof && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-gprof))
 @endif gprof
 
 .PHONY: check-gprof maybe-check-gprof
@@ -9775,7 +10650,8 @@ check-gprof:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/gprof && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif gprof
 
@@ -9789,7 +10665,8 @@ install-gprof: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/gprof && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif gprof
 
@@ -9811,7 +10688,7 @@ info-gprof: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in gprof" ; \
-       (cd gprof && \
+       (cd $(HOST_SUBDIR)/gprof && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9837,7 +10714,7 @@ dvi-gprof: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in gprof" ; \
-       (cd gprof && \
+       (cd $(HOST_SUBDIR)/gprof && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9847,6 +10724,32 @@ dvi-gprof: \
 
 @endif gprof
 
+.PHONY: maybe-html-gprof html-gprof
+maybe-html-gprof:
+@if gprof
+maybe-html-gprof: html-gprof
+
+html-gprof: \
+    configure-gprof 
+       @[ -f ./gprof/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in gprof" ; \
+       (cd $(HOST_SUBDIR)/gprof && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif gprof
+
 .PHONY: maybe-TAGS-gprof TAGS-gprof
 maybe-TAGS-gprof:
 @if gprof
@@ -9863,7 +10766,7 @@ TAGS-gprof: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in gprof" ; \
-       (cd gprof && \
+       (cd $(HOST_SUBDIR)/gprof && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9890,7 +10793,7 @@ install-info-gprof: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in gprof" ; \
-       (cd gprof && \
+       (cd $(HOST_SUBDIR)/gprof && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9916,7 +10819,7 @@ installcheck-gprof: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in gprof" ; \
-       (cd gprof && \
+       (cd $(HOST_SUBDIR)/gprof && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9941,7 +10844,7 @@ mostlyclean-gprof:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in gprof" ; \
-       (cd gprof && \
+       (cd $(HOST_SUBDIR)/gprof && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9966,7 +10869,7 @@ clean-gprof:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in gprof" ; \
-       (cd gprof && \
+       (cd $(HOST_SUBDIR)/gprof && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -9991,7 +10894,7 @@ distclean-gprof:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in gprof" ; \
-       (cd gprof && \
+       (cd $(HOST_SUBDIR)/gprof && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10016,7 +10919,7 @@ maintainer-clean-gprof:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in gprof" ; \
-       (cd gprof && \
+       (cd $(HOST_SUBDIR)/gprof && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10032,24 +10935,20 @@ maybe-configure-gzip:
 @if gzip
 maybe-configure-gzip: configure-gzip
 configure-gzip:
-       @test ! -f gzip/Makefile || exit 0; \
-       [ -d gzip ] || mkdir gzip; \
+       @test ! -f $(HOST_SUBDIR)/gzip/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gzip ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in gzip; \
-       cd gzip || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gzip/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gzip"; \
+       libsrcdir="$$s/gzip"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -10058,13 +10957,15 @@ configure-gzip:
 .PHONY: all-gzip maybe-all-gzip
 maybe-all-gzip:
 @if gzip
+TARGET-gzip=all
 maybe-all-gzip: all-gzip
 all-gzip: configure-gzip
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gzip && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/gzip && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-gzip))
 @endif gzip
 
 .PHONY: check-gzip maybe-check-gzip
@@ -10077,7 +10978,8 @@ check-gzip:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/gzip && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif gzip
 
@@ -10091,7 +10993,8 @@ install-gzip: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/gzip && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif gzip
 
@@ -10113,7 +11016,7 @@ info-gzip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in gzip" ; \
-       (cd gzip && \
+       (cd $(HOST_SUBDIR)/gzip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10139,7 +11042,7 @@ dvi-gzip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in gzip" ; \
-       (cd gzip && \
+       (cd $(HOST_SUBDIR)/gzip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10149,6 +11052,32 @@ dvi-gzip: \
 
 @endif gzip
 
+.PHONY: maybe-html-gzip html-gzip
+maybe-html-gzip:
+@if gzip
+maybe-html-gzip: html-gzip
+
+html-gzip: \
+    configure-gzip 
+       @[ -f ./gzip/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in gzip" ; \
+       (cd $(HOST_SUBDIR)/gzip && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif gzip
+
 .PHONY: maybe-TAGS-gzip TAGS-gzip
 maybe-TAGS-gzip:
 @if gzip
@@ -10165,7 +11094,7 @@ TAGS-gzip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in gzip" ; \
-       (cd gzip && \
+       (cd $(HOST_SUBDIR)/gzip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10192,7 +11121,7 @@ install-info-gzip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in gzip" ; \
-       (cd gzip && \
+       (cd $(HOST_SUBDIR)/gzip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10218,7 +11147,7 @@ installcheck-gzip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in gzip" ; \
-       (cd gzip && \
+       (cd $(HOST_SUBDIR)/gzip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10243,7 +11172,7 @@ mostlyclean-gzip:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in gzip" ; \
-       (cd gzip && \
+       (cd $(HOST_SUBDIR)/gzip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10268,7 +11197,7 @@ clean-gzip:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in gzip" ; \
-       (cd gzip && \
+       (cd $(HOST_SUBDIR)/gzip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10293,7 +11222,7 @@ distclean-gzip:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in gzip" ; \
-       (cd gzip && \
+       (cd $(HOST_SUBDIR)/gzip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10318,7 +11247,7 @@ maintainer-clean-gzip:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in gzip" ; \
-       (cd gzip && \
+       (cd $(HOST_SUBDIR)/gzip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10334,24 +11263,20 @@ maybe-configure-hello:
 @if hello
 maybe-configure-hello: configure-hello
 configure-hello:
-       @test ! -f hello/Makefile || exit 0; \
-       [ -d hello ] || mkdir hello; \
+       @test ! -f $(HOST_SUBDIR)/hello/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/hello ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in hello; \
-       cd hello || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/hello/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/hello"; \
+       libsrcdir="$$s/hello"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -10360,13 +11285,15 @@ configure-hello:
 .PHONY: all-hello maybe-all-hello
 maybe-all-hello:
 @if hello
+TARGET-hello=all
 maybe-all-hello: all-hello
 all-hello: configure-hello
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd hello && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/hello && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-hello))
 @endif hello
 
 .PHONY: check-hello maybe-check-hello
@@ -10379,7 +11306,8 @@ check-hello:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd hello && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/hello && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif hello
 
@@ -10393,7 +11321,8 @@ install-hello: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd hello && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/hello && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif hello
 
@@ -10415,7 +11344,7 @@ info-hello: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in hello" ; \
-       (cd hello && \
+       (cd $(HOST_SUBDIR)/hello && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10441,7 +11370,7 @@ dvi-hello: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in hello" ; \
-       (cd hello && \
+       (cd $(HOST_SUBDIR)/hello && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10451,6 +11380,32 @@ dvi-hello: \
 
 @endif hello
 
+.PHONY: maybe-html-hello html-hello
+maybe-html-hello:
+@if hello
+maybe-html-hello: html-hello
+
+html-hello: \
+    configure-hello 
+       @[ -f ./hello/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in hello" ; \
+       (cd $(HOST_SUBDIR)/hello && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif hello
+
 .PHONY: maybe-TAGS-hello TAGS-hello
 maybe-TAGS-hello:
 @if hello
@@ -10467,7 +11422,7 @@ TAGS-hello: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in hello" ; \
-       (cd hello && \
+       (cd $(HOST_SUBDIR)/hello && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10494,7 +11449,7 @@ install-info-hello: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in hello" ; \
-       (cd hello && \
+       (cd $(HOST_SUBDIR)/hello && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10520,7 +11475,7 @@ installcheck-hello: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in hello" ; \
-       (cd hello && \
+       (cd $(HOST_SUBDIR)/hello && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10545,7 +11500,7 @@ mostlyclean-hello:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in hello" ; \
-       (cd hello && \
+       (cd $(HOST_SUBDIR)/hello && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10570,7 +11525,7 @@ clean-hello:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in hello" ; \
-       (cd hello && \
+       (cd $(HOST_SUBDIR)/hello && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10595,7 +11550,7 @@ distclean-hello:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in hello" ; \
-       (cd hello && \
+       (cd $(HOST_SUBDIR)/hello && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10620,7 +11575,7 @@ maintainer-clean-hello:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in hello" ; \
-       (cd hello && \
+       (cd $(HOST_SUBDIR)/hello && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10636,24 +11591,20 @@ maybe-configure-indent:
 @if indent
 maybe-configure-indent: configure-indent
 configure-indent:
-       @test ! -f indent/Makefile || exit 0; \
-       [ -d indent ] || mkdir indent; \
+       @test ! -f $(HOST_SUBDIR)/indent/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/indent ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in indent; \
-       cd indent || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/indent/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/indent"; \
+       libsrcdir="$$s/indent"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -10662,13 +11613,15 @@ configure-indent:
 .PHONY: all-indent maybe-all-indent
 maybe-all-indent:
 @if indent
+TARGET-indent=all
 maybe-all-indent: all-indent
 all-indent: configure-indent
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd indent && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/indent && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-indent))
 @endif indent
 
 .PHONY: check-indent maybe-check-indent
@@ -10681,7 +11634,8 @@ check-indent:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd indent && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/indent && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif indent
 
@@ -10695,7 +11649,8 @@ install-indent: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd indent && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/indent && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif indent
 
@@ -10717,7 +11672,7 @@ info-indent: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in indent" ; \
-       (cd indent && \
+       (cd $(HOST_SUBDIR)/indent && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10743,7 +11698,7 @@ dvi-indent: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in indent" ; \
-       (cd indent && \
+       (cd $(HOST_SUBDIR)/indent && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10753,6 +11708,32 @@ dvi-indent: \
 
 @endif indent
 
+.PHONY: maybe-html-indent html-indent
+maybe-html-indent:
+@if indent
+maybe-html-indent: html-indent
+
+html-indent: \
+    configure-indent 
+       @[ -f ./indent/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in indent" ; \
+       (cd $(HOST_SUBDIR)/indent && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif indent
+
 .PHONY: maybe-TAGS-indent TAGS-indent
 maybe-TAGS-indent:
 @if indent
@@ -10769,7 +11750,7 @@ TAGS-indent: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in indent" ; \
-       (cd indent && \
+       (cd $(HOST_SUBDIR)/indent && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10796,7 +11777,7 @@ install-info-indent: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in indent" ; \
-       (cd indent && \
+       (cd $(HOST_SUBDIR)/indent && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10822,7 +11803,7 @@ installcheck-indent: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in indent" ; \
-       (cd indent && \
+       (cd $(HOST_SUBDIR)/indent && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10847,7 +11828,7 @@ mostlyclean-indent:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in indent" ; \
-       (cd indent && \
+       (cd $(HOST_SUBDIR)/indent && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10872,7 +11853,7 @@ clean-indent:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in indent" ; \
-       (cd indent && \
+       (cd $(HOST_SUBDIR)/indent && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10897,7 +11878,7 @@ distclean-indent:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in indent" ; \
-       (cd indent && \
+       (cd $(HOST_SUBDIR)/indent && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10922,7 +11903,7 @@ maintainer-clean-indent:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in indent" ; \
-       (cd indent && \
+       (cd $(HOST_SUBDIR)/indent && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -10939,24 +11920,20 @@ maybe-configure-intl:
 maybe-configure-intl: configure-intl
 configure-intl:
        @test -f stage_last && exit 0; \
-       test ! -f intl/Makefile || exit 0; \
-       [ -d intl ] || mkdir intl; \
+       test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in intl; \
-       cd intl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/intl"; \
+       libsrcdir="$$s/intl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -10965,6 +11942,7 @@ configure-intl:
 .PHONY: all-intl maybe-all-intl
 maybe-all-intl:
 @if intl
+TARGET-intl=all
 maybe-all-intl: all-intl
 all-intl: configure-intl
        @test -f stage_last && exit 0; \
@@ -10972,7 +11950,8 @@ all-intl: configure-intl
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd intl && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/intl && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-intl))
 @endif intl
 
 .PHONY: check-intl maybe-check-intl
@@ -10985,7 +11964,8 @@ check-intl:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd intl && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/intl && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif intl
 
@@ -10999,7 +11979,8 @@ install-intl: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd intl && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/intl && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif intl
 
@@ -11021,7 +12002,7 @@ info-intl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in intl" ; \
-       (cd intl && \
+       (cd $(HOST_SUBDIR)/intl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11047,7 +12028,7 @@ dvi-intl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in intl" ; \
-       (cd intl && \
+       (cd $(HOST_SUBDIR)/intl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11057,6 +12038,32 @@ dvi-intl: \
 
 @endif intl
 
+.PHONY: maybe-html-intl html-intl
+maybe-html-intl:
+@if intl
+maybe-html-intl: html-intl
+
+html-intl: \
+    configure-intl 
+       @[ -f ./intl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in intl" ; \
+       (cd $(HOST_SUBDIR)/intl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif intl
+
 .PHONY: maybe-TAGS-intl TAGS-intl
 maybe-TAGS-intl:
 @if intl
@@ -11073,7 +12080,7 @@ TAGS-intl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in intl" ; \
-       (cd intl && \
+       (cd $(HOST_SUBDIR)/intl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11100,7 +12107,7 @@ install-info-intl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in intl" ; \
-       (cd intl && \
+       (cd $(HOST_SUBDIR)/intl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11126,7 +12133,7 @@ installcheck-intl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in intl" ; \
-       (cd intl && \
+       (cd $(HOST_SUBDIR)/intl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11151,7 +12158,7 @@ mostlyclean-intl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in intl" ; \
-       (cd intl && \
+       (cd $(HOST_SUBDIR)/intl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11176,7 +12183,7 @@ clean-intl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in intl" ; \
-       (cd intl && \
+       (cd $(HOST_SUBDIR)/intl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11201,7 +12208,7 @@ distclean-intl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in intl" ; \
-       (cd intl && \
+       (cd $(HOST_SUBDIR)/intl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11226,7 +12233,7 @@ maintainer-clean-intl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in intl" ; \
-       (cd intl && \
+       (cd $(HOST_SUBDIR)/intl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11242,24 +12249,20 @@ maybe-configure-tcl:
 @if tcl
 maybe-configure-tcl: configure-tcl
 configure-tcl:
-       @test ! -f tcl/Makefile || exit 0; \
-       [ -d tcl ] || mkdir tcl; \
+       @test ! -f $(HOST_SUBDIR)/tcl/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tcl ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in tcl; \
-       cd tcl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/tcl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/tcl"; \
+       libsrcdir="$$s/tcl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -11268,13 +12271,15 @@ configure-tcl:
 .PHONY: all-tcl maybe-all-tcl
 maybe-all-tcl:
 @if tcl
+TARGET-tcl=all
 maybe-all-tcl: all-tcl
 all-tcl: configure-tcl
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd tcl && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/tcl && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-tcl))
 @endif tcl
 
 .PHONY: check-tcl maybe-check-tcl
@@ -11287,7 +12292,8 @@ check-tcl:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/tcl && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif tcl
 
@@ -11301,7 +12307,8 @@ install-tcl: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/tcl && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif tcl
 
@@ -11323,7 +12330,7 @@ info-tcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in tcl" ; \
-       (cd tcl && \
+       (cd $(HOST_SUBDIR)/tcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11349,7 +12356,7 @@ dvi-tcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in tcl" ; \
-       (cd tcl && \
+       (cd $(HOST_SUBDIR)/tcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11359,6 +12366,32 @@ dvi-tcl: \
 
 @endif tcl
 
+.PHONY: maybe-html-tcl html-tcl
+maybe-html-tcl:
+@if tcl
+maybe-html-tcl: html-tcl
+
+html-tcl: \
+    configure-tcl 
+       @[ -f ./tcl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in tcl" ; \
+       (cd $(HOST_SUBDIR)/tcl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif tcl
+
 .PHONY: maybe-TAGS-tcl TAGS-tcl
 maybe-TAGS-tcl:
 @if tcl
@@ -11375,7 +12408,7 @@ TAGS-tcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in tcl" ; \
-       (cd tcl && \
+       (cd $(HOST_SUBDIR)/tcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11402,7 +12435,7 @@ install-info-tcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in tcl" ; \
-       (cd tcl && \
+       (cd $(HOST_SUBDIR)/tcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11428,7 +12461,7 @@ installcheck-tcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in tcl" ; \
-       (cd tcl && \
+       (cd $(HOST_SUBDIR)/tcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11463,7 +12496,7 @@ clean-tcl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in tcl" ; \
-       (cd tcl && \
+       (cd $(HOST_SUBDIR)/tcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11488,7 +12521,7 @@ distclean-tcl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in tcl" ; \
-       (cd tcl && \
+       (cd $(HOST_SUBDIR)/tcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11513,7 +12546,7 @@ maintainer-clean-tcl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in tcl" ; \
-       (cd tcl && \
+       (cd $(HOST_SUBDIR)/tcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11529,24 +12562,20 @@ maybe-configure-itcl:
 @if itcl
 maybe-configure-itcl: configure-itcl
 configure-itcl:
-       @test ! -f itcl/Makefile || exit 0; \
-       [ -d itcl ] || mkdir itcl; \
+       @test ! -f $(HOST_SUBDIR)/itcl/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/itcl ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in itcl; \
-       cd itcl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/itcl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/itcl"; \
+       libsrcdir="$$s/itcl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -11555,13 +12584,15 @@ configure-itcl:
 .PHONY: all-itcl maybe-all-itcl
 maybe-all-itcl:
 @if itcl
+TARGET-itcl=all
 maybe-all-itcl: all-itcl
 all-itcl: configure-itcl
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd itcl && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/itcl && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-itcl))
 @endif itcl
 
 .PHONY: check-itcl maybe-check-itcl
@@ -11574,7 +12605,8 @@ check-itcl:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/itcl && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif itcl
 
@@ -11588,7 +12620,8 @@ install-itcl: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/itcl && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif itcl
 
@@ -11610,7 +12643,7 @@ info-itcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in itcl" ; \
-       (cd itcl && \
+       (cd $(HOST_SUBDIR)/itcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11636,7 +12669,7 @@ dvi-itcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in itcl" ; \
-       (cd itcl && \
+       (cd $(HOST_SUBDIR)/itcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11646,6 +12679,32 @@ dvi-itcl: \
 
 @endif itcl
 
+.PHONY: maybe-html-itcl html-itcl
+maybe-html-itcl:
+@if itcl
+maybe-html-itcl: html-itcl
+
+html-itcl: \
+    configure-itcl 
+       @[ -f ./itcl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in itcl" ; \
+       (cd $(HOST_SUBDIR)/itcl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif itcl
+
 .PHONY: maybe-TAGS-itcl TAGS-itcl
 maybe-TAGS-itcl:
 @if itcl
@@ -11662,7 +12721,7 @@ TAGS-itcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in itcl" ; \
-       (cd itcl && \
+       (cd $(HOST_SUBDIR)/itcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11689,7 +12748,7 @@ install-info-itcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in itcl" ; \
-       (cd itcl && \
+       (cd $(HOST_SUBDIR)/itcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11715,7 +12774,7 @@ installcheck-itcl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in itcl" ; \
-       (cd itcl && \
+       (cd $(HOST_SUBDIR)/itcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11740,7 +12799,7 @@ mostlyclean-itcl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in itcl" ; \
-       (cd itcl && \
+       (cd $(HOST_SUBDIR)/itcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11765,7 +12824,7 @@ clean-itcl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in itcl" ; \
-       (cd itcl && \
+       (cd $(HOST_SUBDIR)/itcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11790,7 +12849,7 @@ distclean-itcl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in itcl" ; \
-       (cd itcl && \
+       (cd $(HOST_SUBDIR)/itcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11815,7 +12874,7 @@ maintainer-clean-itcl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in itcl" ; \
-       (cd itcl && \
+       (cd $(HOST_SUBDIR)/itcl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11832,24 +12891,20 @@ maybe-configure-ld:
 maybe-configure-ld: configure-ld
 configure-ld:
        @test -f stage_last && exit 0; \
-       test ! -f ld/Makefile || exit 0; \
-       [ -d ld ] || mkdir ld; \
+       test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in ld; \
-       cd ld || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/ld"; \
+       libsrcdir="$$s/ld"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -11858,6 +12913,7 @@ configure-ld:
 .PHONY: all-ld maybe-all-ld
 maybe-all-ld:
 @if ld
+TARGET-ld=all
 maybe-all-ld: all-ld
 all-ld: configure-ld
        @test -f stage_last && exit 0; \
@@ -11865,7 +12921,8 @@ all-ld: configure-ld
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd ld && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/ld && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-ld))
 @endif ld
 
 .PHONY: check-ld maybe-check-ld
@@ -11878,7 +12935,8 @@ check-ld:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd ld && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/ld && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif ld
 
@@ -11892,7 +12950,8 @@ install-ld: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd ld && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/ld && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif ld
 
@@ -11914,7 +12973,7 @@ info-ld: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in ld" ; \
-       (cd ld && \
+       (cd $(HOST_SUBDIR)/ld && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11940,7 +12999,7 @@ dvi-ld: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in ld" ; \
-       (cd ld && \
+       (cd $(HOST_SUBDIR)/ld && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11950,6 +13009,32 @@ dvi-ld: \
 
 @endif ld
 
+.PHONY: maybe-html-ld html-ld
+maybe-html-ld:
+@if ld
+maybe-html-ld: html-ld
+
+html-ld: \
+    configure-ld 
+       @[ -f ./ld/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in ld" ; \
+       (cd $(HOST_SUBDIR)/ld && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif ld
+
 .PHONY: maybe-TAGS-ld TAGS-ld
 maybe-TAGS-ld:
 @if ld
@@ -11966,7 +13051,7 @@ TAGS-ld: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in ld" ; \
-       (cd ld && \
+       (cd $(HOST_SUBDIR)/ld && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -11993,7 +13078,7 @@ install-info-ld: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in ld" ; \
-       (cd ld && \
+       (cd $(HOST_SUBDIR)/ld && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12019,7 +13104,7 @@ installcheck-ld: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in ld" ; \
-       (cd ld && \
+       (cd $(HOST_SUBDIR)/ld && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12044,7 +13129,7 @@ mostlyclean-ld:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in ld" ; \
-       (cd ld && \
+       (cd $(HOST_SUBDIR)/ld && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12069,7 +13154,7 @@ clean-ld:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in ld" ; \
-       (cd ld && \
+       (cd $(HOST_SUBDIR)/ld && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12094,7 +13179,7 @@ distclean-ld:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in ld" ; \
-       (cd ld && \
+       (cd $(HOST_SUBDIR)/ld && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12119,7 +13204,7 @@ maintainer-clean-ld:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in ld" ; \
-       (cd ld && \
+       (cd $(HOST_SUBDIR)/ld && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12136,24 +13221,20 @@ maybe-configure-libcpp:
 maybe-configure-libcpp: configure-libcpp
 configure-libcpp:
        @test -f stage_last && exit 0; \
-       test ! -f libcpp/Makefile || exit 0; \
-       [ -d libcpp ] || mkdir libcpp; \
+       test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in libcpp; \
-       cd libcpp || exit 1; \
+       cd $(HOST_SUBDIR)/libcpp || exit 1; \
        case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libcpp"; \
+       libsrcdir="$$s/libcpp"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -12162,6 +13243,7 @@ configure-libcpp:
 .PHONY: all-libcpp maybe-all-libcpp
 maybe-all-libcpp:
 @if libcpp
+TARGET-libcpp=all
 maybe-all-libcpp: all-libcpp
 all-libcpp: configure-libcpp
        @test -f stage_last && exit 0; \
@@ -12169,7 +13251,8 @@ all-libcpp: configure-libcpp
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libcpp && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/libcpp && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-libcpp))
 @endif libcpp
 
 .PHONY: check-libcpp maybe-check-libcpp
@@ -12182,7 +13265,8 @@ check-libcpp:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libcpp && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/libcpp && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif libcpp
 
@@ -12196,7 +13280,8 @@ install-libcpp: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libcpp && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/libcpp && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif libcpp
 
@@ -12218,7 +13303,7 @@ info-libcpp: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in libcpp" ; \
-       (cd libcpp && \
+       (cd $(HOST_SUBDIR)/libcpp && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12244,7 +13329,7 @@ dvi-libcpp: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in libcpp" ; \
-       (cd libcpp && \
+       (cd $(HOST_SUBDIR)/libcpp && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12254,6 +13339,32 @@ dvi-libcpp: \
 
 @endif libcpp
 
+.PHONY: maybe-html-libcpp html-libcpp
+maybe-html-libcpp:
+@if libcpp
+maybe-html-libcpp: html-libcpp
+
+html-libcpp: \
+    configure-libcpp 
+       @[ -f ./libcpp/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in libcpp" ; \
+       (cd $(HOST_SUBDIR)/libcpp && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif libcpp
+
 .PHONY: maybe-TAGS-libcpp TAGS-libcpp
 maybe-TAGS-libcpp:
 @if libcpp
@@ -12270,7 +13381,7 @@ TAGS-libcpp: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in libcpp" ; \
-       (cd libcpp && \
+       (cd $(HOST_SUBDIR)/libcpp && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12297,7 +13408,7 @@ install-info-libcpp: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in libcpp" ; \
-       (cd libcpp && \
+       (cd $(HOST_SUBDIR)/libcpp && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12323,7 +13434,7 @@ installcheck-libcpp: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in libcpp" ; \
-       (cd libcpp && \
+       (cd $(HOST_SUBDIR)/libcpp && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12348,7 +13459,7 @@ mostlyclean-libcpp:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in libcpp" ; \
-       (cd libcpp && \
+       (cd $(HOST_SUBDIR)/libcpp && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12373,7 +13484,7 @@ clean-libcpp:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in libcpp" ; \
-       (cd libcpp && \
+       (cd $(HOST_SUBDIR)/libcpp && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12398,7 +13509,7 @@ distclean-libcpp:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in libcpp" ; \
-       (cd libcpp && \
+       (cd $(HOST_SUBDIR)/libcpp && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12423,7 +13534,7 @@ maintainer-clean-libcpp:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in libcpp" ; \
-       (cd libcpp && \
+       (cd $(HOST_SUBDIR)/libcpp && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12439,24 +13550,20 @@ maybe-configure-libgui:
 @if libgui
 maybe-configure-libgui: configure-libgui
 configure-libgui:
-       @test ! -f libgui/Makefile || exit 0; \
-       [ -d libgui ] || mkdir libgui; \
+       @test ! -f $(HOST_SUBDIR)/libgui/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libgui ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in libgui; \
-       cd libgui || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libgui/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libgui"; \
+       libsrcdir="$$s/libgui"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -12465,13 +13572,15 @@ configure-libgui:
 .PHONY: all-libgui maybe-all-libgui
 maybe-all-libgui:
 @if libgui
+TARGET-libgui=all
 maybe-all-libgui: all-libgui
 all-libgui: configure-libgui
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libgui && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/libgui && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-libgui))
 @endif libgui
 
 .PHONY: check-libgui maybe-check-libgui
@@ -12484,7 +13593,8 @@ check-libgui:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/libgui && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif libgui
 
@@ -12498,7 +13608,8 @@ install-libgui: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/libgui && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif libgui
 
@@ -12520,7 +13631,7 @@ info-libgui: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in libgui" ; \
-       (cd libgui && \
+       (cd $(HOST_SUBDIR)/libgui && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12546,7 +13657,7 @@ dvi-libgui: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in libgui" ; \
-       (cd libgui && \
+       (cd $(HOST_SUBDIR)/libgui && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12556,6 +13667,32 @@ dvi-libgui: \
 
 @endif libgui
 
+.PHONY: maybe-html-libgui html-libgui
+maybe-html-libgui:
+@if libgui
+maybe-html-libgui: html-libgui
+
+html-libgui: \
+    configure-libgui 
+       @[ -f ./libgui/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in libgui" ; \
+       (cd $(HOST_SUBDIR)/libgui && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif libgui
+
 .PHONY: maybe-TAGS-libgui TAGS-libgui
 maybe-TAGS-libgui:
 @if libgui
@@ -12572,7 +13709,7 @@ TAGS-libgui: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in libgui" ; \
-       (cd libgui && \
+       (cd $(HOST_SUBDIR)/libgui && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12599,7 +13736,7 @@ install-info-libgui: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in libgui" ; \
-       (cd libgui && \
+       (cd $(HOST_SUBDIR)/libgui && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12625,7 +13762,7 @@ installcheck-libgui: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in libgui" ; \
-       (cd libgui && \
+       (cd $(HOST_SUBDIR)/libgui && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12650,7 +13787,7 @@ mostlyclean-libgui:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in libgui" ; \
-       (cd libgui && \
+       (cd $(HOST_SUBDIR)/libgui && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12675,7 +13812,7 @@ clean-libgui:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in libgui" ; \
-       (cd libgui && \
+       (cd $(HOST_SUBDIR)/libgui && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12700,7 +13837,7 @@ distclean-libgui:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in libgui" ; \
-       (cd libgui && \
+       (cd $(HOST_SUBDIR)/libgui && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12725,7 +13862,7 @@ maintainer-clean-libgui:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in libgui" ; \
-       (cd libgui && \
+       (cd $(HOST_SUBDIR)/libgui && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -12736,329 +13873,26 @@ maintainer-clean-libgui:
 @endif libgui
 
 
-.PHONY: configure-libbanshee maybe-configure-libbanshee
-maybe-configure-libbanshee:
-@if libbanshee
-maybe-configure-libbanshee: configure-libbanshee
-configure-libbanshee:
-       @test -f stage_last && exit 0; \
-       test ! -f libbanshee/Makefile || exit 0; \
-       [ -d libbanshee ] || mkdir libbanshee; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(HOST_EXPORTS) \
-       echo Configuring in libbanshee; \
-       cd libbanshee || exit 1; \
-       case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-       esac; \
-       $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption}  \
-         || exit 1
-@endif libbanshee
-
-.PHONY: all-libbanshee maybe-all-libbanshee
-maybe-all-libbanshee:
-@if libbanshee
-maybe-all-libbanshee: all-libbanshee
-all-libbanshee: configure-libbanshee
-       @test -f stage_last && exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       (cd libbanshee && $(MAKE) $(FLAGS_TO_PASS)  all)
-@endif libbanshee
-
-.PHONY: check-libbanshee maybe-check-libbanshee
-maybe-check-libbanshee:
-@if libbanshee
-maybe-check-libbanshee: check-libbanshee
-
-check-libbanshee:
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       (cd libbanshee && $(MAKE) $(FLAGS_TO_PASS) check)
-
-@endif libbanshee
-
-.PHONY: install-libbanshee maybe-install-libbanshee
-maybe-install-libbanshee:
-@if libbanshee
-maybe-install-libbanshee: install-libbanshee
-
-install-libbanshee:
-
-@endif libbanshee
-
-# Other targets (info, dvi, etc.)
-
-.PHONY: maybe-info-libbanshee info-libbanshee
-maybe-info-libbanshee:
-@if libbanshee
-maybe-info-libbanshee: info-libbanshee
-
-info-libbanshee: \
-    configure-libbanshee 
-       @[ -f ./libbanshee/Makefile ] || exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       for flag in $(EXTRA_HOST_FLAGS) ; do \
-         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-       done; \
-       echo "Doing info in libbanshee" ; \
-       (cd libbanshee && \
-         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-                 "RANLIB=$${RANLIB}" \
-                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 info) \
-         || exit 1
-
-@endif libbanshee
-
-.PHONY: maybe-dvi-libbanshee dvi-libbanshee
-maybe-dvi-libbanshee:
-@if libbanshee
-maybe-dvi-libbanshee: dvi-libbanshee
-
-dvi-libbanshee: \
-    configure-libbanshee 
-       @[ -f ./libbanshee/Makefile ] || exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       for flag in $(EXTRA_HOST_FLAGS) ; do \
-         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-       done; \
-       echo "Doing dvi in libbanshee" ; \
-       (cd libbanshee && \
-         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-                 "RANLIB=$${RANLIB}" \
-                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 dvi) \
-         || exit 1
-
-@endif libbanshee
-
-.PHONY: maybe-TAGS-libbanshee TAGS-libbanshee
-maybe-TAGS-libbanshee:
-@if libbanshee
-maybe-TAGS-libbanshee: TAGS-libbanshee
-
-TAGS-libbanshee: \
-    configure-libbanshee 
-       @[ -f ./libbanshee/Makefile ] || exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       for flag in $(EXTRA_HOST_FLAGS) ; do \
-         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-       done; \
-       echo "Doing TAGS in libbanshee" ; \
-       (cd libbanshee && \
-         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-                 "RANLIB=$${RANLIB}" \
-                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 TAGS) \
-         || exit 1
-
-@endif libbanshee
-
-.PHONY: maybe-install-info-libbanshee install-info-libbanshee
-maybe-install-info-libbanshee:
-@if libbanshee
-maybe-install-info-libbanshee: install-info-libbanshee
-
-install-info-libbanshee: \
-    configure-libbanshee \
-    info-libbanshee 
-       @[ -f ./libbanshee/Makefile ] || exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       for flag in $(EXTRA_HOST_FLAGS) ; do \
-         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-       done; \
-       echo "Doing install-info in libbanshee" ; \
-       (cd libbanshee && \
-         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-                 "RANLIB=$${RANLIB}" \
-                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 install-info) \
-         || exit 1
-
-@endif libbanshee
-
-.PHONY: maybe-installcheck-libbanshee installcheck-libbanshee
-maybe-installcheck-libbanshee:
-@if libbanshee
-maybe-installcheck-libbanshee: installcheck-libbanshee
-
-installcheck-libbanshee: \
-    configure-libbanshee 
-       @[ -f ./libbanshee/Makefile ] || exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       for flag in $(EXTRA_HOST_FLAGS) ; do \
-         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-       done; \
-       echo "Doing installcheck in libbanshee" ; \
-       (cd libbanshee && \
-         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-                 "RANLIB=$${RANLIB}" \
-                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 installcheck) \
-         || exit 1
-
-@endif libbanshee
-
-.PHONY: maybe-mostlyclean-libbanshee mostlyclean-libbanshee
-maybe-mostlyclean-libbanshee:
-@if libbanshee
-maybe-mostlyclean-libbanshee: mostlyclean-libbanshee
-
-mostlyclean-libbanshee: 
-       @[ -f ./libbanshee/Makefile ] || exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       for flag in $(EXTRA_HOST_FLAGS) ; do \
-         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-       done; \
-       echo "Doing mostlyclean in libbanshee" ; \
-       (cd libbanshee && \
-         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-                 "RANLIB=$${RANLIB}" \
-                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 mostlyclean) \
-         || exit 1
-
-@endif libbanshee
-
-.PHONY: maybe-clean-libbanshee clean-libbanshee
-maybe-clean-libbanshee:
-@if libbanshee
-maybe-clean-libbanshee: clean-libbanshee
-
-clean-libbanshee: 
-       @[ -f ./libbanshee/Makefile ] || exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       for flag in $(EXTRA_HOST_FLAGS) ; do \
-         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-       done; \
-       echo "Doing clean in libbanshee" ; \
-       (cd libbanshee && \
-         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-                 "RANLIB=$${RANLIB}" \
-                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 clean) \
-         || exit 1
-
-@endif libbanshee
-
-.PHONY: maybe-distclean-libbanshee distclean-libbanshee
-maybe-distclean-libbanshee:
-@if libbanshee
-maybe-distclean-libbanshee: distclean-libbanshee
-
-distclean-libbanshee: 
-       @[ -f ./libbanshee/Makefile ] || exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       for flag in $(EXTRA_HOST_FLAGS) ; do \
-         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-       done; \
-       echo "Doing distclean in libbanshee" ; \
-       (cd libbanshee && \
-         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-                 "RANLIB=$${RANLIB}" \
-                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 distclean) \
-         || exit 1
-
-@endif libbanshee
-
-.PHONY: maybe-maintainer-clean-libbanshee maintainer-clean-libbanshee
-maybe-maintainer-clean-libbanshee:
-@if libbanshee
-maybe-maintainer-clean-libbanshee: maintainer-clean-libbanshee
-
-maintainer-clean-libbanshee: 
-       @[ -f ./libbanshee/Makefile ] || exit 0; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-       $(SET_LIB_PATH) \
-       $(HOST_EXPORTS) \
-       for flag in $(EXTRA_HOST_FLAGS) ; do \
-         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-       done; \
-       echo "Doing maintainer-clean in libbanshee" ; \
-       (cd libbanshee && \
-         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-                 "RANLIB=$${RANLIB}" \
-                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 maintainer-clean) \
-         || exit 1
-
-@endif libbanshee
-
-
 .PHONY: configure-libiberty maybe-configure-libiberty
 maybe-configure-libiberty:
 @if libiberty
 maybe-configure-libiberty: configure-libiberty
 configure-libiberty:
        @test -f stage_last && exit 0; \
-       test ! -f libiberty/Makefile || exit 0; \
-       [ -d libiberty ] || mkdir libiberty; \
+       test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in libiberty; \
-       cd libiberty || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libiberty"; \
+       libsrcdir="$$s/libiberty"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -13067,6 +13901,7 @@ configure-libiberty:
 .PHONY: all-libiberty maybe-all-libiberty
 maybe-all-libiberty:
 @if libiberty
+TARGET-libiberty=all
 maybe-all-libiberty: all-libiberty
 all-libiberty: configure-libiberty
        @test -f stage_last && exit 0; \
@@ -13074,7 +13909,8 @@ all-libiberty: configure-libiberty
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libiberty && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/libiberty && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-libiberty))
 @endif libiberty
 
 .PHONY: check-libiberty maybe-check-libiberty
@@ -13087,7 +13923,8 @@ check-libiberty:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/libiberty && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif libiberty
 
@@ -13101,7 +13938,8 @@ install-libiberty: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/libiberty && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif libiberty
 
@@ -13123,7 +13961,7 @@ info-libiberty: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in libiberty" ; \
-       (cd libiberty && \
+       (cd $(HOST_SUBDIR)/libiberty && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13149,7 +13987,7 @@ dvi-libiberty: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in libiberty" ; \
-       (cd libiberty && \
+       (cd $(HOST_SUBDIR)/libiberty && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13159,6 +13997,32 @@ dvi-libiberty: \
 
 @endif libiberty
 
+.PHONY: maybe-html-libiberty html-libiberty
+maybe-html-libiberty:
+@if libiberty
+maybe-html-libiberty: html-libiberty
+
+html-libiberty: \
+    configure-libiberty 
+       @[ -f ./libiberty/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in libiberty" ; \
+       (cd $(HOST_SUBDIR)/libiberty && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif libiberty
+
 .PHONY: maybe-TAGS-libiberty TAGS-libiberty
 maybe-TAGS-libiberty:
 @if libiberty
@@ -13175,7 +14039,7 @@ TAGS-libiberty: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in libiberty" ; \
-       (cd libiberty && \
+       (cd $(HOST_SUBDIR)/libiberty && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13202,7 +14066,7 @@ install-info-libiberty: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in libiberty" ; \
-       (cd libiberty && \
+       (cd $(HOST_SUBDIR)/libiberty && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13228,7 +14092,7 @@ installcheck-libiberty: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in libiberty" ; \
-       (cd libiberty && \
+       (cd $(HOST_SUBDIR)/libiberty && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13253,7 +14117,7 @@ mostlyclean-libiberty:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in libiberty" ; \
-       (cd libiberty && \
+       (cd $(HOST_SUBDIR)/libiberty && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13278,7 +14142,7 @@ clean-libiberty:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in libiberty" ; \
-       (cd libiberty && \
+       (cd $(HOST_SUBDIR)/libiberty && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13303,7 +14167,7 @@ distclean-libiberty:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in libiberty" ; \
-       (cd libiberty && \
+       (cd $(HOST_SUBDIR)/libiberty && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13328,7 +14192,7 @@ maintainer-clean-libiberty:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in libiberty" ; \
-       (cd libiberty && \
+       (cd $(HOST_SUBDIR)/libiberty && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13344,24 +14208,20 @@ maybe-configure-libtool:
 @if libtool
 maybe-configure-libtool: configure-libtool
 configure-libtool:
-       @test ! -f libtool/Makefile || exit 0; \
-       [ -d libtool ] || mkdir libtool; \
+       @test ! -f $(HOST_SUBDIR)/libtool/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libtool ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in libtool; \
-       cd libtool || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libtool/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libtool"; \
+       libsrcdir="$$s/libtool"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -13370,13 +14230,15 @@ configure-libtool:
 .PHONY: all-libtool maybe-all-libtool
 maybe-all-libtool:
 @if libtool
+TARGET-libtool=all
 maybe-all-libtool: all-libtool
 all-libtool: configure-libtool
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libtool && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/libtool && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-libtool))
 @endif libtool
 
 .PHONY: check-libtool maybe-check-libtool
@@ -13389,7 +14251,8 @@ check-libtool:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/libtool && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif libtool
 
@@ -13403,7 +14266,8 @@ install-libtool: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/libtool && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif libtool
 
@@ -13425,7 +14289,7 @@ info-libtool: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in libtool" ; \
-       (cd libtool && \
+       (cd $(HOST_SUBDIR)/libtool && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13451,7 +14315,7 @@ dvi-libtool: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in libtool" ; \
-       (cd libtool && \
+       (cd $(HOST_SUBDIR)/libtool && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13461,6 +14325,32 @@ dvi-libtool: \
 
 @endif libtool
 
+.PHONY: maybe-html-libtool html-libtool
+maybe-html-libtool:
+@if libtool
+maybe-html-libtool: html-libtool
+
+html-libtool: \
+    configure-libtool 
+       @[ -f ./libtool/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in libtool" ; \
+       (cd $(HOST_SUBDIR)/libtool && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif libtool
+
 .PHONY: maybe-TAGS-libtool TAGS-libtool
 maybe-TAGS-libtool:
 @if libtool
@@ -13477,7 +14367,7 @@ TAGS-libtool: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in libtool" ; \
-       (cd libtool && \
+       (cd $(HOST_SUBDIR)/libtool && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13504,7 +14394,7 @@ install-info-libtool: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in libtool" ; \
-       (cd libtool && \
+       (cd $(HOST_SUBDIR)/libtool && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13530,7 +14420,7 @@ installcheck-libtool: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in libtool" ; \
-       (cd libtool && \
+       (cd $(HOST_SUBDIR)/libtool && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13555,7 +14445,7 @@ mostlyclean-libtool:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in libtool" ; \
-       (cd libtool && \
+       (cd $(HOST_SUBDIR)/libtool && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13580,7 +14470,7 @@ clean-libtool:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in libtool" ; \
-       (cd libtool && \
+       (cd $(HOST_SUBDIR)/libtool && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13605,7 +14495,7 @@ distclean-libtool:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in libtool" ; \
-       (cd libtool && \
+       (cd $(HOST_SUBDIR)/libtool && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13630,7 +14520,7 @@ maintainer-clean-libtool:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in libtool" ; \
-       (cd libtool && \
+       (cd $(HOST_SUBDIR)/libtool && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13646,24 +14536,20 @@ maybe-configure-m4:
 @if m4
 maybe-configure-m4: configure-m4
 configure-m4:
-       @test ! -f m4/Makefile || exit 0; \
-       [ -d m4 ] || mkdir m4; \
+       @test ! -f $(HOST_SUBDIR)/m4/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/m4 ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in m4; \
-       cd m4 || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/m4/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/m4"; \
+       libsrcdir="$$s/m4"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -13672,13 +14558,15 @@ configure-m4:
 .PHONY: all-m4 maybe-all-m4
 maybe-all-m4:
 @if m4
+TARGET-m4=all
 maybe-all-m4: all-m4
 all-m4: configure-m4
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd m4 && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/m4 && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-m4))
 @endif m4
 
 .PHONY: check-m4 maybe-check-m4
@@ -13691,7 +14579,8 @@ check-m4:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/m4 && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif m4
 
@@ -13705,7 +14594,8 @@ install-m4: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/m4 && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif m4
 
@@ -13727,7 +14617,7 @@ info-m4: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in m4" ; \
-       (cd m4 && \
+       (cd $(HOST_SUBDIR)/m4 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13753,7 +14643,7 @@ dvi-m4: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in m4" ; \
-       (cd m4 && \
+       (cd $(HOST_SUBDIR)/m4 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13763,6 +14653,32 @@ dvi-m4: \
 
 @endif m4
 
+.PHONY: maybe-html-m4 html-m4
+maybe-html-m4:
+@if m4
+maybe-html-m4: html-m4
+
+html-m4: \
+    configure-m4 
+       @[ -f ./m4/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in m4" ; \
+       (cd $(HOST_SUBDIR)/m4 && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif m4
+
 .PHONY: maybe-TAGS-m4 TAGS-m4
 maybe-TAGS-m4:
 @if m4
@@ -13779,7 +14695,7 @@ TAGS-m4: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in m4" ; \
-       (cd m4 && \
+       (cd $(HOST_SUBDIR)/m4 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13806,7 +14722,7 @@ install-info-m4: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in m4" ; \
-       (cd m4 && \
+       (cd $(HOST_SUBDIR)/m4 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13832,7 +14748,7 @@ installcheck-m4: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in m4" ; \
-       (cd m4 && \
+       (cd $(HOST_SUBDIR)/m4 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13857,7 +14773,7 @@ mostlyclean-m4:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in m4" ; \
-       (cd m4 && \
+       (cd $(HOST_SUBDIR)/m4 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13882,7 +14798,7 @@ clean-m4:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in m4" ; \
-       (cd m4 && \
+       (cd $(HOST_SUBDIR)/m4 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13907,7 +14823,7 @@ distclean-m4:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in m4" ; \
-       (cd m4 && \
+       (cd $(HOST_SUBDIR)/m4 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13932,7 +14848,7 @@ maintainer-clean-m4:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in m4" ; \
-       (cd m4 && \
+       (cd $(HOST_SUBDIR)/m4 && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -13948,24 +14864,20 @@ maybe-configure-make:
 @if make
 maybe-configure-make: configure-make
 configure-make:
-       @test ! -f make/Makefile || exit 0; \
-       [ -d make ] || mkdir make; \
+       @test ! -f $(HOST_SUBDIR)/make/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/make ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in make; \
-       cd make || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/make/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/make"; \
+       libsrcdir="$$s/make"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -13974,13 +14886,15 @@ configure-make:
 .PHONY: all-make maybe-all-make
 maybe-all-make:
 @if make
+TARGET-make=all
 maybe-all-make: all-make
 all-make: configure-make
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd make && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/make && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-make))
 @endif make
 
 .PHONY: check-make maybe-check-make
@@ -13993,7 +14907,8 @@ check-make:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd make && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/make && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif make
 
@@ -14007,7 +14922,8 @@ install-make: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd make && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/make && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif make
 
@@ -14029,7 +14945,7 @@ info-make: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in make" ; \
-       (cd make && \
+       (cd $(HOST_SUBDIR)/make && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14055,7 +14971,7 @@ dvi-make: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in make" ; \
-       (cd make && \
+       (cd $(HOST_SUBDIR)/make && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14065,6 +14981,32 @@ dvi-make: \
 
 @endif make
 
+.PHONY: maybe-html-make html-make
+maybe-html-make:
+@if make
+maybe-html-make: html-make
+
+html-make: \
+    configure-make 
+       @[ -f ./make/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in make" ; \
+       (cd $(HOST_SUBDIR)/make && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif make
+
 .PHONY: maybe-TAGS-make TAGS-make
 maybe-TAGS-make:
 @if make
@@ -14081,7 +15023,7 @@ TAGS-make: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in make" ; \
-       (cd make && \
+       (cd $(HOST_SUBDIR)/make && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14108,7 +15050,7 @@ install-info-make: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in make" ; \
-       (cd make && \
+       (cd $(HOST_SUBDIR)/make && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14134,7 +15076,7 @@ installcheck-make: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in make" ; \
-       (cd make && \
+       (cd $(HOST_SUBDIR)/make && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14159,7 +15101,7 @@ mostlyclean-make:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in make" ; \
-       (cd make && \
+       (cd $(HOST_SUBDIR)/make && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14184,7 +15126,7 @@ clean-make:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in make" ; \
-       (cd make && \
+       (cd $(HOST_SUBDIR)/make && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14209,7 +15151,7 @@ distclean-make:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in make" ; \
-       (cd make && \
+       (cd $(HOST_SUBDIR)/make && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14234,7 +15176,7 @@ maintainer-clean-make:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in make" ; \
-       (cd make && \
+       (cd $(HOST_SUBDIR)/make && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14250,24 +15192,20 @@ maybe-configure-mmalloc:
 @if mmalloc
 maybe-configure-mmalloc: configure-mmalloc
 configure-mmalloc:
-       @test ! -f mmalloc/Makefile || exit 0; \
-       [ -d mmalloc ] || mkdir mmalloc; \
+       @test ! -f $(HOST_SUBDIR)/mmalloc/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mmalloc ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in mmalloc; \
-       cd mmalloc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/mmalloc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/mmalloc"; \
+       libsrcdir="$$s/mmalloc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -14276,13 +15214,15 @@ configure-mmalloc:
 .PHONY: all-mmalloc maybe-all-mmalloc
 maybe-all-mmalloc:
 @if mmalloc
+TARGET-mmalloc=all
 maybe-all-mmalloc: all-mmalloc
 all-mmalloc: configure-mmalloc
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/mmalloc && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-mmalloc))
 @endif mmalloc
 
 .PHONY: check-mmalloc maybe-check-mmalloc
@@ -14304,7 +15244,8 @@ install-mmalloc: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/mmalloc && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif mmalloc
 
@@ -14326,7 +15267,7 @@ info-mmalloc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in mmalloc" ; \
-       (cd mmalloc && \
+       (cd $(HOST_SUBDIR)/mmalloc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14352,7 +15293,7 @@ dvi-mmalloc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in mmalloc" ; \
-       (cd mmalloc && \
+       (cd $(HOST_SUBDIR)/mmalloc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14362,12 +15303,12 @@ dvi-mmalloc: \
 
 @endif mmalloc
 
-.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc
-maybe-TAGS-mmalloc:
+.PHONY: maybe-html-mmalloc html-mmalloc
+maybe-html-mmalloc:
 @if mmalloc
-maybe-TAGS-mmalloc: TAGS-mmalloc
+maybe-html-mmalloc: html-mmalloc
 
-TAGS-mmalloc: \
+html-mmalloc: \
     configure-mmalloc 
        @[ -f ./mmalloc/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
@@ -14377,20 +15318,46 @@ TAGS-mmalloc: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing TAGS in mmalloc" ; \
-       (cd mmalloc && \
+       echo "Doing html in mmalloc" ; \
+       (cd $(HOST_SUBDIR)/mmalloc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                 TAGS) \
+                 html) \
          || exit 1
 
 @endif mmalloc
 
-.PHONY: maybe-install-info-mmalloc install-info-mmalloc
-maybe-install-info-mmalloc:
-@if mmalloc
+.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc
+maybe-TAGS-mmalloc:
+@if mmalloc
+maybe-TAGS-mmalloc: TAGS-mmalloc
+
+TAGS-mmalloc: \
+    configure-mmalloc 
+       @[ -f ./mmalloc/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in mmalloc" ; \
+       (cd $(HOST_SUBDIR)/mmalloc && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 TAGS) \
+         || exit 1
+
+@endif mmalloc
+
+.PHONY: maybe-install-info-mmalloc install-info-mmalloc
+maybe-install-info-mmalloc:
+@if mmalloc
 maybe-install-info-mmalloc: install-info-mmalloc
 
 install-info-mmalloc: \
@@ -14405,7 +15372,7 @@ install-info-mmalloc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in mmalloc" ; \
-       (cd mmalloc && \
+       (cd $(HOST_SUBDIR)/mmalloc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14431,7 +15398,7 @@ installcheck-mmalloc: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in mmalloc" ; \
-       (cd mmalloc && \
+       (cd $(HOST_SUBDIR)/mmalloc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14456,7 +15423,7 @@ mostlyclean-mmalloc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in mmalloc" ; \
-       (cd mmalloc && \
+       (cd $(HOST_SUBDIR)/mmalloc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14481,7 +15448,7 @@ clean-mmalloc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in mmalloc" ; \
-       (cd mmalloc && \
+       (cd $(HOST_SUBDIR)/mmalloc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14506,7 +15473,7 @@ distclean-mmalloc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in mmalloc" ; \
-       (cd mmalloc && \
+       (cd $(HOST_SUBDIR)/mmalloc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14531,7 +15498,7 @@ maintainer-clean-mmalloc:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in mmalloc" ; \
-       (cd mmalloc && \
+       (cd $(HOST_SUBDIR)/mmalloc && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14547,24 +15514,20 @@ maybe-configure-patch:
 @if patch
 maybe-configure-patch: configure-patch
 configure-patch:
-       @test ! -f patch/Makefile || exit 0; \
-       [ -d patch ] || mkdir patch; \
+       @test ! -f $(HOST_SUBDIR)/patch/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/patch ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in patch; \
-       cd patch || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/patch/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/patch"; \
+       libsrcdir="$$s/patch"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -14573,13 +15536,15 @@ configure-patch:
 .PHONY: all-patch maybe-all-patch
 maybe-all-patch:
 @if patch
+TARGET-patch=all
 maybe-all-patch: all-patch
 all-patch: configure-patch
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd patch && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/patch && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-patch))
 @endif patch
 
 .PHONY: check-patch maybe-check-patch
@@ -14592,7 +15557,8 @@ check-patch:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd patch && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/patch && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif patch
 
@@ -14606,7 +15572,8 @@ install-patch: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd patch && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/patch && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif patch
 
@@ -14628,7 +15595,7 @@ info-patch: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in patch" ; \
-       (cd patch && \
+       (cd $(HOST_SUBDIR)/patch && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14654,7 +15621,7 @@ dvi-patch: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in patch" ; \
-       (cd patch && \
+       (cd $(HOST_SUBDIR)/patch && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14664,6 +15631,32 @@ dvi-patch: \
 
 @endif patch
 
+.PHONY: maybe-html-patch html-patch
+maybe-html-patch:
+@if patch
+maybe-html-patch: html-patch
+
+html-patch: \
+    configure-patch 
+       @[ -f ./patch/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in patch" ; \
+       (cd $(HOST_SUBDIR)/patch && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif patch
+
 .PHONY: maybe-TAGS-patch TAGS-patch
 maybe-TAGS-patch:
 @if patch
@@ -14680,7 +15673,7 @@ TAGS-patch: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in patch" ; \
-       (cd patch && \
+       (cd $(HOST_SUBDIR)/patch && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14707,7 +15700,7 @@ install-info-patch: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in patch" ; \
-       (cd patch && \
+       (cd $(HOST_SUBDIR)/patch && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14733,7 +15726,7 @@ installcheck-patch: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in patch" ; \
-       (cd patch && \
+       (cd $(HOST_SUBDIR)/patch && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14758,7 +15751,7 @@ mostlyclean-patch:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in patch" ; \
-       (cd patch && \
+       (cd $(HOST_SUBDIR)/patch && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14783,7 +15776,7 @@ clean-patch:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in patch" ; \
-       (cd patch && \
+       (cd $(HOST_SUBDIR)/patch && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14808,7 +15801,7 @@ distclean-patch:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in patch" ; \
-       (cd patch && \
+       (cd $(HOST_SUBDIR)/patch && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14833,7 +15826,7 @@ maintainer-clean-patch:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in patch" ; \
-       (cd patch && \
+       (cd $(HOST_SUBDIR)/patch && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14849,24 +15842,20 @@ maybe-configure-perl:
 @if perl
 maybe-configure-perl: configure-perl
 configure-perl:
-       @test ! -f perl/Makefile || exit 0; \
-       [ -d perl ] || mkdir perl; \
+       @test ! -f $(HOST_SUBDIR)/perl/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/perl ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in perl; \
-       cd perl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/perl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/perl"; \
+       libsrcdir="$$s/perl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -14875,13 +15864,15 @@ configure-perl:
 .PHONY: all-perl maybe-all-perl
 maybe-all-perl:
 @if perl
+TARGET-perl=all
 maybe-all-perl: all-perl
 all-perl: configure-perl
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd perl && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/perl && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-perl))
 @endif perl
 
 .PHONY: check-perl maybe-check-perl
@@ -14894,7 +15885,8 @@ check-perl:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd perl && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/perl && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif perl
 
@@ -14908,7 +15900,8 @@ install-perl: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd perl && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/perl && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif perl
 
@@ -14930,7 +15923,7 @@ info-perl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in perl" ; \
-       (cd perl && \
+       (cd $(HOST_SUBDIR)/perl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14956,7 +15949,7 @@ dvi-perl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in perl" ; \
-       (cd perl && \
+       (cd $(HOST_SUBDIR)/perl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -14966,6 +15959,32 @@ dvi-perl: \
 
 @endif perl
 
+.PHONY: maybe-html-perl html-perl
+maybe-html-perl:
+@if perl
+maybe-html-perl: html-perl
+
+html-perl: \
+    configure-perl 
+       @[ -f ./perl/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in perl" ; \
+       (cd $(HOST_SUBDIR)/perl && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif perl
+
 .PHONY: maybe-TAGS-perl TAGS-perl
 maybe-TAGS-perl:
 @if perl
@@ -14982,7 +16001,7 @@ TAGS-perl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in perl" ; \
-       (cd perl && \
+       (cd $(HOST_SUBDIR)/perl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15009,7 +16028,7 @@ install-info-perl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in perl" ; \
-       (cd perl && \
+       (cd $(HOST_SUBDIR)/perl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15035,7 +16054,7 @@ installcheck-perl: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in perl" ; \
-       (cd perl && \
+       (cd $(HOST_SUBDIR)/perl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15060,7 +16079,7 @@ mostlyclean-perl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in perl" ; \
-       (cd perl && \
+       (cd $(HOST_SUBDIR)/perl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15085,7 +16104,7 @@ clean-perl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in perl" ; \
-       (cd perl && \
+       (cd $(HOST_SUBDIR)/perl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15110,7 +16129,7 @@ distclean-perl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in perl" ; \
-       (cd perl && \
+       (cd $(HOST_SUBDIR)/perl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15135,7 +16154,7 @@ maintainer-clean-perl:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in perl" ; \
-       (cd perl && \
+       (cd $(HOST_SUBDIR)/perl && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15151,24 +16170,20 @@ maybe-configure-prms:
 @if prms
 maybe-configure-prms: configure-prms
 configure-prms:
-       @test ! -f prms/Makefile || exit 0; \
-       [ -d prms ] || mkdir prms; \
+       @test ! -f $(HOST_SUBDIR)/prms/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/prms ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in prms; \
-       cd prms || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/prms/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/prms"; \
+       libsrcdir="$$s/prms"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -15177,13 +16192,15 @@ configure-prms:
 .PHONY: all-prms maybe-all-prms
 maybe-all-prms:
 @if prms
+TARGET-prms=all
 maybe-all-prms: all-prms
 all-prms: configure-prms
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd prms && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/prms && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-prms))
 @endif prms
 
 .PHONY: check-prms maybe-check-prms
@@ -15196,7 +16213,8 @@ check-prms:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd prms && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/prms && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif prms
 
@@ -15210,7 +16228,8 @@ install-prms: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd prms && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/prms && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif prms
 
@@ -15232,7 +16251,7 @@ info-prms: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in prms" ; \
-       (cd prms && \
+       (cd $(HOST_SUBDIR)/prms && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15258,7 +16277,7 @@ dvi-prms: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in prms" ; \
-       (cd prms && \
+       (cd $(HOST_SUBDIR)/prms && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15268,6 +16287,32 @@ dvi-prms: \
 
 @endif prms
 
+.PHONY: maybe-html-prms html-prms
+maybe-html-prms:
+@if prms
+maybe-html-prms: html-prms
+
+html-prms: \
+    configure-prms 
+       @[ -f ./prms/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in prms" ; \
+       (cd $(HOST_SUBDIR)/prms && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif prms
+
 .PHONY: maybe-TAGS-prms TAGS-prms
 maybe-TAGS-prms:
 @if prms
@@ -15284,7 +16329,7 @@ TAGS-prms: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in prms" ; \
-       (cd prms && \
+       (cd $(HOST_SUBDIR)/prms && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15311,7 +16356,7 @@ install-info-prms: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in prms" ; \
-       (cd prms && \
+       (cd $(HOST_SUBDIR)/prms && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15337,7 +16382,7 @@ installcheck-prms: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in prms" ; \
-       (cd prms && \
+       (cd $(HOST_SUBDIR)/prms && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15362,7 +16407,7 @@ mostlyclean-prms:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in prms" ; \
-       (cd prms && \
+       (cd $(HOST_SUBDIR)/prms && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15387,7 +16432,7 @@ clean-prms:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in prms" ; \
-       (cd prms && \
+       (cd $(HOST_SUBDIR)/prms && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15412,7 +16457,7 @@ distclean-prms:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in prms" ; \
-       (cd prms && \
+       (cd $(HOST_SUBDIR)/prms && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15437,7 +16482,7 @@ maintainer-clean-prms:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in prms" ; \
-       (cd prms && \
+       (cd $(HOST_SUBDIR)/prms && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15453,24 +16498,20 @@ maybe-configure-rcs:
 @if rcs
 maybe-configure-rcs: configure-rcs
 configure-rcs:
-       @test ! -f rcs/Makefile || exit 0; \
-       [ -d rcs ] || mkdir rcs; \
+       @test ! -f $(HOST_SUBDIR)/rcs/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/rcs ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in rcs; \
-       cd rcs || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/rcs/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/rcs"; \
+       libsrcdir="$$s/rcs"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -15479,13 +16520,15 @@ configure-rcs:
 .PHONY: all-rcs maybe-all-rcs
 maybe-all-rcs:
 @if rcs
+TARGET-rcs=all
 maybe-all-rcs: all-rcs
 all-rcs: configure-rcs
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd rcs && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/rcs && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-rcs))
 @endif rcs
 
 .PHONY: check-rcs maybe-check-rcs
@@ -15498,7 +16541,8 @@ check-rcs:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/rcs && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif rcs
 
@@ -15512,7 +16556,8 @@ install-rcs: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/rcs && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif rcs
 
@@ -15534,7 +16579,7 @@ info-rcs: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in rcs" ; \
-       (cd rcs && \
+       (cd $(HOST_SUBDIR)/rcs && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15560,7 +16605,7 @@ dvi-rcs: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in rcs" ; \
-       (cd rcs && \
+       (cd $(HOST_SUBDIR)/rcs && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15570,6 +16615,32 @@ dvi-rcs: \
 
 @endif rcs
 
+.PHONY: maybe-html-rcs html-rcs
+maybe-html-rcs:
+@if rcs
+maybe-html-rcs: html-rcs
+
+html-rcs: \
+    configure-rcs 
+       @[ -f ./rcs/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in rcs" ; \
+       (cd $(HOST_SUBDIR)/rcs && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif rcs
+
 .PHONY: maybe-TAGS-rcs TAGS-rcs
 maybe-TAGS-rcs:
 @if rcs
@@ -15586,7 +16657,7 @@ TAGS-rcs: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in rcs" ; \
-       (cd rcs && \
+       (cd $(HOST_SUBDIR)/rcs && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15613,7 +16684,7 @@ install-info-rcs: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in rcs" ; \
-       (cd rcs && \
+       (cd $(HOST_SUBDIR)/rcs && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15639,7 +16710,7 @@ installcheck-rcs: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in rcs" ; \
-       (cd rcs && \
+       (cd $(HOST_SUBDIR)/rcs && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15664,7 +16735,7 @@ mostlyclean-rcs:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in rcs" ; \
-       (cd rcs && \
+       (cd $(HOST_SUBDIR)/rcs && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15689,7 +16760,7 @@ clean-rcs:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in rcs" ; \
-       (cd rcs && \
+       (cd $(HOST_SUBDIR)/rcs && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15714,7 +16785,7 @@ distclean-rcs:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in rcs" ; \
-       (cd rcs && \
+       (cd $(HOST_SUBDIR)/rcs && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15739,7 +16810,7 @@ maintainer-clean-rcs:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in rcs" ; \
-       (cd rcs && \
+       (cd $(HOST_SUBDIR)/rcs && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15755,24 +16826,20 @@ maybe-configure-readline:
 @if readline
 maybe-configure-readline: configure-readline
 configure-readline:
-       @test ! -f readline/Makefile || exit 0; \
-       [ -d readline ] || mkdir readline; \
+       @test ! -f $(HOST_SUBDIR)/readline/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/readline ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in readline; \
-       cd readline || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/readline/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/readline"; \
+       libsrcdir="$$s/readline"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -15781,13 +16848,15 @@ configure-readline:
 .PHONY: all-readline maybe-all-readline
 maybe-all-readline:
 @if readline
+TARGET-readline=all
 maybe-all-readline: all-readline
 all-readline: configure-readline
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd readline && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/readline && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-readline))
 @endif readline
 
 .PHONY: check-readline maybe-check-readline
@@ -15800,7 +16869,8 @@ check-readline:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd readline && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/readline && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif readline
 
@@ -15814,7 +16884,8 @@ install-readline: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd readline && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/readline && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif readline
 
@@ -15836,7 +16907,7 @@ info-readline: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in readline" ; \
-       (cd readline && \
+       (cd $(HOST_SUBDIR)/readline && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15862,7 +16933,7 @@ dvi-readline: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in readline" ; \
-       (cd readline && \
+       (cd $(HOST_SUBDIR)/readline && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15872,6 +16943,32 @@ dvi-readline: \
 
 @endif readline
 
+.PHONY: maybe-html-readline html-readline
+maybe-html-readline:
+@if readline
+maybe-html-readline: html-readline
+
+html-readline: \
+    configure-readline 
+       @[ -f ./readline/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in readline" ; \
+       (cd $(HOST_SUBDIR)/readline && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif readline
+
 .PHONY: maybe-TAGS-readline TAGS-readline
 maybe-TAGS-readline:
 @if readline
@@ -15888,7 +16985,7 @@ TAGS-readline: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in readline" ; \
-       (cd readline && \
+       (cd $(HOST_SUBDIR)/readline && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15915,7 +17012,7 @@ install-info-readline: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in readline" ; \
-       (cd readline && \
+       (cd $(HOST_SUBDIR)/readline && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15941,7 +17038,7 @@ installcheck-readline: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in readline" ; \
-       (cd readline && \
+       (cd $(HOST_SUBDIR)/readline && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15966,7 +17063,7 @@ mostlyclean-readline:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in readline" ; \
-       (cd readline && \
+       (cd $(HOST_SUBDIR)/readline && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -15991,7 +17088,7 @@ clean-readline:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in readline" ; \
-       (cd readline && \
+       (cd $(HOST_SUBDIR)/readline && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16016,7 +17113,7 @@ distclean-readline:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in readline" ; \
-       (cd readline && \
+       (cd $(HOST_SUBDIR)/readline && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16041,7 +17138,7 @@ maintainer-clean-readline:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in readline" ; \
-       (cd readline && \
+       (cd $(HOST_SUBDIR)/readline && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16057,24 +17154,20 @@ maybe-configure-release:
 @if release
 maybe-configure-release: configure-release
 configure-release:
-       @test ! -f release/Makefile || exit 0; \
-       [ -d release ] || mkdir release; \
+       @test ! -f $(HOST_SUBDIR)/release/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/release ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in release; \
-       cd release || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/release/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/release"; \
+       libsrcdir="$$s/release"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -16083,13 +17176,15 @@ configure-release:
 .PHONY: all-release maybe-all-release
 maybe-all-release:
 @if release
+TARGET-release=all
 maybe-all-release: all-release
 all-release: configure-release
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd release && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/release && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-release))
 @endif release
 
 .PHONY: check-release maybe-check-release
@@ -16128,7 +17223,7 @@ info-release: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in release" ; \
-       (cd release && \
+       (cd $(HOST_SUBDIR)/release && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16154,7 +17249,7 @@ dvi-release: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in release" ; \
-       (cd release && \
+       (cd $(HOST_SUBDIR)/release && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16164,6 +17259,32 @@ dvi-release: \
 
 @endif release
 
+.PHONY: maybe-html-release html-release
+maybe-html-release:
+@if release
+maybe-html-release: html-release
+
+html-release: \
+    configure-release 
+       @[ -f ./release/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in release" ; \
+       (cd $(HOST_SUBDIR)/release && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif release
+
 .PHONY: maybe-TAGS-release TAGS-release
 maybe-TAGS-release:
 @if release
@@ -16180,7 +17301,7 @@ TAGS-release: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in release" ; \
-       (cd release && \
+       (cd $(HOST_SUBDIR)/release && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16207,7 +17328,7 @@ install-info-release: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in release" ; \
-       (cd release && \
+       (cd $(HOST_SUBDIR)/release && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16233,7 +17354,7 @@ installcheck-release: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in release" ; \
-       (cd release && \
+       (cd $(HOST_SUBDIR)/release && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16258,7 +17379,7 @@ mostlyclean-release:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in release" ; \
-       (cd release && \
+       (cd $(HOST_SUBDIR)/release && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16283,7 +17404,7 @@ clean-release:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in release" ; \
-       (cd release && \
+       (cd $(HOST_SUBDIR)/release && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16308,7 +17429,7 @@ distclean-release:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in release" ; \
-       (cd release && \
+       (cd $(HOST_SUBDIR)/release && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16333,7 +17454,7 @@ maintainer-clean-release:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in release" ; \
-       (cd release && \
+       (cd $(HOST_SUBDIR)/release && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16349,24 +17470,20 @@ maybe-configure-recode:
 @if recode
 maybe-configure-recode: configure-recode
 configure-recode:
-       @test ! -f recode/Makefile || exit 0; \
-       [ -d recode ] || mkdir recode; \
+       @test ! -f $(HOST_SUBDIR)/recode/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/recode ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in recode; \
-       cd recode || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/recode/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/recode"; \
+       libsrcdir="$$s/recode"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -16375,13 +17492,15 @@ configure-recode:
 .PHONY: all-recode maybe-all-recode
 maybe-all-recode:
 @if recode
+TARGET-recode=all
 maybe-all-recode: all-recode
 all-recode: configure-recode
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd recode && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/recode && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-recode))
 @endif recode
 
 .PHONY: check-recode maybe-check-recode
@@ -16394,7 +17513,8 @@ check-recode:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd recode && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/recode && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif recode
 
@@ -16408,7 +17528,8 @@ install-recode: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd recode && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/recode && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif recode
 
@@ -16430,7 +17551,7 @@ info-recode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in recode" ; \
-       (cd recode && \
+       (cd $(HOST_SUBDIR)/recode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16456,7 +17577,7 @@ dvi-recode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in recode" ; \
-       (cd recode && \
+       (cd $(HOST_SUBDIR)/recode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16466,6 +17587,32 @@ dvi-recode: \
 
 @endif recode
 
+.PHONY: maybe-html-recode html-recode
+maybe-html-recode:
+@if recode
+maybe-html-recode: html-recode
+
+html-recode: \
+    configure-recode 
+       @[ -f ./recode/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in recode" ; \
+       (cd $(HOST_SUBDIR)/recode && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif recode
+
 .PHONY: maybe-TAGS-recode TAGS-recode
 maybe-TAGS-recode:
 @if recode
@@ -16482,7 +17629,7 @@ TAGS-recode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in recode" ; \
-       (cd recode && \
+       (cd $(HOST_SUBDIR)/recode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16509,7 +17656,7 @@ install-info-recode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in recode" ; \
-       (cd recode && \
+       (cd $(HOST_SUBDIR)/recode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16535,7 +17682,7 @@ installcheck-recode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in recode" ; \
-       (cd recode && \
+       (cd $(HOST_SUBDIR)/recode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16560,7 +17707,7 @@ mostlyclean-recode:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in recode" ; \
-       (cd recode && \
+       (cd $(HOST_SUBDIR)/recode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16585,7 +17732,7 @@ clean-recode:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in recode" ; \
-       (cd recode && \
+       (cd $(HOST_SUBDIR)/recode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16610,7 +17757,7 @@ distclean-recode:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in recode" ; \
-       (cd recode && \
+       (cd $(HOST_SUBDIR)/recode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16635,7 +17782,7 @@ maintainer-clean-recode:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in recode" ; \
-       (cd recode && \
+       (cd $(HOST_SUBDIR)/recode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16651,24 +17798,20 @@ maybe-configure-sed:
 @if sed
 maybe-configure-sed: configure-sed
 configure-sed:
-       @test ! -f sed/Makefile || exit 0; \
-       [ -d sed ] || mkdir sed; \
+       @test ! -f $(HOST_SUBDIR)/sed/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sed ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in sed; \
-       cd sed || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/sed/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/sed"; \
+       libsrcdir="$$s/sed"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -16677,13 +17820,15 @@ configure-sed:
 .PHONY: all-sed maybe-all-sed
 maybe-all-sed:
 @if sed
+TARGET-sed=all
 maybe-all-sed: all-sed
 all-sed: configure-sed
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd sed && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/sed && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-sed))
 @endif sed
 
 .PHONY: check-sed maybe-check-sed
@@ -16696,7 +17841,8 @@ check-sed:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd sed && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/sed && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif sed
 
@@ -16710,7 +17856,8 @@ install-sed: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd sed && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/sed && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif sed
 
@@ -16732,7 +17879,7 @@ info-sed: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in sed" ; \
-       (cd sed && \
+       (cd $(HOST_SUBDIR)/sed && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16758,7 +17905,7 @@ dvi-sed: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in sed" ; \
-       (cd sed && \
+       (cd $(HOST_SUBDIR)/sed && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16768,6 +17915,32 @@ dvi-sed: \
 
 @endif sed
 
+.PHONY: maybe-html-sed html-sed
+maybe-html-sed:
+@if sed
+maybe-html-sed: html-sed
+
+html-sed: \
+    configure-sed 
+       @[ -f ./sed/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in sed" ; \
+       (cd $(HOST_SUBDIR)/sed && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif sed
+
 .PHONY: maybe-TAGS-sed TAGS-sed
 maybe-TAGS-sed:
 @if sed
@@ -16784,7 +17957,7 @@ TAGS-sed: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in sed" ; \
-       (cd sed && \
+       (cd $(HOST_SUBDIR)/sed && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16811,7 +17984,7 @@ install-info-sed: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in sed" ; \
-       (cd sed && \
+       (cd $(HOST_SUBDIR)/sed && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16837,7 +18010,7 @@ installcheck-sed: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in sed" ; \
-       (cd sed && \
+       (cd $(HOST_SUBDIR)/sed && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16862,7 +18035,7 @@ mostlyclean-sed:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in sed" ; \
-       (cd sed && \
+       (cd $(HOST_SUBDIR)/sed && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16887,7 +18060,7 @@ clean-sed:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in sed" ; \
-       (cd sed && \
+       (cd $(HOST_SUBDIR)/sed && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16912,7 +18085,7 @@ distclean-sed:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in sed" ; \
-       (cd sed && \
+       (cd $(HOST_SUBDIR)/sed && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16937,7 +18110,7 @@ maintainer-clean-sed:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in sed" ; \
-       (cd sed && \
+       (cd $(HOST_SUBDIR)/sed && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -16953,24 +18126,20 @@ maybe-configure-send-pr:
 @if send-pr
 maybe-configure-send-pr: configure-send-pr
 configure-send-pr:
-       @test ! -f send-pr/Makefile || exit 0; \
-       [ -d send-pr ] || mkdir send-pr; \
+       @test ! -f $(HOST_SUBDIR)/send-pr/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/send-pr ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in send-pr; \
-       cd send-pr || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/send-pr/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/send-pr"; \
+       libsrcdir="$$s/send-pr"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -16979,13 +18148,15 @@ configure-send-pr:
 .PHONY: all-send-pr maybe-all-send-pr
 maybe-all-send-pr:
 @if send-pr
+TARGET-send-pr=all
 maybe-all-send-pr: all-send-pr
 all-send-pr: configure-send-pr
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd send-pr && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/send-pr && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-send-pr))
 @endif send-pr
 
 .PHONY: check-send-pr maybe-check-send-pr
@@ -16998,7 +18169,8 @@ check-send-pr:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/send-pr && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif send-pr
 
@@ -17012,7 +18184,8 @@ install-send-pr: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/send-pr && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif send-pr
 
@@ -17034,7 +18207,7 @@ info-send-pr: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in send-pr" ; \
-       (cd send-pr && \
+       (cd $(HOST_SUBDIR)/send-pr && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17060,7 +18233,7 @@ dvi-send-pr: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in send-pr" ; \
-       (cd send-pr && \
+       (cd $(HOST_SUBDIR)/send-pr && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17070,6 +18243,32 @@ dvi-send-pr: \
 
 @endif send-pr
 
+.PHONY: maybe-html-send-pr html-send-pr
+maybe-html-send-pr:
+@if send-pr
+maybe-html-send-pr: html-send-pr
+
+html-send-pr: \
+    configure-send-pr 
+       @[ -f ./send-pr/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in send-pr" ; \
+       (cd $(HOST_SUBDIR)/send-pr && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif send-pr
+
 .PHONY: maybe-TAGS-send-pr TAGS-send-pr
 maybe-TAGS-send-pr:
 @if send-pr
@@ -17086,7 +18285,7 @@ TAGS-send-pr: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in send-pr" ; \
-       (cd send-pr && \
+       (cd $(HOST_SUBDIR)/send-pr && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17113,7 +18312,7 @@ install-info-send-pr: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in send-pr" ; \
-       (cd send-pr && \
+       (cd $(HOST_SUBDIR)/send-pr && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17139,7 +18338,7 @@ installcheck-send-pr: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in send-pr" ; \
-       (cd send-pr && \
+       (cd $(HOST_SUBDIR)/send-pr && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17164,7 +18363,7 @@ mostlyclean-send-pr:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in send-pr" ; \
-       (cd send-pr && \
+       (cd $(HOST_SUBDIR)/send-pr && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17189,7 +18388,7 @@ clean-send-pr:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in send-pr" ; \
-       (cd send-pr && \
+       (cd $(HOST_SUBDIR)/send-pr && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17214,7 +18413,7 @@ distclean-send-pr:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in send-pr" ; \
-       (cd send-pr && \
+       (cd $(HOST_SUBDIR)/send-pr && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17239,7 +18438,7 @@ maintainer-clean-send-pr:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in send-pr" ; \
-       (cd send-pr && \
+       (cd $(HOST_SUBDIR)/send-pr && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17255,24 +18454,20 @@ maybe-configure-shellutils:
 @if shellutils
 maybe-configure-shellutils: configure-shellutils
 configure-shellutils:
-       @test ! -f shellutils/Makefile || exit 0; \
-       [ -d shellutils ] || mkdir shellutils; \
+       @test ! -f $(HOST_SUBDIR)/shellutils/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/shellutils ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in shellutils; \
-       cd shellutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/shellutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/shellutils"; \
+       libsrcdir="$$s/shellutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -17281,13 +18476,15 @@ configure-shellutils:
 .PHONY: all-shellutils maybe-all-shellutils
 maybe-all-shellutils:
 @if shellutils
+TARGET-shellutils=all
 maybe-all-shellutils: all-shellutils
 all-shellutils: configure-shellutils
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd shellutils && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/shellutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-shellutils))
 @endif shellutils
 
 .PHONY: check-shellutils maybe-check-shellutils
@@ -17300,7 +18497,8 @@ check-shellutils:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/shellutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif shellutils
 
@@ -17314,7 +18512,8 @@ install-shellutils: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/shellutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif shellutils
 
@@ -17336,7 +18535,7 @@ info-shellutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in shellutils" ; \
-       (cd shellutils && \
+       (cd $(HOST_SUBDIR)/shellutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17362,7 +18561,7 @@ dvi-shellutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in shellutils" ; \
-       (cd shellutils && \
+       (cd $(HOST_SUBDIR)/shellutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17372,6 +18571,32 @@ dvi-shellutils: \
 
 @endif shellutils
 
+.PHONY: maybe-html-shellutils html-shellutils
+maybe-html-shellutils:
+@if shellutils
+maybe-html-shellutils: html-shellutils
+
+html-shellutils: \
+    configure-shellutils 
+       @[ -f ./shellutils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in shellutils" ; \
+       (cd $(HOST_SUBDIR)/shellutils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif shellutils
+
 .PHONY: maybe-TAGS-shellutils TAGS-shellutils
 maybe-TAGS-shellutils:
 @if shellutils
@@ -17388,7 +18613,7 @@ TAGS-shellutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in shellutils" ; \
-       (cd shellutils && \
+       (cd $(HOST_SUBDIR)/shellutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17415,7 +18640,7 @@ install-info-shellutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in shellutils" ; \
-       (cd shellutils && \
+       (cd $(HOST_SUBDIR)/shellutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17441,7 +18666,7 @@ installcheck-shellutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in shellutils" ; \
-       (cd shellutils && \
+       (cd $(HOST_SUBDIR)/shellutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17466,7 +18691,7 @@ mostlyclean-shellutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in shellutils" ; \
-       (cd shellutils && \
+       (cd $(HOST_SUBDIR)/shellutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17491,7 +18716,7 @@ clean-shellutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in shellutils" ; \
-       (cd shellutils && \
+       (cd $(HOST_SUBDIR)/shellutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17516,7 +18741,7 @@ distclean-shellutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in shellutils" ; \
-       (cd shellutils && \
+       (cd $(HOST_SUBDIR)/shellutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17541,7 +18766,7 @@ maintainer-clean-shellutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in shellutils" ; \
-       (cd shellutils && \
+       (cd $(HOST_SUBDIR)/shellutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17557,24 +18782,20 @@ maybe-configure-sid:
 @if sid
 maybe-configure-sid: configure-sid
 configure-sid:
-       @test ! -f sid/Makefile || exit 0; \
-       [ -d sid ] || mkdir sid; \
+       @test ! -f $(HOST_SUBDIR)/sid/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sid ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in sid; \
-       cd sid || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/sid/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/sid"; \
+       libsrcdir="$$s/sid"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -17583,13 +18804,15 @@ configure-sid:
 .PHONY: all-sid maybe-all-sid
 maybe-all-sid:
 @if sid
+TARGET-sid=all
 maybe-all-sid: all-sid
 all-sid: configure-sid
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd sid && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/sid && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-sid))
 @endif sid
 
 .PHONY: check-sid maybe-check-sid
@@ -17602,7 +18825,8 @@ check-sid:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd sid && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/sid && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif sid
 
@@ -17616,7 +18840,8 @@ install-sid: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd sid && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/sid && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif sid
 
@@ -17638,7 +18863,7 @@ info-sid: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in sid" ; \
-       (cd sid && \
+       (cd $(HOST_SUBDIR)/sid && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17664,7 +18889,7 @@ dvi-sid: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in sid" ; \
-       (cd sid && \
+       (cd $(HOST_SUBDIR)/sid && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17674,6 +18899,32 @@ dvi-sid: \
 
 @endif sid
 
+.PHONY: maybe-html-sid html-sid
+maybe-html-sid:
+@if sid
+maybe-html-sid: html-sid
+
+html-sid: \
+    configure-sid 
+       @[ -f ./sid/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in sid" ; \
+       (cd $(HOST_SUBDIR)/sid && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif sid
+
 .PHONY: maybe-TAGS-sid TAGS-sid
 maybe-TAGS-sid:
 @if sid
@@ -17690,7 +18941,7 @@ TAGS-sid: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in sid" ; \
-       (cd sid && \
+       (cd $(HOST_SUBDIR)/sid && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17717,7 +18968,7 @@ install-info-sid: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in sid" ; \
-       (cd sid && \
+       (cd $(HOST_SUBDIR)/sid && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17743,7 +18994,7 @@ installcheck-sid: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in sid" ; \
-       (cd sid && \
+       (cd $(HOST_SUBDIR)/sid && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17768,7 +19019,7 @@ mostlyclean-sid:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in sid" ; \
-       (cd sid && \
+       (cd $(HOST_SUBDIR)/sid && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17793,7 +19044,7 @@ clean-sid:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in sid" ; \
-       (cd sid && \
+       (cd $(HOST_SUBDIR)/sid && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17818,7 +19069,7 @@ distclean-sid:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in sid" ; \
-       (cd sid && \
+       (cd $(HOST_SUBDIR)/sid && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17843,7 +19094,7 @@ maintainer-clean-sid:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in sid" ; \
-       (cd sid && \
+       (cd $(HOST_SUBDIR)/sid && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17859,24 +19110,20 @@ maybe-configure-sim:
 @if sim
 maybe-configure-sim: configure-sim
 configure-sim:
-       @test ! -f sim/Makefile || exit 0; \
-       [ -d sim ] || mkdir sim; \
+       @test ! -f $(HOST_SUBDIR)/sim/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sim ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in sim; \
-       cd sim || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/sim/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/sim"; \
+       libsrcdir="$$s/sim"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -17885,13 +19132,15 @@ configure-sim:
 .PHONY: all-sim maybe-all-sim
 maybe-all-sim:
 @if sim
+TARGET-sim=all
 maybe-all-sim: all-sim
 all-sim: configure-sim
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd sim && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/sim && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-sim))
 @endif sim
 
 .PHONY: check-sim maybe-check-sim
@@ -17904,7 +19153,8 @@ check-sim:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd sim && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/sim && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif sim
 
@@ -17918,7 +19168,8 @@ install-sim: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd sim && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/sim && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif sim
 
@@ -17940,7 +19191,7 @@ info-sim: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in sim" ; \
-       (cd sim && \
+       (cd $(HOST_SUBDIR)/sim && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17966,7 +19217,7 @@ dvi-sim: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in sim" ; \
-       (cd sim && \
+       (cd $(HOST_SUBDIR)/sim && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -17976,6 +19227,32 @@ dvi-sim: \
 
 @endif sim
 
+.PHONY: maybe-html-sim html-sim
+maybe-html-sim:
+@if sim
+maybe-html-sim: html-sim
+
+html-sim: \
+    configure-sim 
+       @[ -f ./sim/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in sim" ; \
+       (cd $(HOST_SUBDIR)/sim && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif sim
+
 .PHONY: maybe-TAGS-sim TAGS-sim
 maybe-TAGS-sim:
 @if sim
@@ -17992,7 +19269,7 @@ TAGS-sim: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in sim" ; \
-       (cd sim && \
+       (cd $(HOST_SUBDIR)/sim && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18019,7 +19296,7 @@ install-info-sim: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in sim" ; \
-       (cd sim && \
+       (cd $(HOST_SUBDIR)/sim && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18045,7 +19322,7 @@ installcheck-sim: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in sim" ; \
-       (cd sim && \
+       (cd $(HOST_SUBDIR)/sim && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18070,7 +19347,7 @@ mostlyclean-sim:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in sim" ; \
-       (cd sim && \
+       (cd $(HOST_SUBDIR)/sim && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18095,7 +19372,7 @@ clean-sim:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in sim" ; \
-       (cd sim && \
+       (cd $(HOST_SUBDIR)/sim && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18120,7 +19397,7 @@ distclean-sim:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in sim" ; \
-       (cd sim && \
+       (cd $(HOST_SUBDIR)/sim && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18145,7 +19422,7 @@ maintainer-clean-sim:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in sim" ; \
-       (cd sim && \
+       (cd $(HOST_SUBDIR)/sim && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18161,24 +19438,20 @@ maybe-configure-tar:
 @if tar
 maybe-configure-tar: configure-tar
 configure-tar:
-       @test ! -f tar/Makefile || exit 0; \
-       [ -d tar ] || mkdir tar; \
+       @test ! -f $(HOST_SUBDIR)/tar/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tar ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in tar; \
-       cd tar || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/tar/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/tar"; \
+       libsrcdir="$$s/tar"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -18187,13 +19460,15 @@ configure-tar:
 .PHONY: all-tar maybe-all-tar
 maybe-all-tar:
 @if tar
+TARGET-tar=all
 maybe-all-tar: all-tar
 all-tar: configure-tar
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd tar && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/tar && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-tar))
 @endif tar
 
 .PHONY: check-tar maybe-check-tar
@@ -18206,7 +19481,8 @@ check-tar:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd tar && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/tar && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif tar
 
@@ -18220,7 +19496,8 @@ install-tar: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd tar && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/tar && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif tar
 
@@ -18242,7 +19519,7 @@ info-tar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in tar" ; \
-       (cd tar && \
+       (cd $(HOST_SUBDIR)/tar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18268,7 +19545,7 @@ dvi-tar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in tar" ; \
-       (cd tar && \
+       (cd $(HOST_SUBDIR)/tar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18278,6 +19555,32 @@ dvi-tar: \
 
 @endif tar
 
+.PHONY: maybe-html-tar html-tar
+maybe-html-tar:
+@if tar
+maybe-html-tar: html-tar
+
+html-tar: \
+    configure-tar 
+       @[ -f ./tar/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in tar" ; \
+       (cd $(HOST_SUBDIR)/tar && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif tar
+
 .PHONY: maybe-TAGS-tar TAGS-tar
 maybe-TAGS-tar:
 @if tar
@@ -18294,7 +19597,7 @@ TAGS-tar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in tar" ; \
-       (cd tar && \
+       (cd $(HOST_SUBDIR)/tar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18321,7 +19624,7 @@ install-info-tar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in tar" ; \
-       (cd tar && \
+       (cd $(HOST_SUBDIR)/tar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18347,7 +19650,7 @@ installcheck-tar: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in tar" ; \
-       (cd tar && \
+       (cd $(HOST_SUBDIR)/tar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18372,7 +19675,7 @@ mostlyclean-tar:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in tar" ; \
-       (cd tar && \
+       (cd $(HOST_SUBDIR)/tar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18397,7 +19700,7 @@ clean-tar:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in tar" ; \
-       (cd tar && \
+       (cd $(HOST_SUBDIR)/tar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18422,7 +19725,7 @@ distclean-tar:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in tar" ; \
-       (cd tar && \
+       (cd $(HOST_SUBDIR)/tar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18447,7 +19750,7 @@ maintainer-clean-tar:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in tar" ; \
-       (cd tar && \
+       (cd $(HOST_SUBDIR)/tar && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18463,24 +19766,20 @@ maybe-configure-texinfo:
 @if texinfo
 maybe-configure-texinfo: configure-texinfo
 configure-texinfo:
-       @test ! -f texinfo/Makefile || exit 0; \
-       [ -d texinfo ] || mkdir texinfo; \
+       @test ! -f $(HOST_SUBDIR)/texinfo/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/texinfo ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in texinfo; \
-       cd texinfo || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/texinfo/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/texinfo"; \
+       libsrcdir="$$s/texinfo"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -18489,13 +19788,15 @@ configure-texinfo:
 .PHONY: all-texinfo maybe-all-texinfo
 maybe-all-texinfo:
 @if texinfo
+TARGET-texinfo=all
 maybe-all-texinfo: all-texinfo
 all-texinfo: configure-texinfo
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd texinfo && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/texinfo && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-texinfo))
 @endif texinfo
 
 .PHONY: check-texinfo maybe-check-texinfo
@@ -18508,7 +19809,8 @@ check-texinfo:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/texinfo && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif texinfo
 
@@ -18539,7 +19841,7 @@ info-texinfo: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in texinfo" ; \
-       (cd texinfo && \
+       (cd $(HOST_SUBDIR)/texinfo && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18565,7 +19867,7 @@ dvi-texinfo: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in texinfo" ; \
-       (cd texinfo && \
+       (cd $(HOST_SUBDIR)/texinfo && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18575,6 +19877,32 @@ dvi-texinfo: \
 
 @endif texinfo
 
+.PHONY: maybe-html-texinfo html-texinfo
+maybe-html-texinfo:
+@if texinfo
+maybe-html-texinfo: html-texinfo
+
+html-texinfo: \
+    configure-texinfo 
+       @[ -f ./texinfo/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in texinfo" ; \
+       (cd $(HOST_SUBDIR)/texinfo && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif texinfo
+
 .PHONY: maybe-TAGS-texinfo TAGS-texinfo
 maybe-TAGS-texinfo:
 @if texinfo
@@ -18591,7 +19919,7 @@ TAGS-texinfo: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in texinfo" ; \
-       (cd texinfo && \
+       (cd $(HOST_SUBDIR)/texinfo && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18618,7 +19946,7 @@ install-info-texinfo: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in texinfo" ; \
-       (cd texinfo && \
+       (cd $(HOST_SUBDIR)/texinfo && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18644,7 +19972,7 @@ installcheck-texinfo: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in texinfo" ; \
-       (cd texinfo && \
+       (cd $(HOST_SUBDIR)/texinfo && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18669,7 +19997,7 @@ mostlyclean-texinfo:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in texinfo" ; \
-       (cd texinfo && \
+       (cd $(HOST_SUBDIR)/texinfo && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18694,7 +20022,7 @@ clean-texinfo:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in texinfo" ; \
-       (cd texinfo && \
+       (cd $(HOST_SUBDIR)/texinfo && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18719,7 +20047,7 @@ distclean-texinfo:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in texinfo" ; \
-       (cd texinfo && \
+       (cd $(HOST_SUBDIR)/texinfo && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18744,7 +20072,7 @@ maintainer-clean-texinfo:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in texinfo" ; \
-       (cd texinfo && \
+       (cd $(HOST_SUBDIR)/texinfo && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18760,24 +20088,20 @@ maybe-configure-textutils:
 @if textutils
 maybe-configure-textutils: configure-textutils
 configure-textutils:
-       @test ! -f textutils/Makefile || exit 0; \
-       [ -d textutils ] || mkdir textutils; \
+       @test ! -f $(HOST_SUBDIR)/textutils/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/textutils ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in textutils; \
-       cd textutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/textutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/textutils"; \
+       libsrcdir="$$s/textutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -18786,13 +20110,15 @@ configure-textutils:
 .PHONY: all-textutils maybe-all-textutils
 maybe-all-textutils:
 @if textutils
+TARGET-textutils=all
 maybe-all-textutils: all-textutils
 all-textutils: configure-textutils
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd textutils && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/textutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-textutils))
 @endif textutils
 
 .PHONY: check-textutils maybe-check-textutils
@@ -18805,7 +20131,8 @@ check-textutils:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/textutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif textutils
 
@@ -18819,7 +20146,8 @@ install-textutils: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/textutils && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif textutils
 
@@ -18841,7 +20169,7 @@ info-textutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in textutils" ; \
-       (cd textutils && \
+       (cd $(HOST_SUBDIR)/textutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18867,7 +20195,7 @@ dvi-textutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in textutils" ; \
-       (cd textutils && \
+       (cd $(HOST_SUBDIR)/textutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18877,6 +20205,32 @@ dvi-textutils: \
 
 @endif textutils
 
+.PHONY: maybe-html-textutils html-textutils
+maybe-html-textutils:
+@if textutils
+maybe-html-textutils: html-textutils
+
+html-textutils: \
+    configure-textutils 
+       @[ -f ./textutils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in textutils" ; \
+       (cd $(HOST_SUBDIR)/textutils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif textutils
+
 .PHONY: maybe-TAGS-textutils TAGS-textutils
 maybe-TAGS-textutils:
 @if textutils
@@ -18893,7 +20247,7 @@ TAGS-textutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in textutils" ; \
-       (cd textutils && \
+       (cd $(HOST_SUBDIR)/textutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18920,7 +20274,7 @@ install-info-textutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in textutils" ; \
-       (cd textutils && \
+       (cd $(HOST_SUBDIR)/textutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18946,7 +20300,7 @@ installcheck-textutils: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in textutils" ; \
-       (cd textutils && \
+       (cd $(HOST_SUBDIR)/textutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18971,7 +20325,7 @@ mostlyclean-textutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in textutils" ; \
-       (cd textutils && \
+       (cd $(HOST_SUBDIR)/textutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -18996,7 +20350,7 @@ clean-textutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in textutils" ; \
-       (cd textutils && \
+       (cd $(HOST_SUBDIR)/textutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19021,7 +20375,7 @@ distclean-textutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in textutils" ; \
-       (cd textutils && \
+       (cd $(HOST_SUBDIR)/textutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19046,7 +20400,7 @@ maintainer-clean-textutils:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in textutils" ; \
-       (cd textutils && \
+       (cd $(HOST_SUBDIR)/textutils && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19062,24 +20416,20 @@ maybe-configure-time:
 @if time
 maybe-configure-time: configure-time
 configure-time:
-       @test ! -f time/Makefile || exit 0; \
-       [ -d time ] || mkdir time; \
+       @test ! -f $(HOST_SUBDIR)/time/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/time ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in time; \
-       cd time || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/time/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/time"; \
+       libsrcdir="$$s/time"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -19088,13 +20438,15 @@ configure-time:
 .PHONY: all-time maybe-all-time
 maybe-all-time:
 @if time
+TARGET-time=all
 maybe-all-time: all-time
 all-time: configure-time
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd time && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/time && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-time))
 @endif time
 
 .PHONY: check-time maybe-check-time
@@ -19107,7 +20459,8 @@ check-time:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd time && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/time && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif time
 
@@ -19121,7 +20474,8 @@ install-time: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd time && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/time && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif time
 
@@ -19143,7 +20497,7 @@ info-time: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in time" ; \
-       (cd time && \
+       (cd $(HOST_SUBDIR)/time && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19169,7 +20523,7 @@ dvi-time: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in time" ; \
-       (cd time && \
+       (cd $(HOST_SUBDIR)/time && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19179,6 +20533,32 @@ dvi-time: \
 
 @endif time
 
+.PHONY: maybe-html-time html-time
+maybe-html-time:
+@if time
+maybe-html-time: html-time
+
+html-time: \
+    configure-time 
+       @[ -f ./time/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in time" ; \
+       (cd $(HOST_SUBDIR)/time && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif time
+
 .PHONY: maybe-TAGS-time TAGS-time
 maybe-TAGS-time:
 @if time
@@ -19195,7 +20575,7 @@ TAGS-time: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in time" ; \
-       (cd time && \
+       (cd $(HOST_SUBDIR)/time && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19222,7 +20602,7 @@ install-info-time: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in time" ; \
-       (cd time && \
+       (cd $(HOST_SUBDIR)/time && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19248,7 +20628,7 @@ installcheck-time: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in time" ; \
-       (cd time && \
+       (cd $(HOST_SUBDIR)/time && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19273,7 +20653,7 @@ mostlyclean-time:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in time" ; \
-       (cd time && \
+       (cd $(HOST_SUBDIR)/time && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19298,7 +20678,7 @@ clean-time:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in time" ; \
-       (cd time && \
+       (cd $(HOST_SUBDIR)/time && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19323,7 +20703,7 @@ distclean-time:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in time" ; \
-       (cd time && \
+       (cd $(HOST_SUBDIR)/time && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19348,7 +20728,7 @@ maintainer-clean-time:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in time" ; \
-       (cd time && \
+       (cd $(HOST_SUBDIR)/time && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19364,24 +20744,20 @@ maybe-configure-uudecode:
 @if uudecode
 maybe-configure-uudecode: configure-uudecode
 configure-uudecode:
-       @test ! -f uudecode/Makefile || exit 0; \
-       [ -d uudecode ] || mkdir uudecode; \
+       @test ! -f $(HOST_SUBDIR)/uudecode/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/uudecode ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in uudecode; \
-       cd uudecode || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/uudecode/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/uudecode"; \
+       libsrcdir="$$s/uudecode"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -19390,13 +20766,15 @@ configure-uudecode:
 .PHONY: all-uudecode maybe-all-uudecode
 maybe-all-uudecode:
 @if uudecode
+TARGET-uudecode=all
 maybe-all-uudecode: all-uudecode
 all-uudecode: configure-uudecode
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd uudecode && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/uudecode && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-uudecode))
 @endif uudecode
 
 .PHONY: check-uudecode maybe-check-uudecode
@@ -19409,7 +20787,8 @@ check-uudecode:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/uudecode && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif uudecode
 
@@ -19423,7 +20802,8 @@ install-uudecode: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/uudecode && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif uudecode
 
@@ -19445,7 +20825,7 @@ info-uudecode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in uudecode" ; \
-       (cd uudecode && \
+       (cd $(HOST_SUBDIR)/uudecode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19471,7 +20851,7 @@ dvi-uudecode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in uudecode" ; \
-       (cd uudecode && \
+       (cd $(HOST_SUBDIR)/uudecode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19481,6 +20861,32 @@ dvi-uudecode: \
 
 @endif uudecode
 
+.PHONY: maybe-html-uudecode html-uudecode
+maybe-html-uudecode:
+@if uudecode
+maybe-html-uudecode: html-uudecode
+
+html-uudecode: \
+    configure-uudecode 
+       @[ -f ./uudecode/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in uudecode" ; \
+       (cd $(HOST_SUBDIR)/uudecode && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif uudecode
+
 .PHONY: maybe-TAGS-uudecode TAGS-uudecode
 maybe-TAGS-uudecode:
 @if uudecode
@@ -19497,7 +20903,7 @@ TAGS-uudecode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in uudecode" ; \
-       (cd uudecode && \
+       (cd $(HOST_SUBDIR)/uudecode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19524,7 +20930,7 @@ install-info-uudecode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in uudecode" ; \
-       (cd uudecode && \
+       (cd $(HOST_SUBDIR)/uudecode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19550,7 +20956,7 @@ installcheck-uudecode: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in uudecode" ; \
-       (cd uudecode && \
+       (cd $(HOST_SUBDIR)/uudecode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19575,7 +20981,7 @@ mostlyclean-uudecode:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in uudecode" ; \
-       (cd uudecode && \
+       (cd $(HOST_SUBDIR)/uudecode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19600,7 +21006,7 @@ clean-uudecode:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in uudecode" ; \
-       (cd uudecode && \
+       (cd $(HOST_SUBDIR)/uudecode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19625,7 +21031,7 @@ distclean-uudecode:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in uudecode" ; \
-       (cd uudecode && \
+       (cd $(HOST_SUBDIR)/uudecode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19650,7 +21056,7 @@ maintainer-clean-uudecode:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in uudecode" ; \
-       (cd uudecode && \
+       (cd $(HOST_SUBDIR)/uudecode && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19666,24 +21072,20 @@ maybe-configure-wdiff:
 @if wdiff
 maybe-configure-wdiff: configure-wdiff
 configure-wdiff:
-       @test ! -f wdiff/Makefile || exit 0; \
-       [ -d wdiff ] || mkdir wdiff; \
+       @test ! -f $(HOST_SUBDIR)/wdiff/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/wdiff ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in wdiff; \
-       cd wdiff || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/wdiff/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/wdiff"; \
+       libsrcdir="$$s/wdiff"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -19692,13 +21094,15 @@ configure-wdiff:
 .PHONY: all-wdiff maybe-all-wdiff
 maybe-all-wdiff:
 @if wdiff
+TARGET-wdiff=all
 maybe-all-wdiff: all-wdiff
 all-wdiff: configure-wdiff
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd wdiff && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/wdiff && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-wdiff))
 @endif wdiff
 
 .PHONY: check-wdiff maybe-check-wdiff
@@ -19711,7 +21115,8 @@ check-wdiff:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/wdiff && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif wdiff
 
@@ -19725,7 +21130,8 @@ install-wdiff: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/wdiff && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif wdiff
 
@@ -19747,7 +21153,7 @@ info-wdiff: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in wdiff" ; \
-       (cd wdiff && \
+       (cd $(HOST_SUBDIR)/wdiff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19773,7 +21179,7 @@ dvi-wdiff: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in wdiff" ; \
-       (cd wdiff && \
+       (cd $(HOST_SUBDIR)/wdiff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19783,6 +21189,32 @@ dvi-wdiff: \
 
 @endif wdiff
 
+.PHONY: maybe-html-wdiff html-wdiff
+maybe-html-wdiff:
+@if wdiff
+maybe-html-wdiff: html-wdiff
+
+html-wdiff: \
+    configure-wdiff 
+       @[ -f ./wdiff/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in wdiff" ; \
+       (cd $(HOST_SUBDIR)/wdiff && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif wdiff
+
 .PHONY: maybe-TAGS-wdiff TAGS-wdiff
 maybe-TAGS-wdiff:
 @if wdiff
@@ -19799,7 +21231,7 @@ TAGS-wdiff: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in wdiff" ; \
-       (cd wdiff && \
+       (cd $(HOST_SUBDIR)/wdiff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19826,7 +21258,7 @@ install-info-wdiff: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in wdiff" ; \
-       (cd wdiff && \
+       (cd $(HOST_SUBDIR)/wdiff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19852,7 +21284,7 @@ installcheck-wdiff: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in wdiff" ; \
-       (cd wdiff && \
+       (cd $(HOST_SUBDIR)/wdiff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19877,7 +21309,7 @@ mostlyclean-wdiff:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in wdiff" ; \
-       (cd wdiff && \
+       (cd $(HOST_SUBDIR)/wdiff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19902,7 +21334,7 @@ clean-wdiff:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in wdiff" ; \
-       (cd wdiff && \
+       (cd $(HOST_SUBDIR)/wdiff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19927,7 +21359,7 @@ distclean-wdiff:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in wdiff" ; \
-       (cd wdiff && \
+       (cd $(HOST_SUBDIR)/wdiff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19952,7 +21384,7 @@ maintainer-clean-wdiff:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in wdiff" ; \
-       (cd wdiff && \
+       (cd $(HOST_SUBDIR)/wdiff && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -19968,24 +21400,20 @@ maybe-configure-zip:
 @if zip
 maybe-configure-zip: configure-zip
 configure-zip:
-       @test ! -f zip/Makefile || exit 0; \
-       [ -d zip ] || mkdir zip; \
+       @test ! -f $(HOST_SUBDIR)/zip/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zip ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in zip; \
-       cd zip || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/zip/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/zip"; \
+       libsrcdir="$$s/zip"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -19994,13 +21422,15 @@ configure-zip:
 .PHONY: all-zip maybe-all-zip
 maybe-all-zip:
 @if zip
+TARGET-zip=all
 maybe-all-zip: all-zip
 all-zip: configure-zip
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd zip && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/zip && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-zip))
 @endif zip
 
 .PHONY: check-zip maybe-check-zip
@@ -20015,7 +21445,8 @@ check-zip:
          s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
          $(SET_LIB_PATH) \
          $(HOST_EXPORTS) \
-         (cd zip && $(MAKE) $(FLAGS_TO_PASS)  check); \
+         (cd $(HOST_SUBDIR)/zip && \
+           $(MAKE) $(FLAGS_TO_PASS)  check)
        fi
 
 @endif zip
@@ -20030,7 +21461,8 @@ install-zip: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd zip && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/zip && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif zip
 
@@ -20052,7 +21484,7 @@ info-zip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in zip" ; \
-       (cd zip && \
+       (cd $(HOST_SUBDIR)/zip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20078,7 +21510,7 @@ dvi-zip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in zip" ; \
-       (cd zip && \
+       (cd $(HOST_SUBDIR)/zip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20088,6 +21520,32 @@ dvi-zip: \
 
 @endif zip
 
+.PHONY: maybe-html-zip html-zip
+maybe-html-zip:
+@if zip
+maybe-html-zip: html-zip
+
+html-zip: \
+    configure-zip 
+       @[ -f ./zip/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in zip" ; \
+       (cd $(HOST_SUBDIR)/zip && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif zip
+
 .PHONY: maybe-TAGS-zip TAGS-zip
 maybe-TAGS-zip:
 @if zip
@@ -20104,7 +21562,7 @@ TAGS-zip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in zip" ; \
-       (cd zip && \
+       (cd $(HOST_SUBDIR)/zip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20131,7 +21589,7 @@ install-info-zip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in zip" ; \
-       (cd zip && \
+       (cd $(HOST_SUBDIR)/zip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20157,7 +21615,7 @@ installcheck-zip: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in zip" ; \
-       (cd zip && \
+       (cd $(HOST_SUBDIR)/zip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20182,7 +21640,7 @@ mostlyclean-zip:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in zip" ; \
-       (cd zip && \
+       (cd $(HOST_SUBDIR)/zip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20207,7 +21665,7 @@ clean-zip:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in zip" ; \
-       (cd zip && \
+       (cd $(HOST_SUBDIR)/zip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20232,7 +21690,7 @@ distclean-zip:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in zip" ; \
-       (cd zip && \
+       (cd $(HOST_SUBDIR)/zip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20257,7 +21715,7 @@ maintainer-clean-zip:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in zip" ; \
-       (cd zip && \
+       (cd $(HOST_SUBDIR)/zip && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20274,24 +21732,20 @@ maybe-configure-zlib:
 maybe-configure-zlib: configure-zlib
 configure-zlib:
        @test -f stage_last && exit 0; \
-       test ! -f zlib/Makefile || exit 0; \
-       [ -d zlib ] || mkdir zlib; \
+       test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in zlib; \
-       cd zlib || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/zlib"; \
+       libsrcdir="$$s/zlib"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -20300,6 +21754,7 @@ configure-zlib:
 .PHONY: all-zlib maybe-all-zlib
 maybe-all-zlib:
 @if zlib
+TARGET-zlib=all
 maybe-all-zlib: all-zlib
 all-zlib: configure-zlib
        @test -f stage_last && exit 0; \
@@ -20307,7 +21762,8 @@ all-zlib: configure-zlib
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd zlib && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/zlib && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-zlib))
 @endif zlib
 
 .PHONY: check-zlib maybe-check-zlib
@@ -20346,7 +21802,7 @@ info-zlib: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in zlib" ; \
-       (cd zlib && \
+       (cd $(HOST_SUBDIR)/zlib && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20372,7 +21828,7 @@ dvi-zlib: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in zlib" ; \
-       (cd zlib && \
+       (cd $(HOST_SUBDIR)/zlib && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20382,6 +21838,32 @@ dvi-zlib: \
 
 @endif zlib
 
+.PHONY: maybe-html-zlib html-zlib
+maybe-html-zlib:
+@if zlib
+maybe-html-zlib: html-zlib
+
+html-zlib: \
+    configure-zlib 
+       @[ -f ./zlib/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in zlib" ; \
+       (cd $(HOST_SUBDIR)/zlib && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif zlib
+
 .PHONY: maybe-TAGS-zlib TAGS-zlib
 maybe-TAGS-zlib:
 @if zlib
@@ -20398,7 +21880,7 @@ TAGS-zlib: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in zlib" ; \
-       (cd zlib && \
+       (cd $(HOST_SUBDIR)/zlib && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20425,7 +21907,7 @@ install-info-zlib: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in zlib" ; \
-       (cd zlib && \
+       (cd $(HOST_SUBDIR)/zlib && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20451,7 +21933,7 @@ installcheck-zlib: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in zlib" ; \
-       (cd zlib && \
+       (cd $(HOST_SUBDIR)/zlib && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20476,7 +21958,7 @@ mostlyclean-zlib:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in zlib" ; \
-       (cd zlib && \
+       (cd $(HOST_SUBDIR)/zlib && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20501,7 +21983,7 @@ clean-zlib:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in zlib" ; \
-       (cd zlib && \
+       (cd $(HOST_SUBDIR)/zlib && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20526,7 +22008,7 @@ distclean-zlib:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in zlib" ; \
-       (cd zlib && \
+       (cd $(HOST_SUBDIR)/zlib && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20551,7 +22033,7 @@ maintainer-clean-zlib:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in zlib" ; \
-       (cd zlib && \
+       (cd $(HOST_SUBDIR)/zlib && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20567,24 +22049,20 @@ maybe-configure-gdb:
 @if gdb
 maybe-configure-gdb: configure-gdb
 configure-gdb:
-       @test ! -f gdb/Makefile || exit 0; \
-       [ -d gdb ] || mkdir gdb; \
+       @test ! -f $(HOST_SUBDIR)/gdb/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gdb ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in gdb; \
-       cd gdb || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gdb/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gdb"; \
+       libsrcdir="$$s/gdb"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -20593,13 +22071,15 @@ configure-gdb:
 .PHONY: all-gdb maybe-all-gdb
 maybe-all-gdb:
 @if gdb
+TARGET-gdb=all
 maybe-all-gdb: all-gdb
 all-gdb: configure-gdb
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+       (cd $(HOST_SUBDIR)/gdb && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-gdb))
 @endif gdb
 
 .PHONY: check-gdb maybe-check-gdb
@@ -20612,7 +22092,8 @@ check-gdb:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gdb && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/gdb && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 @endif gdb
 
@@ -20626,7 +22107,8 @@ install-gdb: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd gdb && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/gdb && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 @endif gdb
 
@@ -20648,7 +22130,7 @@ info-gdb: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in gdb" ; \
-       (cd gdb && \
+       (cd $(HOST_SUBDIR)/gdb && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20674,7 +22156,7 @@ dvi-gdb: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in gdb" ; \
-       (cd gdb && \
+       (cd $(HOST_SUBDIR)/gdb && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20684,6 +22166,32 @@ dvi-gdb: \
 
 @endif gdb
 
+.PHONY: maybe-html-gdb html-gdb
+maybe-html-gdb:
+@if gdb
+maybe-html-gdb: html-gdb
+
+html-gdb: \
+    configure-gdb 
+       @[ -f ./gdb/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in gdb" ; \
+       (cd $(HOST_SUBDIR)/gdb && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif gdb
+
 .PHONY: maybe-TAGS-gdb TAGS-gdb
 maybe-TAGS-gdb:
 @if gdb
@@ -20700,7 +22208,7 @@ TAGS-gdb: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in gdb" ; \
-       (cd gdb && \
+       (cd $(HOST_SUBDIR)/gdb && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20727,7 +22235,7 @@ install-info-gdb: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in gdb" ; \
-       (cd gdb && \
+       (cd $(HOST_SUBDIR)/gdb && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20753,7 +22261,7 @@ installcheck-gdb: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in gdb" ; \
-       (cd gdb && \
+       (cd $(HOST_SUBDIR)/gdb && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20778,7 +22286,7 @@ mostlyclean-gdb:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in gdb" ; \
-       (cd gdb && \
+       (cd $(HOST_SUBDIR)/gdb && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20803,7 +22311,7 @@ clean-gdb:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in gdb" ; \
-       (cd gdb && \
+       (cd $(HOST_SUBDIR)/gdb && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20828,7 +22336,7 @@ distclean-gdb:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in gdb" ; \
-       (cd gdb && \
+       (cd $(HOST_SUBDIR)/gdb && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20853,7 +22361,7 @@ maintainer-clean-gdb:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in gdb" ; \
-       (cd gdb && \
+       (cd $(HOST_SUBDIR)/gdb && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20869,24 +22377,20 @@ maybe-configure-expect:
 @if expect
 maybe-configure-expect: configure-expect
 configure-expect:
-       @test ! -f expect/Makefile || exit 0; \
-       [ -d expect ] || mkdir expect; \
+       @test ! -f $(HOST_SUBDIR)/expect/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/expect ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in expect; \
-       cd expect || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/expect/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/expect"; \
+       libsrcdir="$$s/expect"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -20895,13 +22399,15 @@ configure-expect:
 .PHONY: all-expect maybe-all-expect
 maybe-all-expect:
 @if expect
+TARGET-expect=all
 maybe-all-expect: all-expect
 all-expect: configure-expect
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+       (cd $(HOST_SUBDIR)/expect && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-expect))
 @endif expect
 
 .PHONY: check-expect maybe-check-expect
@@ -20914,7 +22420,8 @@ check-expect:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd expect && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/expect && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 @endif expect
 
@@ -20928,7 +22435,8 @@ install-expect: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd expect && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/expect && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 @endif expect
 
@@ -20950,7 +22458,7 @@ info-expect: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in expect" ; \
-       (cd expect && \
+       (cd $(HOST_SUBDIR)/expect && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20976,7 +22484,7 @@ dvi-expect: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in expect" ; \
-       (cd expect && \
+       (cd $(HOST_SUBDIR)/expect && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -20986,6 +22494,32 @@ dvi-expect: \
 
 @endif expect
 
+.PHONY: maybe-html-expect html-expect
+maybe-html-expect:
+@if expect
+maybe-html-expect: html-expect
+
+html-expect: \
+    configure-expect 
+       @[ -f ./expect/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in expect" ; \
+       (cd $(HOST_SUBDIR)/expect && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif expect
+
 .PHONY: maybe-TAGS-expect TAGS-expect
 maybe-TAGS-expect:
 @if expect
@@ -21002,7 +22536,7 @@ TAGS-expect: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in expect" ; \
-       (cd expect && \
+       (cd $(HOST_SUBDIR)/expect && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21029,7 +22563,7 @@ install-info-expect: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in expect" ; \
-       (cd expect && \
+       (cd $(HOST_SUBDIR)/expect && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21055,7 +22589,7 @@ installcheck-expect: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in expect" ; \
-       (cd expect && \
+       (cd $(HOST_SUBDIR)/expect && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21080,7 +22614,7 @@ mostlyclean-expect:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in expect" ; \
-       (cd expect && \
+       (cd $(HOST_SUBDIR)/expect && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21105,7 +22639,7 @@ clean-expect:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in expect" ; \
-       (cd expect && \
+       (cd $(HOST_SUBDIR)/expect && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21130,7 +22664,7 @@ distclean-expect:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in expect" ; \
-       (cd expect && \
+       (cd $(HOST_SUBDIR)/expect && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21155,7 +22689,7 @@ maintainer-clean-expect:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in expect" ; \
-       (cd expect && \
+       (cd $(HOST_SUBDIR)/expect && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21171,24 +22705,20 @@ maybe-configure-guile:
 @if guile
 maybe-configure-guile: configure-guile
 configure-guile:
-       @test ! -f guile/Makefile || exit 0; \
-       [ -d guile ] || mkdir guile; \
+       @test ! -f $(HOST_SUBDIR)/guile/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/guile ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in guile; \
-       cd guile || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/guile/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/guile"; \
+       libsrcdir="$$s/guile"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -21197,13 +22727,15 @@ configure-guile:
 .PHONY: all-guile maybe-all-guile
 maybe-all-guile:
 @if guile
+TARGET-guile=all
 maybe-all-guile: all-guile
 all-guile: configure-guile
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+       (cd $(HOST_SUBDIR)/guile && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-guile))
 @endif guile
 
 .PHONY: check-guile maybe-check-guile
@@ -21216,7 +22748,8 @@ check-guile:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd guile && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/guile && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 @endif guile
 
@@ -21230,7 +22763,8 @@ install-guile: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd guile && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/guile && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 @endif guile
 
@@ -21252,7 +22786,7 @@ info-guile: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in guile" ; \
-       (cd guile && \
+       (cd $(HOST_SUBDIR)/guile && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21278,7 +22812,7 @@ dvi-guile: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in guile" ; \
-       (cd guile && \
+       (cd $(HOST_SUBDIR)/guile && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21288,6 +22822,32 @@ dvi-guile: \
 
 @endif guile
 
+.PHONY: maybe-html-guile html-guile
+maybe-html-guile:
+@if guile
+maybe-html-guile: html-guile
+
+html-guile: \
+    configure-guile 
+       @[ -f ./guile/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in guile" ; \
+       (cd $(HOST_SUBDIR)/guile && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif guile
+
 .PHONY: maybe-TAGS-guile TAGS-guile
 maybe-TAGS-guile:
 @if guile
@@ -21304,7 +22864,7 @@ TAGS-guile: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in guile" ; \
-       (cd guile && \
+       (cd $(HOST_SUBDIR)/guile && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21331,7 +22891,7 @@ install-info-guile: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in guile" ; \
-       (cd guile && \
+       (cd $(HOST_SUBDIR)/guile && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21357,7 +22917,7 @@ installcheck-guile: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in guile" ; \
-       (cd guile && \
+       (cd $(HOST_SUBDIR)/guile && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21382,7 +22942,7 @@ mostlyclean-guile:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in guile" ; \
-       (cd guile && \
+       (cd $(HOST_SUBDIR)/guile && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21407,7 +22967,7 @@ clean-guile:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in guile" ; \
-       (cd guile && \
+       (cd $(HOST_SUBDIR)/guile && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21432,7 +22992,7 @@ distclean-guile:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in guile" ; \
-       (cd guile && \
+       (cd $(HOST_SUBDIR)/guile && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21457,7 +23017,7 @@ maintainer-clean-guile:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in guile" ; \
-       (cd guile && \
+       (cd $(HOST_SUBDIR)/guile && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21473,24 +23033,20 @@ maybe-configure-tk:
 @if tk
 maybe-configure-tk: configure-tk
 configure-tk:
-       @test ! -f tk/Makefile || exit 0; \
-       [ -d tk ] || mkdir tk; \
+       @test ! -f $(HOST_SUBDIR)/tk/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tk ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in tk; \
-       cd tk || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/tk/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/tk"; \
+       libsrcdir="$$s/tk"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -21499,13 +23055,15 @@ configure-tk:
 .PHONY: all-tk maybe-all-tk
 maybe-all-tk:
 @if tk
+TARGET-tk=all
 maybe-all-tk: all-tk
 all-tk: configure-tk
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all)
+       (cd $(HOST_SUBDIR)/tk && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) $(TARGET-tk))
 @endif tk
 
 .PHONY: check-tk maybe-check-tk
@@ -21518,7 +23076,8 @@ check-tk:
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd tk && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) check)
+       (cd $(HOST_SUBDIR)/tk && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check)
 
 @endif tk
 
@@ -21532,7 +23091,8 @@ install-tk: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd tk && $(MAKE) $(FLAGS_TO_PASS)$(X11_FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/tk && \
+         $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install)
 
 @endif tk
 
@@ -21554,7 +23114,7 @@ info-tk: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in tk" ; \
-       (cd tk && \
+       (cd $(HOST_SUBDIR)/tk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21580,7 +23140,7 @@ dvi-tk: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in tk" ; \
-       (cd tk && \
+       (cd $(HOST_SUBDIR)/tk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21590,6 +23150,32 @@ dvi-tk: \
 
 @endif tk
 
+.PHONY: maybe-html-tk html-tk
+maybe-html-tk:
+@if tk
+maybe-html-tk: html-tk
+
+html-tk: \
+    configure-tk 
+       @[ -f ./tk/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in tk" ; \
+       (cd $(HOST_SUBDIR)/tk && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif tk
+
 .PHONY: maybe-TAGS-tk TAGS-tk
 maybe-TAGS-tk:
 @if tk
@@ -21606,7 +23192,7 @@ TAGS-tk: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in tk" ; \
-       (cd tk && \
+       (cd $(HOST_SUBDIR)/tk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21633,7 +23219,7 @@ install-info-tk: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in tk" ; \
-       (cd tk && \
+       (cd $(HOST_SUBDIR)/tk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21659,7 +23245,7 @@ installcheck-tk: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in tk" ; \
-       (cd tk && \
+       (cd $(HOST_SUBDIR)/tk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21684,7 +23270,7 @@ mostlyclean-tk:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing mostlyclean in tk" ; \
-       (cd tk && \
+       (cd $(HOST_SUBDIR)/tk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21709,7 +23295,7 @@ clean-tk:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing clean in tk" ; \
-       (cd tk && \
+       (cd $(HOST_SUBDIR)/tk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21734,7 +23320,7 @@ distclean-tk:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing distclean in tk" ; \
-       (cd tk && \
+       (cd $(HOST_SUBDIR)/tk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21759,7 +23345,7 @@ maintainer-clean-tk:
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing maintainer-clean in tk" ; \
-       (cd tk && \
+       (cd $(HOST_SUBDIR)/tk && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21775,24 +23361,20 @@ maybe-configure-libtermcap:
 @if libtermcap
 maybe-configure-libtermcap: configure-libtermcap
 configure-libtermcap:
-       @test ! -f libtermcap/Makefile || exit 0; \
-       [ -d libtermcap ] || mkdir libtermcap; \
+       @test ! -f $(HOST_SUBDIR)/libtermcap/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libtermcap ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
        echo Configuring in libtermcap; \
-       cd libtermcap || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libtermcap/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libtermcap"; \
+       libsrcdir="$$s/libtermcap"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
@@ -21801,13 +23383,15 @@ configure-libtermcap:
 .PHONY: all-libtermcap maybe-all-libtermcap
 maybe-all-libtermcap:
 @if libtermcap
+TARGET-libtermcap=all
 maybe-all-libtermcap: all-libtermcap
 all-libtermcap: configure-libtermcap
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS)  all)
+       (cd $(HOST_SUBDIR)/libtermcap && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-libtermcap))
 @endif libtermcap
 
 .PHONY: check-libtermcap maybe-check-libtermcap
@@ -21829,7 +23413,8 @@ install-libtermcap: installdirs
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/libtermcap && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
 @endif libtermcap
 
@@ -21851,7 +23436,7 @@ info-libtermcap: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing info in libtermcap" ; \
-       (cd libtermcap && \
+       (cd $(HOST_SUBDIR)/libtermcap && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21877,7 +23462,7 @@ dvi-libtermcap: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing dvi in libtermcap" ; \
-       (cd libtermcap && \
+       (cd $(HOST_SUBDIR)/libtermcap && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21887,6 +23472,32 @@ dvi-libtermcap: \
 
 @endif libtermcap
 
+.PHONY: maybe-html-libtermcap html-libtermcap
+maybe-html-libtermcap:
+@if libtermcap
+maybe-html-libtermcap: html-libtermcap
+
+html-libtermcap: \
+    configure-libtermcap 
+       @[ -f ./libtermcap/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in libtermcap" ; \
+       (cd $(HOST_SUBDIR)/libtermcap && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif libtermcap
+
 .PHONY: maybe-TAGS-libtermcap TAGS-libtermcap
 maybe-TAGS-libtermcap:
 @if libtermcap
@@ -21903,7 +23514,7 @@ TAGS-libtermcap: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing TAGS in libtermcap" ; \
-       (cd libtermcap && \
+       (cd $(HOST_SUBDIR)/libtermcap && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21930,7 +23541,7 @@ install-info-libtermcap: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing install-info in libtermcap" ; \
-       (cd libtermcap && \
+       (cd $(HOST_SUBDIR)/libtermcap && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21956,7 +23567,7 @@ installcheck-libtermcap: \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
        echo "Doing installcheck in libtermcap" ; \
-       (cd libtermcap && \
+       (cd $(HOST_SUBDIR)/libtermcap && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -21996,90 +23607,417 @@ distclean-libtermcap:
 
 @endif libtermcap
 
-.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap
-maybe-maintainer-clean-libtermcap:
-@if libtermcap
-maybe-maintainer-clean-libtermcap: maintainer-clean-libtermcap
+.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap
+maybe-maintainer-clean-libtermcap:
+@if libtermcap
+maybe-maintainer-clean-libtermcap: maintainer-clean-libtermcap
+
+# libtermcap doesn't support maintainer-clean.
+maintainer-clean-libtermcap:
+
+@endif libtermcap
+
+
+.PHONY: configure-utils maybe-configure-utils
+maybe-configure-utils:
+@if utils
+maybe-configure-utils: configure-utils
+configure-utils:
+       @test ! -f $(HOST_SUBDIR)/utils/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/utils ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(HOST_EXPORTS) \
+       echo Configuring in utils; \
+       cd $(HOST_SUBDIR)/utils || exit 1; \
+       case $(srcdir) in \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/utils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+       esac; \
+       srcdiroption="--srcdir=$${topdir}/utils"; \
+       libsrcdir="$$s/utils"; \
+       $(SHELL) $${libsrcdir}/configure \
+         $(HOST_CONFIGARGS) $${srcdiroption}  \
+         || exit 1
+@endif utils
+
+.PHONY: all-utils maybe-all-utils
+maybe-all-utils:
+@if utils
+TARGET-utils=all
+maybe-all-utils: all-utils
+all-utils: configure-utils
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-utils))
+@endif utils
+
+.PHONY: check-utils maybe-check-utils
+maybe-check-utils:
+@if utils
+maybe-check-utils: check-utils
+
+check-utils:
+
+@endif utils
+
+.PHONY: install-utils maybe-install-utils
+maybe-install-utils:
+@if utils
+maybe-install-utils: install-utils
+
+install-utils: installdirs
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
+
+@endif utils
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-utils info-utils
+maybe-info-utils:
+@if utils
+maybe-info-utils: info-utils
+
+info-utils: \
+    configure-utils 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing info in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 info) \
+         || exit 1
+
+@endif utils
+
+.PHONY: maybe-dvi-utils dvi-utils
+maybe-dvi-utils:
+@if utils
+maybe-dvi-utils: dvi-utils
+
+dvi-utils: \
+    configure-utils 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing dvi in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 dvi) \
+         || exit 1
+
+@endif utils
+
+.PHONY: maybe-html-utils html-utils
+maybe-html-utils:
+@if utils
+maybe-html-utils: html-utils
+
+html-utils: \
+    configure-utils 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing html in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif utils
+
+.PHONY: maybe-TAGS-utils TAGS-utils
+maybe-TAGS-utils:
+@if utils
+maybe-TAGS-utils: TAGS-utils
+
+TAGS-utils: \
+    configure-utils 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 TAGS) \
+         || exit 1
+
+@endif utils
+
+.PHONY: maybe-install-info-utils install-info-utils
+maybe-install-info-utils:
+@if utils
+maybe-install-info-utils: install-info-utils
+
+install-info-utils: \
+    configure-utils \
+    info-utils 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing install-info in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 install-info) \
+         || exit 1
+
+@endif utils
+
+.PHONY: maybe-installcheck-utils installcheck-utils
+maybe-installcheck-utils:
+@if utils
+maybe-installcheck-utils: installcheck-utils
+
+installcheck-utils: \
+    configure-utils 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing installcheck in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 installcheck) \
+         || exit 1
+
+@endif utils
+
+.PHONY: maybe-mostlyclean-utils mostlyclean-utils
+maybe-mostlyclean-utils:
+@if utils
+maybe-mostlyclean-utils: mostlyclean-utils
+
+mostlyclean-utils: 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing mostlyclean in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 mostlyclean) \
+         || exit 1
+
+@endif utils
+
+.PHONY: maybe-clean-utils clean-utils
+maybe-clean-utils:
+@if utils
+maybe-clean-utils: clean-utils
+
+clean-utils: 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing clean in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 clean) \
+         || exit 1
+
+@endif utils
+
+.PHONY: maybe-distclean-utils distclean-utils
+maybe-distclean-utils:
+@if utils
+maybe-distclean-utils: distclean-utils
+
+distclean-utils: 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing distclean in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 distclean) \
+         || exit 1
+
+@endif utils
+
+.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils
+maybe-maintainer-clean-utils:
+@if utils
+maybe-maintainer-clean-utils: maintainer-clean-utils
 
-# libtermcap doesn't support maintainer-clean.
-maintainer-clean-libtermcap:
+maintainer-clean-utils: 
+       @[ -f ./utils/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing maintainer-clean in utils" ; \
+       (cd $(HOST_SUBDIR)/utils && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 maintainer-clean) \
+         || exit 1
 
-@endif libtermcap
+@endif utils
 
 
-.PHONY: configure-utils maybe-configure-utils
-maybe-configure-utils:
-@if utils
-maybe-configure-utils: configure-utils
-configure-utils:
-       @test ! -f utils/Makefile || exit 0; \
-       [ -d utils ] || mkdir utils; \
+.PHONY: configure-gnattools maybe-configure-gnattools
+maybe-configure-gnattools:
+@if gnattools
+maybe-configure-gnattools: configure-gnattools
+configure-gnattools:
+       @test ! -f $(HOST_SUBDIR)/gnattools/Makefile || exit 0; \
+       $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gnattools ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(HOST_EXPORTS) \
-       echo Configuring in utils; \
-       cd utils || exit 1; \
+       echo Configuring in gnattools; \
+       cd $(HOST_SUBDIR)/gnattools || 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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gnattools/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gnattools"; \
+       libsrcdir="$$s/gnattools"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption}  \
          || exit 1
-@endif utils
+@endif gnattools
 
-.PHONY: all-utils maybe-all-utils
-maybe-all-utils:
-@if utils
-maybe-all-utils: all-utils
-all-utils: configure-utils
+.PHONY: all-gnattools maybe-all-gnattools
+maybe-all-gnattools:
+@if gnattools
+TARGET-gnattools=all
+maybe-all-gnattools: all-gnattools
+all-gnattools: configure-gnattools
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd utils && $(MAKE) $(FLAGS_TO_PASS)  all)
-@endif utils
+       (cd $(HOST_SUBDIR)/gnattools && \
+         $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-gnattools))
+@endif gnattools
 
-.PHONY: check-utils maybe-check-utils
-maybe-check-utils:
-@if utils
-maybe-check-utils: check-utils
+.PHONY: check-gnattools maybe-check-gnattools
+maybe-check-gnattools:
+@if gnattools
+maybe-check-gnattools: check-gnattools
 
-check-utils:
+check-gnattools:
+       @r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       (cd $(HOST_SUBDIR)/gnattools && \
+         $(MAKE) $(FLAGS_TO_PASS)  check)
 
-@endif utils
+@endif gnattools
 
-.PHONY: install-utils maybe-install-utils
-maybe-install-utils:
-@if utils
-maybe-install-utils: install-utils
+.PHONY: install-gnattools maybe-install-gnattools
+maybe-install-gnattools:
+@if gnattools
+maybe-install-gnattools: install-gnattools
 
-install-utils: installdirs
+install-gnattools: installdirs
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(HOST_EXPORTS) \
-       (cd utils && $(MAKE) $(FLAGS_TO_PASS) install)
+       (cd $(HOST_SUBDIR)/gnattools && \
+         $(MAKE) $(FLAGS_TO_PASS)  install)
 
-@endif utils
+@endif gnattools
 
 # Other targets (info, dvi, etc.)
 
-.PHONY: maybe-info-utils info-utils
-maybe-info-utils:
-@if utils
-maybe-info-utils: info-utils
+.PHONY: maybe-info-gnattools info-gnattools
+maybe-info-gnattools:
+@if gnattools
+maybe-info-gnattools: info-gnattools
 
-info-utils: \
-    configure-utils 
-       @[ -f ./utils/Makefile ] || exit 0; \
+info-gnattools: \
+    configure-gnattools 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -22087,8 +24025,8 @@ info-utils: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing info in utils" ; \
-       (cd utils && \
+       echo "Doing info in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -22096,16 +24034,16 @@ info-utils: \
                  info) \
          || exit 1
 
-@endif utils
+@endif gnattools
 
-.PHONY: maybe-dvi-utils dvi-utils
-maybe-dvi-utils:
-@if utils
-maybe-dvi-utils: dvi-utils
+.PHONY: maybe-dvi-gnattools dvi-gnattools
+maybe-dvi-gnattools:
+@if gnattools
+maybe-dvi-gnattools: dvi-gnattools
 
-dvi-utils: \
-    configure-utils 
-       @[ -f ./utils/Makefile ] || exit 0; \
+dvi-gnattools: \
+    configure-gnattools 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -22113,8 +24051,8 @@ dvi-utils: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing dvi in utils" ; \
-       (cd utils && \
+       echo "Doing dvi in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -22122,16 +24060,16 @@ dvi-utils: \
                  dvi) \
          || exit 1
 
-@endif utils
+@endif gnattools
 
-.PHONY: maybe-TAGS-utils TAGS-utils
-maybe-TAGS-utils:
-@if utils
-maybe-TAGS-utils: TAGS-utils
+.PHONY: maybe-html-gnattools html-gnattools
+maybe-html-gnattools:
+@if gnattools
+maybe-html-gnattools: html-gnattools
 
-TAGS-utils: \
-    configure-utils 
-       @[ -f ./utils/Makefile ] || exit 0; \
+html-gnattools: \
+    configure-gnattools 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -22139,8 +24077,34 @@ TAGS-utils: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing TAGS in utils" ; \
-       (cd utils && \
+       echo "Doing html in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                 html) \
+         || exit 1
+
+@endif gnattools
+
+.PHONY: maybe-TAGS-gnattools TAGS-gnattools
+maybe-TAGS-gnattools:
+@if gnattools
+maybe-TAGS-gnattools: TAGS-gnattools
+
+TAGS-gnattools: \
+    configure-gnattools 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(HOST_EXPORTS) \
+       for flag in $(EXTRA_HOST_FLAGS) ; do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       echo "Doing TAGS in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -22148,17 +24112,17 @@ TAGS-utils: \
                  TAGS) \
          || exit 1
 
-@endif utils
+@endif gnattools
 
-.PHONY: maybe-install-info-utils install-info-utils
-maybe-install-info-utils:
-@if utils
-maybe-install-info-utils: install-info-utils
+.PHONY: maybe-install-info-gnattools install-info-gnattools
+maybe-install-info-gnattools:
+@if gnattools
+maybe-install-info-gnattools: install-info-gnattools
 
-install-info-utils: \
-    configure-utils \
-    info-utils 
-       @[ -f ./utils/Makefile ] || exit 0; \
+install-info-gnattools: \
+    configure-gnattools \
+    info-gnattools 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -22166,8 +24130,8 @@ install-info-utils: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing install-info in utils" ; \
-       (cd utils && \
+       echo "Doing install-info in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -22175,16 +24139,16 @@ install-info-utils: \
                  install-info) \
          || exit 1
 
-@endif utils
+@endif gnattools
 
-.PHONY: maybe-installcheck-utils installcheck-utils
-maybe-installcheck-utils:
-@if utils
-maybe-installcheck-utils: installcheck-utils
+.PHONY: maybe-installcheck-gnattools installcheck-gnattools
+maybe-installcheck-gnattools:
+@if gnattools
+maybe-installcheck-gnattools: installcheck-gnattools
 
-installcheck-utils: \
-    configure-utils 
-       @[ -f ./utils/Makefile ] || exit 0; \
+installcheck-gnattools: \
+    configure-gnattools 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -22192,8 +24156,8 @@ installcheck-utils: \
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing installcheck in utils" ; \
-       (cd utils && \
+       echo "Doing installcheck in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -22201,15 +24165,15 @@ installcheck-utils: \
                  installcheck) \
          || exit 1
 
-@endif utils
+@endif gnattools
 
-.PHONY: maybe-mostlyclean-utils mostlyclean-utils
-maybe-mostlyclean-utils:
-@if utils
-maybe-mostlyclean-utils: mostlyclean-utils
+.PHONY: maybe-mostlyclean-gnattools mostlyclean-gnattools
+maybe-mostlyclean-gnattools:
+@if gnattools
+maybe-mostlyclean-gnattools: mostlyclean-gnattools
 
-mostlyclean-utils: 
-       @[ -f ./utils/Makefile ] || exit 0; \
+mostlyclean-gnattools: 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -22217,8 +24181,8 @@ mostlyclean-utils:
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing mostlyclean in utils" ; \
-       (cd utils && \
+       echo "Doing mostlyclean in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -22226,15 +24190,15 @@ mostlyclean-utils:
                  mostlyclean) \
          || exit 1
 
-@endif utils
+@endif gnattools
 
-.PHONY: maybe-clean-utils clean-utils
-maybe-clean-utils:
-@if utils
-maybe-clean-utils: clean-utils
+.PHONY: maybe-clean-gnattools clean-gnattools
+maybe-clean-gnattools:
+@if gnattools
+maybe-clean-gnattools: clean-gnattools
 
-clean-utils: 
-       @[ -f ./utils/Makefile ] || exit 0; \
+clean-gnattools: 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -22242,8 +24206,8 @@ clean-utils:
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing clean in utils" ; \
-       (cd utils && \
+       echo "Doing clean in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -22251,15 +24215,15 @@ clean-utils:
                  clean) \
          || exit 1
 
-@endif utils
+@endif gnattools
 
-.PHONY: maybe-distclean-utils distclean-utils
-maybe-distclean-utils:
-@if utils
-maybe-distclean-utils: distclean-utils
+.PHONY: maybe-distclean-gnattools distclean-gnattools
+maybe-distclean-gnattools:
+@if gnattools
+maybe-distclean-gnattools: distclean-gnattools
 
-distclean-utils: 
-       @[ -f ./utils/Makefile ] || exit 0; \
+distclean-gnattools: 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -22267,8 +24231,8 @@ distclean-utils:
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing distclean in utils" ; \
-       (cd utils && \
+       echo "Doing distclean in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -22276,15 +24240,15 @@ distclean-utils:
                  distclean) \
          || exit 1
 
-@endif utils
+@endif gnattools
 
-.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils
-maybe-maintainer-clean-utils:
-@if utils
-maybe-maintainer-clean-utils: maintainer-clean-utils
+.PHONY: maybe-maintainer-clean-gnattools maintainer-clean-gnattools
+maybe-maintainer-clean-gnattools:
+@if gnattools
+maybe-maintainer-clean-gnattools: maintainer-clean-gnattools
 
-maintainer-clean-utils: 
-       @[ -f ./utils/Makefile ] || exit 0; \
+maintainer-clean-gnattools: 
+       @[ -f ./gnattools/Makefile ] || exit 0; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
@@ -22292,8 +24256,8 @@ maintainer-clean-utils:
        for flag in $(EXTRA_HOST_FLAGS) ; do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
-       echo "Doing maintainer-clean in utils" ; \
-       (cd utils && \
+       echo "Doing maintainer-clean in gnattools" ; \
+       (cd $(HOST_SUBDIR)/gnattools && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
@@ -22301,7 +24265,7 @@ maintainer-clean-utils:
                  maintainer-clean) \
          || exit 1
 
-@endif utils
+@endif gnattools
 
 
 
@@ -22330,16 +24294,12 @@ configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \
        cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
-         libsrcdir="$$s/libstdc++-v3"; \
+       srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
+       libsrcdir="$$s/libstdc++-v3"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -22445,6 +24405,32 @@ dvi-target-libstdc++-v3: \
 
 @endif target-libstdc++-v3
 
+.PHONY: maybe-html-target-libstdc++-v3 html-target-libstdc++-v3
+maybe-html-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-html-target-libstdc++-v3: html-target-libstdc++-v3
+
+html-target-libstdc++-v3: \
+    configure-target-libstdc++-v3 
+       @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(RAW_CXX_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-libstdc++-v3
+
 .PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3
 maybe-TAGS-target-libstdc++-v3:
 @if target-libstdc++-v3
@@ -22646,16 +24632,12 @@ configure-target-libmudflap: $(TARGET_SUBDIR)/libmudflap/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libmudflap; \
        cd "$(TARGET_SUBDIR)/libmudflap" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libmudflap/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/libmudflap"; \
-         libsrcdir="$$s/libmudflap"; \
+       srcdiroption="--srcdir=$${topdir}/libmudflap"; \
+       libsrcdir="$$s/libmudflap"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -22761,6 +24743,32 @@ dvi-target-libmudflap: \
 
 @endif target-libmudflap
 
+.PHONY: maybe-html-target-libmudflap html-target-libmudflap
+maybe-html-target-libmudflap:
+@if target-libmudflap
+maybe-html-target-libmudflap: html-target-libmudflap
+
+html-target-libmudflap: \
+    configure-target-libmudflap 
+       @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/libmudflap" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libmudflap && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-libmudflap
+
 .PHONY: maybe-TAGS-target-libmudflap TAGS-target-libmudflap
 maybe-TAGS-target-libmudflap:
 @if target-libmudflap
@@ -22962,16 +24970,12 @@ configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/newlib; \
        cd "$(TARGET_SUBDIR)/newlib" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/newlib/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/newlib"; \
-         libsrcdir="$$s/newlib"; \
+       srcdiroption="--srcdir=$${topdir}/newlib"; \
+       libsrcdir="$$s/newlib"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -23077,6 +25081,32 @@ dvi-target-newlib: \
 
 @endif target-newlib
 
+.PHONY: maybe-html-target-newlib html-target-newlib
+maybe-html-target-newlib:
+@if target-newlib
+maybe-html-target-newlib: html-target-newlib
+
+html-target-newlib: \
+    configure-target-newlib 
+       @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/newlib" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/newlib && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-newlib
+
 .PHONY: maybe-TAGS-target-newlib TAGS-target-newlib
 maybe-TAGS-target-newlib:
 @if target-newlib
@@ -23278,16 +25308,12 @@ configure-target-libgfortran: $(TARGET_SUBDIR)/libgfortran/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libgfortran; \
        cd "$(TARGET_SUBDIR)/libgfortran" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libgfortran/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/libgfortran"; \
-         libsrcdir="$$s/libgfortran"; \
+       srcdiroption="--srcdir=$${topdir}/libgfortran"; \
+       libsrcdir="$$s/libgfortran"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -23393,6 +25419,32 @@ dvi-target-libgfortran: \
 
 @endif target-libgfortran
 
+.PHONY: maybe-html-target-libgfortran html-target-libgfortran
+maybe-html-target-libgfortran:
+@if target-libgfortran
+maybe-html-target-libgfortran: html-target-libgfortran
+
+html-target-libgfortran: \
+    configure-target-libgfortran 
+       @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/libgfortran" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libgfortran && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-libgfortran
+
 .PHONY: maybe-TAGS-target-libgfortran TAGS-target-libgfortran
 maybe-TAGS-target-libgfortran:
 @if target-libgfortran
@@ -23594,16 +25646,12 @@ configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libobjc; \
        cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libobjc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/libobjc"; \
-         libsrcdir="$$s/libobjc"; \
+       srcdiroption="--srcdir=$${topdir}/libobjc"; \
+       libsrcdir="$$s/libobjc"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -23683,19 +25731,45 @@ info-target-libobjc: \
 
 @endif target-libobjc
 
-.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc
-maybe-dvi-target-libobjc:
+.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc
+maybe-dvi-target-libobjc:
+@if target-libobjc
+maybe-dvi-target-libobjc: dvi-target-libobjc
+
+dvi-target-libobjc: \
+    configure-target-libobjc 
+       @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libobjc && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  dvi) \
+         || exit 1
+
+@endif target-libobjc
+
+.PHONY: maybe-html-target-libobjc html-target-libobjc
+maybe-html-target-libobjc:
 @if target-libobjc
-maybe-dvi-target-libobjc: dvi-target-libobjc
+maybe-html-target-libobjc: html-target-libobjc
 
-dvi-target-libobjc: \
+html-target-libobjc: \
     configure-target-libobjc 
        @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(NORMAL_TARGET_EXPORTS) \
-       echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \
+       echo "Doing html in $(TARGET_SUBDIR)/libobjc" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
@@ -23704,7 +25778,7 @@ dvi-target-libobjc: \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                  dvi) \
+                  html) \
          || exit 1
 
 @endif target-libobjc
@@ -23910,38 +25984,12 @@ configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libtermcap; \
        cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libtermcap/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       if [ "$(srcdir)" = "." ] ; then \
-         if [ "$(TARGET_SUBDIR)" != "." ] ; then \
-           if $(SHELL) $$s/symlink-tree $${topdir}/libtermcap "no-such-file" ; then \
-             if [ -f Makefile ]; then \
-               if $(MAKE) distclean; then \
-                 true; \
-               else \
-                 exit 1; \
-               fi; \
-             else \
-               true; \
-             fi; \
-           else \
-             exit 1; \
-           fi; \
-         else \
-           true; \
-         fi; \
-         srcdiroption="--srcdir=."; \
-         libsrcdir="."; \
-       else \
-         srcdiroption="--srcdir=$${topdir}/libtermcap"; \
-         libsrcdir="$$s/libtermcap"; \
-       fi; \
+       srcdiroption="--srcdir=$${topdir}/libtermcap"; \
+       libsrcdir="$$s/libtermcap"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -24042,6 +26090,32 @@ dvi-target-libtermcap: \
 
 @endif target-libtermcap
 
+.PHONY: maybe-html-target-libtermcap html-target-libtermcap
+maybe-html-target-libtermcap:
+@if target-libtermcap
+maybe-html-target-libtermcap: html-target-libtermcap
+
+html-target-libtermcap: \
+    configure-target-libtermcap 
+       @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/libtermcap" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libtermcap && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-libtermcap
+
 .PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap
 maybe-TAGS-target-libtermcap:
 @if target-libtermcap
@@ -24183,16 +26257,12 @@ configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/winsup; \
        cd "$(TARGET_SUBDIR)/winsup" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/winsup/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/winsup"; \
-         libsrcdir="$$s/winsup"; \
+       srcdiroption="--srcdir=$${topdir}/winsup"; \
+       libsrcdir="$$s/winsup"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -24298,6 +26368,32 @@ dvi-target-winsup: \
 
 @endif target-winsup
 
+.PHONY: maybe-html-target-winsup html-target-winsup
+maybe-html-target-winsup:
+@if target-winsup
+maybe-html-target-winsup: html-target-winsup
+
+html-target-winsup: \
+    configure-target-winsup 
+       @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/winsup" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/winsup && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-winsup
+
 .PHONY: maybe-TAGS-target-winsup TAGS-target-winsup
 maybe-TAGS-target-winsup:
 @if target-winsup
@@ -24499,16 +26595,12 @@ configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libgloss; \
        cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libgloss/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/libgloss"; \
-         libsrcdir="$$s/libgloss"; \
+       srcdiroption="--srcdir=$${topdir}/libgloss"; \
+       libsrcdir="$$s/libgloss"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -24609,6 +26701,32 @@ dvi-target-libgloss: \
 
 @endif target-libgloss
 
+.PHONY: maybe-html-target-libgloss html-target-libgloss
+maybe-html-target-libgloss:
+@if target-libgloss
+maybe-html-target-libgloss: html-target-libgloss
+
+html-target-libgloss: \
+    configure-target-libgloss 
+       @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/libgloss" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libgloss && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-libgloss
+
 .PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss
 maybe-TAGS-target-libgloss:
 @if target-libgloss
@@ -24810,16 +26928,12 @@ configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libiberty; \
        cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libiberty/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/libiberty"; \
-         libsrcdir="$$s/libiberty"; \
+       srcdiroption="--srcdir=$${topdir}/libiberty"; \
+       libsrcdir="$$s/libiberty"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -24925,6 +27039,32 @@ dvi-target-libiberty: \
 
 @endif target-libiberty
 
+.PHONY: maybe-html-target-libiberty html-target-libiberty
+maybe-html-target-libiberty:
+@if target-libiberty
+maybe-html-target-libiberty: html-target-libiberty
+
+html-target-libiberty: \
+    configure-target-libiberty 
+       @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/libiberty" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libiberty && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-libiberty
+
 .PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty
 maybe-TAGS-target-libiberty:
 @if target-libiberty
@@ -25126,16 +27266,12 @@ configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/gperf; \
        cd "$(TARGET_SUBDIR)/gperf" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/gperf/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/gperf"; \
-         libsrcdir="$$s/gperf"; \
+       srcdiroption="--srcdir=$${topdir}/gperf"; \
+       libsrcdir="$$s/gperf"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -25241,6 +27377,32 @@ dvi-target-gperf: \
 
 @endif target-gperf
 
+.PHONY: maybe-html-target-gperf html-target-gperf
+maybe-html-target-gperf:
+@if target-gperf
+maybe-html-target-gperf: html-target-gperf
+
+html-target-gperf: \
+    configure-target-gperf 
+       @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/gperf" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/gperf && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-gperf
+
 .PHONY: maybe-TAGS-target-gperf TAGS-target-gperf
 maybe-TAGS-target-gperf:
 @if target-gperf
@@ -25442,16 +27604,12 @@ configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/examples; \
        cd "$(TARGET_SUBDIR)/examples" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/examples/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/examples"; \
-         libsrcdir="$$s/examples"; \
+       srcdiroption="--srcdir=$${topdir}/examples"; \
+       libsrcdir="$$s/examples"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -25547,6 +27705,32 @@ dvi-target-examples: \
 
 @endif target-examples
 
+.PHONY: maybe-html-target-examples html-target-examples
+maybe-html-target-examples:
+@if target-examples
+maybe-html-target-examples: html-target-examples
+
+html-target-examples: \
+    configure-target-examples 
+       @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/examples" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/examples && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-examples
+
 .PHONY: maybe-TAGS-target-examples TAGS-target-examples
 maybe-TAGS-target-examples:
 @if target-examples
@@ -25748,16 +27932,12 @@ configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libffi; \
        cd "$(TARGET_SUBDIR)/libffi" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libffi/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/libffi"; \
-         libsrcdir="$$s/libffi"; \
+       srcdiroption="--srcdir=$${topdir}/libffi"; \
+       libsrcdir="$$s/libffi"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -25863,6 +28043,32 @@ dvi-target-libffi: \
 
 @endif target-libffi
 
+.PHONY: maybe-html-target-libffi html-target-libffi
+maybe-html-target-libffi:
+@if target-libffi
+maybe-html-target-libffi: html-target-libffi
+
+html-target-libffi: \
+    configure-target-libffi 
+       @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/libffi" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libffi && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-libffi
+
 .PHONY: maybe-TAGS-target-libffi TAGS-target-libffi
 maybe-TAGS-target-libffi:
 @if target-libffi
@@ -26064,16 +28270,12 @@ configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libjava; \
        cd "$(TARGET_SUBDIR)/libjava" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libjava/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/libjava"; \
-         libsrcdir="$$s/libjava"; \
+       srcdiroption="--srcdir=$${topdir}/libjava"; \
+       libsrcdir="$$s/libjava"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -26179,6 +28381,32 @@ dvi-target-libjava: \
 
 @endif target-libjava
 
+.PHONY: maybe-html-target-libjava html-target-libjava
+maybe-html-target-libjava:
+@if target-libjava
+maybe-html-target-libjava: html-target-libjava
+
+html-target-libjava: \
+    configure-target-libjava 
+       @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(RAW_CXX_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/libjava" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libjava && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-libjava
+
 .PHONY: maybe-TAGS-target-libjava TAGS-target-libjava
 maybe-TAGS-target-libjava:
 @if target-libjava
@@ -26380,38 +28608,12 @@ configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/zlib; \
        cd "$(TARGET_SUBDIR)/zlib" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-       if [ "$(srcdir)" = "." ] ; then \
-         if [ "$(TARGET_SUBDIR)" != "." ] ; then \
-           if $(SHELL) $$s/symlink-tree $${topdir}/zlib "no-such-file" ; then \
-             if [ -f Makefile ]; then \
-               if $(MAKE) distclean; then \
-                 true; \
-               else \
-                 exit 1; \
-               fi; \
-             else \
-               true; \
-             fi; \
-           else \
-             exit 1; \
-           fi; \
-         else \
-           true; \
-         fi; \
-         srcdiroption="--srcdir=."; \
-         libsrcdir="."; \
-       else \
-         srcdiroption="--srcdir=$${topdir}/zlib"; \
-         libsrcdir="$$s/zlib"; \
-       fi; \
+       srcdiroption="--srcdir=$${topdir}/zlib"; \
+       libsrcdir="$$s/zlib"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -26517,6 +28719,32 @@ dvi-target-zlib: \
 
 @endif target-zlib
 
+.PHONY: maybe-html-target-zlib html-target-zlib
+maybe-html-target-zlib:
+@if target-zlib
+maybe-html-target-zlib: html-target-zlib
+
+html-target-zlib: \
+    configure-target-zlib 
+       @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/zlib" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/zlib && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-zlib
+
 .PHONY: maybe-TAGS-target-zlib TAGS-target-zlib
 maybe-TAGS-target-zlib:
 @if target-zlib
@@ -26718,16 +28946,12 @@ configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \
        cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/boehm-gc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/boehm-gc"; \
-         libsrcdir="$$s/boehm-gc"; \
+       srcdiroption="--srcdir=$${topdir}/boehm-gc"; \
+       libsrcdir="$$s/boehm-gc"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -26833,6 +29057,32 @@ dvi-target-boehm-gc: \
 
 @endif target-boehm-gc
 
+.PHONY: maybe-html-target-boehm-gc html-target-boehm-gc
+maybe-html-target-boehm-gc:
+@if target-boehm-gc
+maybe-html-target-boehm-gc: html-target-boehm-gc
+
+html-target-boehm-gc: \
+    configure-target-boehm-gc 
+       @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/boehm-gc" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/boehm-gc && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-boehm-gc
+
 .PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc
 maybe-TAGS-target-boehm-gc:
 @if target-boehm-gc
@@ -27034,16 +29284,12 @@ configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/qthreads; \
        cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/qthreads/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/qthreads"; \
-         libsrcdir="$$s/qthreads"; \
+       srcdiroption="--srcdir=$${topdir}/qthreads"; \
+       libsrcdir="$$s/qthreads"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -27149,6 +29395,32 @@ dvi-target-qthreads: \
 
 @endif target-qthreads
 
+.PHONY: maybe-html-target-qthreads html-target-qthreads
+maybe-html-target-qthreads:
+@if target-qthreads
+maybe-html-target-qthreads: html-target-qthreads
+
+html-target-qthreads: \
+    configure-target-qthreads 
+       @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/qthreads" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/qthreads && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-qthreads
+
 .PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads
 maybe-TAGS-target-qthreads:
 @if target-qthreads
@@ -27350,16 +29622,12 @@ configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/rda; \
        cd "$(TARGET_SUBDIR)/rda" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/rda/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/rda"; \
-         libsrcdir="$$s/rda"; \
+       srcdiroption="--srcdir=$${topdir}/rda"; \
+       libsrcdir="$$s/rda"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -27425,7 +29693,33 @@ info-target-rda: \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(NORMAL_TARGET_EXPORTS) \
-       echo "Doing info in $(TARGET_SUBDIR)/rda" ; \
+       echo "Doing info in $(TARGET_SUBDIR)/rda" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/rda && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  info) \
+         || exit 1
+
+@endif target-rda
+
+.PHONY: maybe-dvi-target-rda dvi-target-rda
+maybe-dvi-target-rda:
+@if target-rda
+maybe-dvi-target-rda: dvi-target-rda
+
+dvi-target-rda: \
+    configure-target-rda 
+       @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
@@ -27434,24 +29728,24 @@ info-target-rda: \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                  info) \
+                  dvi) \
          || exit 1
 
 @endif target-rda
 
-.PHONY: maybe-dvi-target-rda dvi-target-rda
-maybe-dvi-target-rda:
+.PHONY: maybe-html-target-rda html-target-rda
+maybe-html-target-rda:
 @if target-rda
-maybe-dvi-target-rda: dvi-target-rda
+maybe-html-target-rda: html-target-rda
 
-dvi-target-rda: \
+html-target-rda: \
     configure-target-rda 
        @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        $(SET_LIB_PATH) \
        $(NORMAL_TARGET_EXPORTS) \
-       echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \
+       echo "Doing html in $(TARGET_SUBDIR)/rda" ; \
        for flag in $(EXTRA_TARGET_FLAGS); do \
          eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
        done; \
@@ -27460,7 +29754,7 @@ dvi-target-rda: \
                  "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
                  "RANLIB=$${RANLIB}" \
                  "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
-                  dvi) \
+                  html) \
          || exit 1
 
 @endif target-rda
@@ -27666,16 +29960,12 @@ configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out
        echo Configuring in $(TARGET_SUBDIR)/libada; \
        cd "$(TARGET_SUBDIR)/libada" || exit 1; \
        case $(srcdir) in \
-         /* | [A-Za-z]:[\\/]*) \
-           topdir=$(srcdir) ;; \
-         *) \
-           case "$(TARGET_SUBDIR)" in \
-             .) topdir="../$(srcdir)" ;; \
-             *) topdir="../../$(srcdir)" ;; \
-           esac ;; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(TARGET_SUBDIR)/libada/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
-         srcdiroption="--srcdir=$${topdir}/libada"; \
-         libsrcdir="$$s/libada"; \
+       srcdiroption="--srcdir=$${topdir}/libada"; \
+       libsrcdir="$$s/libada"; \
        rm -f no-such-file || : ; \
        CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
          $(TARGET_CONFIGARGS) $${srcdiroption} \
@@ -27781,6 +30071,32 @@ dvi-target-libada: \
 
 @endif target-libada
 
+.PHONY: maybe-html-target-libada html-target-libada
+maybe-html-target-libada:
+@if target-libada
+maybe-html-target-libada: html-target-libada
+
+html-target-libada: \
+    configure-target-libada 
+       @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+       r=`${PWD_COMMAND}`; export r; \
+       s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+       $(SET_LIB_PATH) \
+       $(NORMAL_TARGET_EXPORTS) \
+       echo "Doing html in $(TARGET_SUBDIR)/libada" ; \
+       for flag in $(EXTRA_TARGET_FLAGS); do \
+         eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+       done; \
+       (cd $(TARGET_SUBDIR)/libada && \
+         $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+                 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+                 "RANLIB=$${RANLIB}" \
+                 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+                  html) \
+         || exit 1
+
+@endif target-libada
+
 .PHONY: maybe-TAGS-target-libada TAGS-target-libada
 maybe-TAGS-target-libada:
 @if target-libada
@@ -28119,7 +30435,9 @@ stage:
 # (both in a combined tree, or separately).  This however requires some
 # change to the gcc driver, again in order to avoid comparison failures.
 
-# Bugs: This is almost certainly not parallel-make safe.
+# Bugs: This is crippled when doing parallel make, the `make all-host'
+# and `make all-target' phases can be parallelized.
+
 
 # 'touch' doesn't work right on some platforms.
 STAMP = echo timestamp > 
@@ -28137,7 +30455,6 @@ STAGE1_LANGUAGES=@stage1_languages@
 objext = .o
 
 # Flags to pass to stage2 and later makes.
-BOOT_CFLAGS= -g -O2
 POSTSTAGE1_FLAGS_TO_PASS = \
        CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
        STAGE_PREFIX=$$r/stage-gcc/ \
@@ -28157,88 +30474,112 @@ POSTSTAGE1_FLAGS_TO_PASS = \
 .PHONY: stage1-start stage1-end
 
 stage1-start::
-       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+       @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
        echo stage1 > stage_current ; \
-       echo stage1 > stage_last
+       echo stage1 > stage_last; \
+       $(mkinstalldirs) $(HOST_SUBDIR)
 @if bfd
-       [ -d stage1-bfd ] || mkdir stage1-bfd; \
-       set stage1-bfd bfd ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-bfd ] || \
+         mkdir stage1-bfd; \
+       set stage1-bfd bfd ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       [ -d stage1-opcodes ] || mkdir stage1-opcodes; \
-       set stage1-opcodes opcodes ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-opcodes ] || \
+         mkdir stage1-opcodes; \
+       set stage1-opcodes opcodes ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       [ -d stage1-binutils ] || mkdir stage1-binutils; \
-       set stage1-binutils binutils ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-binutils ] || \
+         mkdir stage1-binutils; \
+       set stage1-binutils binutils ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       [ -d stage1-gas ] || mkdir stage1-gas; \
-       set stage1-gas gas ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-gas ] || \
+         mkdir stage1-gas; \
+       set stage1-gas gas ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       [ -d stage1-gcc ] || mkdir stage1-gcc; \
-       set stage1-gcc gcc ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-gcc ] || \
+         mkdir stage1-gcc; \
+       set stage1-gcc gcc ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       [ -d stage1-intl ] || mkdir stage1-intl; \
-       set stage1-intl intl ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-intl ] || \
+         mkdir stage1-intl; \
+       set stage1-intl intl ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       [ -d stage1-ld ] || mkdir stage1-ld; \
-       set stage1-ld ld ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-ld ] || \
+         mkdir stage1-ld; \
+       set stage1-ld ld ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       [ -d stage1-libcpp ] || mkdir stage1-libcpp; \
-       set stage1-libcpp libcpp ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-libcpp ] || \
+         mkdir stage1-libcpp; \
+       set stage1-libcpp libcpp ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       [ -d stage1-libbanshee ] || mkdir stage1-libbanshee; \
-       set stage1-libbanshee libbanshee ; @CREATE_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       [ -d stage1-libiberty ] || mkdir stage1-libiberty; \
-       set stage1-libiberty libiberty ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-libiberty ] || \
+         mkdir stage1-libiberty; \
+       set stage1-libiberty libiberty ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       [ -d stage1-zlib ] || mkdir stage1-zlib; \
-       set stage1-zlib zlib ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage1-zlib ] || \
+         mkdir stage1-zlib; \
+       set stage1-zlib zlib ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif zlib
 
 stage1-end::
-       rm -f stage_current
+       @rm -f stage_current
 @if bfd
-       set bfd stage1-bfd ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set bfd stage1-bfd ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       set opcodes stage1-opcodes ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set opcodes stage1-opcodes ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       set binutils stage1-binutils ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set binutils stage1-binutils ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       set gas stage1-gas ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gas stage1-gas ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       set gcc stage1-gcc ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gcc stage1-gcc ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       set intl stage1-intl ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set intl stage1-intl ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       set ld stage1-ld ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set ld stage1-ld ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       set libcpp stage1-libcpp ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libcpp stage1-libcpp ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       set libbanshee stage1-libbanshee ; @UNDO_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       set libiberty stage1-libiberty ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libiberty stage1-libiberty ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       set zlib stage1-zlib ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set zlib stage1-zlib ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif zlib
 
 # Bubble a bugfix through all the stages up to stage 1.  They
@@ -28246,534 +30587,540 @@ stage1-end::
 # be reconfigured as well.
 .PHONY: stage1-bubble
 stage1-bubble:: 
-       @case `echo all-stage1-*` in \
-         'all-stage1-*') ;; \
-         *) echo Remaking stage 1 ; rm -f all-stage1-* ;; \
-       esac ; \
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage1
+       @if test -f stage1-lean  ; then \
+         echo Skipping rebuild of stage1 ; \
+       else \
+         $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage1; \
+       fi
 
-.PHONY: all-stage1
+.PHONY: all-stage1 clean-stage1
 all-stage1:     \
   maybe-all-stage1-bfd \
   maybe-all-stage1-opcodes \
-  maybe-all-stage1-binutils             \
+  maybe-all-stage1-binutils              \
   maybe-all-stage1-gas \
   maybe-all-stage1-gcc        \
   maybe-all-stage1-intl   \
   maybe-all-stage1-ld \
   maybe-all-stage1-libcpp  \
-  maybe-all-stage1-libbanshee \
   maybe-all-stage1-libiberty                        \
-  maybe-all-stage1-zlib       
-
+  maybe-all-stage1-zlib        
+
+do-clean: clean-stage1
+clean-stage1:     \
+  maybe-clean-stage1-bfd \
+  maybe-clean-stage1-opcodes \
+  maybe-clean-stage1-binutils              \
+  maybe-clean-stage1-gas \
+  maybe-clean-stage1-gcc        \
+  maybe-clean-stage1-intl   \
+  maybe-clean-stage1-ld \
+  maybe-clean-stage1-libcpp  \
+  maybe-clean-stage1-libiberty                        \
+  maybe-clean-stage1-zlib        
+
+
+.PHONY: configure-stage1-bfd maybe-configure-stage1-bfd
+.PHONY: all-stage1-bfd maybe-all-stage1-bfd
+.PHONY: clean-stage1-bfd maybe-clean-stage1-bfd
 
 maybe-configure-stage1-bfd:
 maybe-all-stage1-bfd:
+maybe-clean-stage1-bfd:
 
 @if bfd-bootstrap
 maybe-configure-stage1-bfd: configure-stage1-bfd
-configure-stage1-bfd: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-bfd/Makefile ] ; then \
-         $(STAMP) configure-stage1-bfd ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-bfd:
+       @$(MAKE) stage1-start
+       @[ -f bfd/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in bfd ; \
-       cd bfd || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bfd"; \
+       libsrcdir="$$s/bfd"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-bfd
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-bfd: all-stage1-bfd
 all-stage1-bfd: configure-stage1-bfd
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd bfd && \
+       cd $(HOST_SUBDIR)/bfd && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-bfd
+               CFLAGS="$(STAGE1_CFLAGS)" 
+
+maybe-clean-stage1-bfd: clean-stage1-bfd
+clean-stage1-bfd:
+       @[ -f bfd/Makefile ] || [ -f stage1-bfd/Makefile ] \
+         || exit 0 ; \
+       [ -f bfd/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/bfd && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)"  clean
 @endif bfd-bootstrap
 
+
+.PHONY: configure-stage1-opcodes maybe-configure-stage1-opcodes
+.PHONY: all-stage1-opcodes maybe-all-stage1-opcodes
+.PHONY: clean-stage1-opcodes maybe-clean-stage1-opcodes
+
 maybe-configure-stage1-opcodes:
 maybe-all-stage1-opcodes:
+maybe-clean-stage1-opcodes:
 
 @if opcodes-bootstrap
 maybe-configure-stage1-opcodes: configure-stage1-opcodes
-configure-stage1-opcodes: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-opcodes/Makefile ] ; then \
-         $(STAMP) configure-stage1-opcodes ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-opcodes:
+       @$(MAKE) stage1-start
+       @[ -f opcodes/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in opcodes ; \
-       cd opcodes || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/opcodes"; \
+       libsrcdir="$$s/opcodes"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-opcodes
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-opcodes: all-stage1-opcodes
 all-stage1-opcodes: configure-stage1-opcodes
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd opcodes && \
+       cd $(HOST_SUBDIR)/opcodes && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)" 
+
+maybe-clean-stage1-opcodes: clean-stage1-opcodes
+clean-stage1-opcodes:
+       @[ -f opcodes/Makefile ] || [ -f stage1-opcodes/Makefile ] \
+         || exit 0 ; \
+       [ -f opcodes/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/opcodes && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-opcodes
+               CFLAGS="$(STAGE1_CFLAGS)"  clean
 @endif opcodes-bootstrap
 
+
+.PHONY: configure-stage1-binutils maybe-configure-stage1-binutils
+.PHONY: all-stage1-binutils maybe-all-stage1-binutils
+.PHONY: clean-stage1-binutils maybe-clean-stage1-binutils
+
 maybe-configure-stage1-binutils:
 maybe-all-stage1-binutils:
+maybe-clean-stage1-binutils:
 
 @if binutils-bootstrap
 maybe-configure-stage1-binutils: configure-stage1-binutils
-configure-stage1-binutils: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-binutils/Makefile ] ; then \
-         $(STAMP) configure-stage1-binutils ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-binutils:
+       @$(MAKE) stage1-start
+       @[ -f binutils/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in binutils ; \
-       cd binutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/binutils"; \
+       libsrcdir="$$s/binutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-binutils
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-binutils: all-stage1-binutils
 all-stage1-binutils: configure-stage1-binutils
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd binutils && \
+       cd $(HOST_SUBDIR)/binutils && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-binutils
+               CFLAGS="$(STAGE1_CFLAGS)" 
+
+maybe-clean-stage1-binutils: clean-stage1-binutils
+clean-stage1-binutils:
+       @[ -f binutils/Makefile ] || [ -f stage1-binutils/Makefile ] \
+         || exit 0 ; \
+       [ -f binutils/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/binutils && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)"  clean
 @endif binutils-bootstrap
 
+
+.PHONY: configure-stage1-gas maybe-configure-stage1-gas
+.PHONY: all-stage1-gas maybe-all-stage1-gas
+.PHONY: clean-stage1-gas maybe-clean-stage1-gas
+
 maybe-configure-stage1-gas:
 maybe-all-stage1-gas:
+maybe-clean-stage1-gas:
 
 @if gas-bootstrap
 maybe-configure-stage1-gas: configure-stage1-gas
-configure-stage1-gas: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-gas/Makefile ] ; then \
-         $(STAMP) configure-stage1-gas ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-gas:
+       @$(MAKE) stage1-start
+       @[ -f gas/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in gas ; \
-       cd gas || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gas"; \
+       libsrcdir="$$s/gas"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-gas
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-gas: all-stage1-gas
 all-stage1-gas: configure-stage1-gas
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd gas && \
+       cd $(HOST_SUBDIR)/gas && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)" 
+
+maybe-clean-stage1-gas: clean-stage1-gas
+clean-stage1-gas:
+       @[ -f gas/Makefile ] || [ -f stage1-gas/Makefile ] \
+         || exit 0 ; \
+       [ -f gas/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/gas && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-gas
+               CFLAGS="$(STAGE1_CFLAGS)"  clean
 @endif gas-bootstrap
 
+
+.PHONY: configure-stage1-gcc maybe-configure-stage1-gcc
+.PHONY: all-stage1-gcc maybe-all-stage1-gcc
+.PHONY: clean-stage1-gcc maybe-clean-stage1-gcc
+
 maybe-configure-stage1-gcc:
 maybe-all-stage1-gcc:
+maybe-clean-stage1-gcc:
 
 @if gcc-bootstrap
 maybe-configure-stage1-gcc: configure-stage1-gcc
-configure-stage1-gcc: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-gcc/Makefile ] ; then \
-         $(STAMP) configure-stage1-gcc ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-gcc:
+       @$(MAKE) stage1-start
+       @[ -f gcc/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in gcc ; \
-       cd gcc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gcc"; \
+       libsrcdir="$$s/gcc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-gcc
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-gcc: all-stage1-gcc
 all-stage1-gcc: configure-stage1-gcc
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd gcc && \
+       cd $(HOST_SUBDIR)/gcc && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) && \
-       $(STAMP) ../all-stage1-gcc
+               CFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stage1-gcc: clean-stage1-gcc
+clean-stage1-gcc:
+       @[ -f gcc/Makefile ] || [ -f stage1-gcc/Makefile ] \
+         || exit 0 ; \
+       [ -f gcc/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/gcc && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) clean
 @endif gcc-bootstrap
 
+
+.PHONY: configure-stage1-intl maybe-configure-stage1-intl
+.PHONY: all-stage1-intl maybe-all-stage1-intl
+.PHONY: clean-stage1-intl maybe-clean-stage1-intl
+
 maybe-configure-stage1-intl:
 maybe-all-stage1-intl:
+maybe-clean-stage1-intl:
 
 @if intl-bootstrap
 maybe-configure-stage1-intl: configure-stage1-intl
-configure-stage1-intl: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-intl/Makefile ] ; then \
-         $(STAMP) configure-stage1-intl ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-intl:
+       @$(MAKE) stage1-start
+       @[ -f intl/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in intl ; \
-       cd intl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/intl"; \
+       libsrcdir="$$s/intl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-intl
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-intl: all-stage1-intl
 all-stage1-intl: configure-stage1-intl
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd intl && \
+       cd $(HOST_SUBDIR)/intl && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)" 
+
+maybe-clean-stage1-intl: clean-stage1-intl
+clean-stage1-intl:
+       @[ -f intl/Makefile ] || [ -f stage1-intl/Makefile ] \
+         || exit 0 ; \
+       [ -f intl/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/intl && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-intl
+               CFLAGS="$(STAGE1_CFLAGS)"  clean
 @endif intl-bootstrap
 
+
+.PHONY: configure-stage1-ld maybe-configure-stage1-ld
+.PHONY: all-stage1-ld maybe-all-stage1-ld
+.PHONY: clean-stage1-ld maybe-clean-stage1-ld
+
 maybe-configure-stage1-ld:
 maybe-all-stage1-ld:
+maybe-clean-stage1-ld:
 
 @if ld-bootstrap
 maybe-configure-stage1-ld: configure-stage1-ld
-configure-stage1-ld: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-ld/Makefile ] ; then \
-         $(STAMP) configure-stage1-ld ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-ld:
+       @$(MAKE) stage1-start
+       @[ -f ld/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in ld ; \
-       cd ld || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/ld"; \
+       libsrcdir="$$s/ld"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-ld
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-ld: all-stage1-ld
 all-stage1-ld: configure-stage1-ld
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd ld && \
+       cd $(HOST_SUBDIR)/ld && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-ld
+               CFLAGS="$(STAGE1_CFLAGS)" 
+
+maybe-clean-stage1-ld: clean-stage1-ld
+clean-stage1-ld:
+       @[ -f ld/Makefile ] || [ -f stage1-ld/Makefile ] \
+         || exit 0 ; \
+       [ -f ld/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/ld && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)"  clean
 @endif ld-bootstrap
 
+
+.PHONY: configure-stage1-libcpp maybe-configure-stage1-libcpp
+.PHONY: all-stage1-libcpp maybe-all-stage1-libcpp
+.PHONY: clean-stage1-libcpp maybe-clean-stage1-libcpp
+
 maybe-configure-stage1-libcpp:
 maybe-all-stage1-libcpp:
+maybe-clean-stage1-libcpp:
 
 @if libcpp-bootstrap
 maybe-configure-stage1-libcpp: configure-stage1-libcpp
-configure-stage1-libcpp: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-libcpp/Makefile ] ; then \
-         $(STAMP) configure-stage1-libcpp ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-libcpp:
+       @$(MAKE) stage1-start
+       @[ -f libcpp/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in libcpp ; \
-       cd libcpp || exit 1; \
+       cd $(HOST_SUBDIR)/libcpp || exit 1; \
        case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libcpp"; \
+       libsrcdir="$$s/libcpp"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-libcpp
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-libcpp: all-stage1-libcpp
 all-stage1-libcpp: configure-stage1-libcpp
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd libcpp && \
+       cd $(HOST_SUBDIR)/libcpp && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)" 
+
+maybe-clean-stage1-libcpp: clean-stage1-libcpp
+clean-stage1-libcpp:
+       @[ -f libcpp/Makefile ] || [ -f stage1-libcpp/Makefile ] \
+         || exit 0 ; \
+       [ -f libcpp/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/libcpp && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-libcpp
+               CFLAGS="$(STAGE1_CFLAGS)"  clean
 @endif libcpp-bootstrap
 
-maybe-configure-stage1-libbanshee:
-maybe-all-stage1-libbanshee:
-
-@if libbanshee-bootstrap
-maybe-configure-stage1-libbanshee: configure-stage1-libbanshee
-configure-stage1-libbanshee: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-libbanshee/Makefile ] ; then \
-         $(STAMP) configure-stage1-libbanshee ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(HOST_EXPORTS)  \
-       echo Configuring stage 1 in libbanshee ; \
-       cd libbanshee || exit 1; \
-       case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-       esac; \
-       $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-libbanshee
 
-maybe-all-stage1-libbanshee: all-stage1-libbanshee
-all-stage1-libbanshee: configure-stage1-libbanshee
-       $(MAKE) stage1-start
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(HOST_EXPORTS)  \
-       cd libbanshee && \
-       $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-libbanshee
-@endif libbanshee-bootstrap
+.PHONY: configure-stage1-libiberty maybe-configure-stage1-libiberty
+.PHONY: all-stage1-libiberty maybe-all-stage1-libiberty
+.PHONY: clean-stage1-libiberty maybe-clean-stage1-libiberty
 
 maybe-configure-stage1-libiberty:
 maybe-all-stage1-libiberty:
+maybe-clean-stage1-libiberty:
 
 @if libiberty-bootstrap
 maybe-configure-stage1-libiberty: configure-stage1-libiberty
-configure-stage1-libiberty: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-libiberty/Makefile ] ; then \
-         $(STAMP) configure-stage1-libiberty ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-libiberty:
+       @$(MAKE) stage1-start
+       @[ -f libiberty/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in libiberty ; \
-       cd libiberty || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libiberty"; \
+       libsrcdir="$$s/libiberty"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-libiberty
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-libiberty: all-stage1-libiberty
 all-stage1-libiberty: configure-stage1-libiberty
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd libiberty && \
+       cd $(HOST_SUBDIR)/libiberty && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-libiberty
+               CFLAGS="$(STAGE1_CFLAGS)" 
+
+maybe-clean-stage1-libiberty: clean-stage1-libiberty
+clean-stage1-libiberty:
+       @[ -f libiberty/Makefile ] || [ -f stage1-libiberty/Makefile ] \
+         || exit 0 ; \
+       [ -f libiberty/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/libiberty && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)"  clean
 @endif libiberty-bootstrap
 
+
+.PHONY: configure-stage1-zlib maybe-configure-stage1-zlib
+.PHONY: all-stage1-zlib maybe-all-stage1-zlib
+.PHONY: clean-stage1-zlib maybe-clean-stage1-zlib
+
 maybe-configure-stage1-zlib:
 maybe-all-stage1-zlib:
+maybe-clean-stage1-zlib:
 
 @if zlib-bootstrap
 maybe-configure-stage1-zlib: configure-stage1-zlib
-configure-stage1-zlib: 
-       $(MAKE) stage1-start
-       @if [ -f stage1-zlib/Makefile ] ; then \
-         $(STAMP) configure-stage1-zlib ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage1-zlib:
+       @$(MAKE) stage1-start
+       @[ -f zlib/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
        echo Configuring stage 1 in zlib ; \
-       cd zlib || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/zlib"; \
+       libsrcdir="$$s/zlib"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"  && \
-         $(STAMP) ../configure-stage1-zlib
+         --disable-intermodule           --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" 
 
 maybe-all-stage1-zlib: all-stage1-zlib
 all-stage1-zlib: configure-stage1-zlib
-       $(MAKE) stage1-start
+       @$(MAKE) stage1-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(HOST_EXPORTS)  \
-       cd zlib && \
+       cd $(HOST_SUBDIR)/zlib && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               CFLAGS="$(STAGE1_CFLAGS)" 
+
+maybe-clean-stage1-zlib: clean-stage1-zlib
+clean-stage1-zlib:
+       @[ -f zlib/Makefile ] || [ -f stage1-zlib/Makefile ] \
+         || exit 0 ; \
+       [ -f zlib/Makefile ] || $(MAKE) stage1-start ; \
+       cd $(HOST_SUBDIR)/zlib && \
        $(MAKE) $(FLAGS_TO_PASS)  \
-               CFLAGS="$(STAGE1_CFLAGS)"  && \
-       $(STAMP) ../all-stage1-zlib
+               CFLAGS="$(STAGE1_CFLAGS)"  clean
 @endif zlib-bootstrap
 
 
+
 # FIXME: Will not need to be conditional when toplevel bootstrap is the
 # only possibility, but now it conflicts with no-bootstrap rules
 @if gcc-bootstrap
@@ -28781,35 +31128,12 @@ all-stage1-zlib: configure-stage1-zlib
 
 
 
-.PHONY: restage1 touch-stage1 distclean-stage1
-
-# Rules to wipe a stage and all the following ones, used for cleanstrap
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
 
+.PHONY: distclean-stage1
 distclean-stage1::
        [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
-       rm -rf configure-stage1-* all-stage1-* stage1-* 
-
-# Rules to renew the timestamp on a stage and all the following ones
-
-touch-stage1::
-       @case `echo configure-stage1-*` in \
-         'configure-stage1-*') ;; \
-         *) \
-           echo '$(STAMP)' configure-stage1-* && \
-           $(STAMP) configure-stage1-* ;; \
-       esac ; \
-       case `echo all-stage1-*` in \
-         'all-stage1-*') ;; \
-         *) \
-           echo '$(STAMP)' all-stage1-* && \
-           $(STAMP) all-stage1-* ;; \
-       esac
-
-# After building a stage, touch the following ones
-
-restage1::
-       rm -rf all-stage1-* 
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS)  all-stage1 
+       rm -rf stage1-* 
 
 
 @endif gcc-bootstrap
@@ -28818,110 +31142,152 @@ restage1::
 .PHONY: stage2-start stage2-end
 
 stage2-start::
-       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+       @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
        echo stage2 > stage_current ; \
-       echo stage2 > stage_last
+       echo stage2 > stage_last; \
+       $(mkinstalldirs) $(HOST_SUBDIR)
 @if bfd
-       [ -d stage2-bfd ] || mkdir stage2-bfd; \
-       set stage2-bfd bfd ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-bfd prev-bfd ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-bfd ] || \
+         mkdir stage2-bfd; \
+       set stage2-bfd bfd ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-bfd prev-bfd ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       [ -d stage2-opcodes ] || mkdir stage2-opcodes; \
-       set stage2-opcodes opcodes ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-opcodes ] || \
+         mkdir stage2-opcodes; \
+       set stage2-opcodes opcodes ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-opcodes prev-opcodes ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       [ -d stage2-binutils ] || mkdir stage2-binutils; \
-       set stage2-binutils binutils ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-binutils prev-binutils ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-binutils ] || \
+         mkdir stage2-binutils; \
+       set stage2-binutils binutils ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-binutils prev-binutils ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       [ -d stage2-gas ] || mkdir stage2-gas; \
-       set stage2-gas gas ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-gas prev-gas ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-gas ] || \
+         mkdir stage2-gas; \
+       set stage2-gas gas ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-gas prev-gas ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       [ -d stage2-gcc ] || mkdir stage2-gcc; \
-       set stage2-gcc gcc ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-gcc ] || \
+         mkdir stage2-gcc; \
+       set stage2-gcc gcc ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-gcc prev-gcc ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       [ -d stage2-intl ] || mkdir stage2-intl; \
-       set stage2-intl intl ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-intl prev-intl ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-intl ] || \
+         mkdir stage2-intl; \
+       set stage2-intl intl ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-intl prev-intl ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       [ -d stage2-ld ] || mkdir stage2-ld; \
-       set stage2-ld ld ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-ld prev-ld ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-ld ] || \
+         mkdir stage2-ld; \
+       set stage2-ld ld ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-ld prev-ld ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       [ -d stage2-libcpp ] || mkdir stage2-libcpp; \
-       set stage2-libcpp libcpp ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-libcpp ] || \
+         mkdir stage2-libcpp; \
+       set stage2-libcpp libcpp ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-libcpp prev-libcpp ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       [ -d stage2-libbanshee ] || mkdir stage2-libbanshee; \
-       set stage2-libbanshee libbanshee ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-libbanshee prev-libbanshee ; @CREATE_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       [ -d stage2-libiberty ] || mkdir stage2-libiberty; \
-       set stage2-libiberty libiberty ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-libiberty ] || \
+         mkdir stage2-libiberty; \
+       set stage2-libiberty libiberty ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-libiberty prev-libiberty ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       [ -d stage2-zlib ] || mkdir stage2-zlib; \
-       set stage2-zlib zlib ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-zlib prev-zlib ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage2-zlib ] || \
+         mkdir stage2-zlib; \
+       set stage2-zlib zlib ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-zlib prev-zlib ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif zlib
 
 stage2-end::
-       rm -f stage_current
+       @rm -f stage_current
 @if bfd
-       set bfd stage2-bfd ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-bfd stage1-bfd ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set bfd stage2-bfd ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-bfd stage1-bfd ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       set opcodes stage2-opcodes ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-opcodes stage1-opcodes ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set opcodes stage2-opcodes ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-opcodes stage1-opcodes ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       set binutils stage2-binutils ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-binutils stage1-binutils ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set binutils stage2-binutils ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-binutils stage1-binutils ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       set gas stage2-gas ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gas stage1-gas ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gas stage2-gas ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gas stage1-gas ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       set gcc stage2-gcc ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gcc stage2-gcc ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gcc stage1-gcc ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       set intl stage2-intl ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-intl stage1-intl ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set intl stage2-intl ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-intl stage1-intl ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       set ld stage2-ld ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-ld stage1-ld ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set ld stage2-ld ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-ld stage1-ld ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       set libcpp stage2-libcpp ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libcpp stage1-libcpp ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libcpp stage2-libcpp ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libcpp stage1-libcpp ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       set libbanshee stage2-libbanshee ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libbanshee stage1-libbanshee ; @UNDO_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       set libiberty stage2-libiberty ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libiberty stage1-libiberty ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libiberty stage2-libiberty ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libiberty stage1-libiberty ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       set zlib stage2-zlib ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-zlib stage1-zlib ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set zlib stage2-zlib ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-zlib stage1-zlib ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif zlib
 
 # Bubble a bugfix through all the stages up to stage 2.  They
@@ -28929,545 +31295,560 @@ stage2-end::
 # be reconfigured as well.
 .PHONY: stage2-bubble
 stage2-bubble:: stage1-bubble
-       @case `echo all-stage2-*` in \
-         'all-stage2-*') ;; \
-         *) echo Remaking stage 2 ; rm -f all-stage2-* ;; \
-       esac ; \
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage2
+       @if test -f stage2-lean || test -f stage1-lean  ; then \
+         echo Skipping rebuild of stage2 ; \
+       else \
+         $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage2; \
+       fi
 
-.PHONY: all-stage2
+.PHONY: all-stage2 clean-stage2
 all-stage2:     \
   maybe-all-stage2-bfd \
   maybe-all-stage2-opcodes \
-  maybe-all-stage2-binutils             \
+  maybe-all-stage2-binutils              \
   maybe-all-stage2-gas \
   maybe-all-stage2-gcc        \
   maybe-all-stage2-intl   \
   maybe-all-stage2-ld \
   maybe-all-stage2-libcpp  \
-  maybe-all-stage2-libbanshee \
   maybe-all-stage2-libiberty                        \
-  maybe-all-stage2-zlib       
-
+  maybe-all-stage2-zlib        
+
+do-clean: clean-stage2
+clean-stage2:     \
+  maybe-clean-stage2-bfd \
+  maybe-clean-stage2-opcodes \
+  maybe-clean-stage2-binutils              \
+  maybe-clean-stage2-gas \
+  maybe-clean-stage2-gcc        \
+  maybe-clean-stage2-intl   \
+  maybe-clean-stage2-ld \
+  maybe-clean-stage2-libcpp  \
+  maybe-clean-stage2-libiberty                        \
+  maybe-clean-stage2-zlib        
+
+
+.PHONY: configure-stage2-bfd maybe-configure-stage2-bfd
+.PHONY: all-stage2-bfd maybe-all-stage2-bfd
+.PHONY: clean-stage2-bfd maybe-clean-stage2-bfd
 
 maybe-configure-stage2-bfd:
 maybe-all-stage2-bfd:
+maybe-clean-stage2-bfd:
 
 @if bfd-bootstrap
 maybe-configure-stage2-bfd: configure-stage2-bfd
-configure-stage2-bfd:  maybe-all-stage1-bfd 
-       $(MAKE) stage2-start
-       @if [ -f stage2-bfd/Makefile ] ; then \
-         $(STAMP) configure-stage2-bfd ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-bfd:
+       @$(MAKE) stage2-start
+       @[ -f bfd/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in bfd ; \
-       cd bfd || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bfd"; \
+       libsrcdir="$$s/bfd"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-bfd
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-bfd: all-stage2-bfd
 all-stage2-bfd: configure-stage2-bfd
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd bfd && \
+       cd $(HOST_SUBDIR)/bfd && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-bfd
+                
+
+maybe-clean-stage2-bfd: clean-stage2-bfd
+clean-stage2-bfd:
+       @[ -f bfd/Makefile ] || [ -f stage2-bfd/Makefile ] \
+         || exit 0 ; \
+       [ -f bfd/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/bfd && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                 clean
 @endif bfd-bootstrap
 
+
+.PHONY: configure-stage2-opcodes maybe-configure-stage2-opcodes
+.PHONY: all-stage2-opcodes maybe-all-stage2-opcodes
+.PHONY: clean-stage2-opcodes maybe-clean-stage2-opcodes
+
 maybe-configure-stage2-opcodes:
 maybe-all-stage2-opcodes:
+maybe-clean-stage2-opcodes:
 
 @if opcodes-bootstrap
 maybe-configure-stage2-opcodes: configure-stage2-opcodes
-configure-stage2-opcodes:  maybe-all-stage1-opcodes 
-       $(MAKE) stage2-start
-       @if [ -f stage2-opcodes/Makefile ] ; then \
-         $(STAMP) configure-stage2-opcodes ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-opcodes:
+       @$(MAKE) stage2-start
+       @[ -f opcodes/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in opcodes ; \
-       cd opcodes || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/opcodes"; \
+       libsrcdir="$$s/opcodes"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-opcodes
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-opcodes: all-stage2-opcodes
 all-stage2-opcodes: configure-stage2-opcodes
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd opcodes && \
+       cd $(HOST_SUBDIR)/opcodes && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage2-opcodes: clean-stage2-opcodes
+clean-stage2-opcodes:
+       @[ -f opcodes/Makefile ] || [ -f stage2-opcodes/Makefile ] \
+         || exit 0 ; \
+       [ -f opcodes/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/opcodes && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-opcodes
+                 clean
 @endif opcodes-bootstrap
 
+
+.PHONY: configure-stage2-binutils maybe-configure-stage2-binutils
+.PHONY: all-stage2-binutils maybe-all-stage2-binutils
+.PHONY: clean-stage2-binutils maybe-clean-stage2-binutils
+
 maybe-configure-stage2-binutils:
 maybe-all-stage2-binutils:
+maybe-clean-stage2-binutils:
 
 @if binutils-bootstrap
 maybe-configure-stage2-binutils: configure-stage2-binutils
-configure-stage2-binutils:  maybe-all-stage1-binutils 
-       $(MAKE) stage2-start
-       @if [ -f stage2-binutils/Makefile ] ; then \
-         $(STAMP) configure-stage2-binutils ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-binutils:
+       @$(MAKE) stage2-start
+       @[ -f binutils/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in binutils ; \
-       cd binutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/binutils"; \
+       libsrcdir="$$s/binutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-binutils
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-binutils: all-stage2-binutils
 all-stage2-binutils: configure-stage2-binutils
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd binutils && \
+       cd $(HOST_SUBDIR)/binutils && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-binutils
+                
+
+maybe-clean-stage2-binutils: clean-stage2-binutils
+clean-stage2-binutils:
+       @[ -f binutils/Makefile ] || [ -f stage2-binutils/Makefile ] \
+         || exit 0 ; \
+       [ -f binutils/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/binutils && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                 clean
 @endif binutils-bootstrap
 
+
+.PHONY: configure-stage2-gas maybe-configure-stage2-gas
+.PHONY: all-stage2-gas maybe-all-stage2-gas
+.PHONY: clean-stage2-gas maybe-clean-stage2-gas
+
 maybe-configure-stage2-gas:
 maybe-all-stage2-gas:
+maybe-clean-stage2-gas:
 
 @if gas-bootstrap
 maybe-configure-stage2-gas: configure-stage2-gas
-configure-stage2-gas:  maybe-all-stage1-gas 
-       $(MAKE) stage2-start
-       @if [ -f stage2-gas/Makefile ] ; then \
-         $(STAMP) configure-stage2-gas ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-gas:
+       @$(MAKE) stage2-start
+       @[ -f gas/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in gas ; \
-       cd gas || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gas"; \
+       libsrcdir="$$s/gas"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-gas
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-gas: all-stage2-gas
 all-stage2-gas: configure-stage2-gas
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gas && \
+       cd $(HOST_SUBDIR)/gas && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage2-gas: clean-stage2-gas
+clean-stage2-gas:
+       @[ -f gas/Makefile ] || [ -f stage2-gas/Makefile ] \
+         || exit 0 ; \
+       [ -f gas/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/gas && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-gas
+                 clean
 @endif gas-bootstrap
 
+
+.PHONY: configure-stage2-gcc maybe-configure-stage2-gcc
+.PHONY: all-stage2-gcc maybe-all-stage2-gcc
+.PHONY: clean-stage2-gcc maybe-clean-stage2-gcc
+
 maybe-configure-stage2-gcc:
 maybe-all-stage2-gcc:
+maybe-clean-stage2-gcc:
 
 @if gcc-bootstrap
 maybe-configure-stage2-gcc: configure-stage2-gcc
-configure-stage2-gcc:  maybe-all-stage1-gcc 
-       $(MAKE) stage2-start
-       @if [ -f stage2-gcc/Makefile ] ; then \
-         $(STAMP) configure-stage2-gcc ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-gcc:
+       @$(MAKE) stage2-start
+       @[ -f gcc/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in gcc ; \
-       cd gcc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gcc"; \
+       libsrcdir="$$s/gcc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-gcc
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-gcc: all-stage2-gcc
 all-stage2-gcc: configure-stage2-gcc
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gcc && \
+       cd $(HOST_SUBDIR)/gcc && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                $(EXTRA_GCC_FLAGS) && \
-       $(STAMP) ../all-stage2-gcc
+                $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stage2-gcc: clean-stage2-gcc
+clean-stage2-gcc:
+       @[ -f gcc/Makefile ] || [ -f stage2-gcc/Makefile ] \
+         || exit 0 ; \
+       [ -f gcc/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/gcc && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                $(EXTRA_GCC_FLAGS) clean
 @endif gcc-bootstrap
 
+
+.PHONY: configure-stage2-intl maybe-configure-stage2-intl
+.PHONY: all-stage2-intl maybe-all-stage2-intl
+.PHONY: clean-stage2-intl maybe-clean-stage2-intl
+
 maybe-configure-stage2-intl:
 maybe-all-stage2-intl:
+maybe-clean-stage2-intl:
 
 @if intl-bootstrap
 maybe-configure-stage2-intl: configure-stage2-intl
-configure-stage2-intl:  maybe-all-stage1-intl 
-       $(MAKE) stage2-start
-       @if [ -f stage2-intl/Makefile ] ; then \
-         $(STAMP) configure-stage2-intl ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-intl:
+       @$(MAKE) stage2-start
+       @[ -f intl/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in intl ; \
-       cd intl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/intl"; \
+       libsrcdir="$$s/intl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-intl
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-intl: all-stage2-intl
 all-stage2-intl: configure-stage2-intl
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd intl && \
+       cd $(HOST_SUBDIR)/intl && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage2-intl: clean-stage2-intl
+clean-stage2-intl:
+       @[ -f intl/Makefile ] || [ -f stage2-intl/Makefile ] \
+         || exit 0 ; \
+       [ -f intl/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/intl && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-intl
+                 clean
 @endif intl-bootstrap
 
+
+.PHONY: configure-stage2-ld maybe-configure-stage2-ld
+.PHONY: all-stage2-ld maybe-all-stage2-ld
+.PHONY: clean-stage2-ld maybe-clean-stage2-ld
+
 maybe-configure-stage2-ld:
 maybe-all-stage2-ld:
+maybe-clean-stage2-ld:
 
 @if ld-bootstrap
 maybe-configure-stage2-ld: configure-stage2-ld
-configure-stage2-ld:  maybe-all-stage1-ld 
-       $(MAKE) stage2-start
-       @if [ -f stage2-ld/Makefile ] ; then \
-         $(STAMP) configure-stage2-ld ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-ld:
+       @$(MAKE) stage2-start
+       @[ -f ld/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in ld ; \
-       cd ld || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/ld"; \
+       libsrcdir="$$s/ld"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-ld
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-ld: all-stage2-ld
 all-stage2-ld: configure-stage2-ld
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd ld && \
+       cd $(HOST_SUBDIR)/ld && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-ld
+                
+
+maybe-clean-stage2-ld: clean-stage2-ld
+clean-stage2-ld:
+       @[ -f ld/Makefile ] || [ -f stage2-ld/Makefile ] \
+         || exit 0 ; \
+       [ -f ld/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/ld && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                 clean
 @endif ld-bootstrap
 
+
+.PHONY: configure-stage2-libcpp maybe-configure-stage2-libcpp
+.PHONY: all-stage2-libcpp maybe-all-stage2-libcpp
+.PHONY: clean-stage2-libcpp maybe-clean-stage2-libcpp
+
 maybe-configure-stage2-libcpp:
 maybe-all-stage2-libcpp:
+maybe-clean-stage2-libcpp:
 
 @if libcpp-bootstrap
 maybe-configure-stage2-libcpp: configure-stage2-libcpp
-configure-stage2-libcpp:  maybe-all-stage1-libcpp 
-       $(MAKE) stage2-start
-       @if [ -f stage2-libcpp/Makefile ] ; then \
-         $(STAMP) configure-stage2-libcpp ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-libcpp:
+       @$(MAKE) stage2-start
+       @[ -f libcpp/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in libcpp ; \
-       cd libcpp || exit 1; \
+       cd $(HOST_SUBDIR)/libcpp || exit 1; \
        case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libcpp"; \
+       libsrcdir="$$s/libcpp"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-libcpp
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-libcpp: all-stage2-libcpp
 all-stage2-libcpp: configure-stage2-libcpp
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libcpp && \
+       cd $(HOST_SUBDIR)/libcpp && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage2-libcpp: clean-stage2-libcpp
+clean-stage2-libcpp:
+       @[ -f libcpp/Makefile ] || [ -f stage2-libcpp/Makefile ] \
+         || exit 0 ; \
+       [ -f libcpp/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/libcpp && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-libcpp
+                 clean
 @endif libcpp-bootstrap
 
-maybe-configure-stage2-libbanshee:
-maybe-all-stage2-libbanshee:
-
-@if libbanshee-bootstrap
-maybe-configure-stage2-libbanshee: configure-stage2-libbanshee
-configure-stage2-libbanshee:  maybe-all-stage1-libbanshee 
-       $(MAKE) stage2-start
-       @if [ -f stage2-libbanshee/Makefile ] ; then \
-         $(STAMP) configure-stage2-libbanshee ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       echo Configuring stage 2 in libbanshee ; \
-       cd libbanshee || exit 1; \
-       case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-       esac; \
-       $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-libbanshee
 
-maybe-all-stage2-libbanshee: all-stage2-libbanshee
-all-stage2-libbanshee: configure-stage2-libbanshee
-       $(MAKE) stage2-start
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       cd libbanshee && \
-       $(MAKE) $(FLAGS_TO_PASS)  \
-               $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-libbanshee
-@endif libbanshee-bootstrap
+.PHONY: configure-stage2-libiberty maybe-configure-stage2-libiberty
+.PHONY: all-stage2-libiberty maybe-all-stage2-libiberty
+.PHONY: clean-stage2-libiberty maybe-clean-stage2-libiberty
 
 maybe-configure-stage2-libiberty:
 maybe-all-stage2-libiberty:
+maybe-clean-stage2-libiberty:
 
 @if libiberty-bootstrap
 maybe-configure-stage2-libiberty: configure-stage2-libiberty
-configure-stage2-libiberty:  maybe-all-stage1-libiberty 
-       $(MAKE) stage2-start
-       @if [ -f stage2-libiberty/Makefile ] ; then \
-         $(STAMP) configure-stage2-libiberty ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-libiberty:
+       @$(MAKE) stage2-start
+       @[ -f libiberty/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in libiberty ; \
-       cd libiberty || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libiberty"; \
+       libsrcdir="$$s/libiberty"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-libiberty
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-libiberty: all-stage2-libiberty
 all-stage2-libiberty: configure-stage2-libiberty
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libiberty && \
+       cd $(HOST_SUBDIR)/libiberty && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage2-libiberty: clean-stage2-libiberty
+clean-stage2-libiberty:
+       @[ -f libiberty/Makefile ] || [ -f stage2-libiberty/Makefile ] \
+         || exit 0 ; \
+       [ -f libiberty/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/libiberty && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-libiberty
+                 clean
 @endif libiberty-bootstrap
 
+
+.PHONY: configure-stage2-zlib maybe-configure-stage2-zlib
+.PHONY: all-stage2-zlib maybe-all-stage2-zlib
+.PHONY: clean-stage2-zlib maybe-clean-stage2-zlib
+
 maybe-configure-stage2-zlib:
 maybe-all-stage2-zlib:
+maybe-clean-stage2-zlib:
 
 @if zlib-bootstrap
 maybe-configure-stage2-zlib: configure-stage2-zlib
-configure-stage2-zlib:  maybe-all-stage1-zlib 
-       $(MAKE) stage2-start
-       @if [ -f stage2-zlib/Makefile ] ; then \
-         $(STAMP) configure-stage2-zlib ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage2-zlib:
+       @$(MAKE) stage2-start
+       @[ -f zlib/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 2 in zlib ; \
-       cd zlib || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/zlib"; \
+       libsrcdir="$$s/zlib"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage2-zlib
+         @stage2_werror_flag@ 
 
 maybe-all-stage2-zlib: all-stage2-zlib
 all-stage2-zlib: configure-stage2-zlib
-       $(MAKE) stage2-start
+       @$(MAKE) stage2-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd zlib && \
+       cd $(HOST_SUBDIR)/zlib && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage2-zlib: clean-stage2-zlib
+clean-stage2-zlib:
+       @[ -f zlib/Makefile ] || [ -f stage2-zlib/Makefile ] \
+         || exit 0 ; \
+       [ -f zlib/Makefile ] || $(MAKE) stage2-start ; \
+       cd $(HOST_SUBDIR)/zlib && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage2-zlib
+                 clean
 @endif zlib-bootstrap
 
 
+
 # FIXME: Will not need to be conditional when toplevel bootstrap is the
 # only possibility, but now it conflicts with no-bootstrap rules
 @if gcc-bootstrap
@@ -29478,35 +31859,12 @@ all-stage2-zlib: configure-stage2-zlib
 bootstrap2: stage2-bubble  all
 
 
-.PHONY: restage2 touch-stage2 distclean-stage2
-
-# Rules to wipe a stage and all the following ones, used for cleanstrap
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
 distclean-stage1:: distclean-stage2 
+.PHONY: distclean-stage2
 distclean-stage2::
        [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
-       rm -rf configure-stage2-* all-stage2-* stage2-* 
-
-# Rules to renew the timestamp on a stage and all the following ones
-touch-stage1:: touch-stage2 
-touch-stage2::
-       @case `echo configure-stage2-*` in \
-         'configure-stage2-*') ;; \
-         *) \
-           echo '$(STAMP)' configure-stage2-* && \
-           $(STAMP) configure-stage2-* ;; \
-       esac ; \
-       case `echo all-stage2-*` in \
-         'all-stage2-*') ;; \
-         *) \
-           echo '$(STAMP)' all-stage2-* && \
-           $(STAMP) all-stage2-* ;; \
-       esac
-
-# After building a stage, touch the following ones
-restage1:: touch-stage2 
-restage2::
-       rm -rf all-stage2-* 
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS)  all-stage2 
+       rm -rf stage2-* 
 
 
 @endif gcc-bootstrap
@@ -29515,110 +31873,152 @@ restage2::
 .PHONY: stage3-start stage3-end
 
 stage3-start::
-       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+       @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
        echo stage3 > stage_current ; \
-       echo stage3 > stage_last
+       echo stage3 > stage_last; \
+       $(mkinstalldirs) $(HOST_SUBDIR)
 @if bfd
-       [ -d stage3-bfd ] || mkdir stage3-bfd; \
-       set stage3-bfd bfd ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-bfd prev-bfd ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-bfd ] || \
+         mkdir stage3-bfd; \
+       set stage3-bfd bfd ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-bfd prev-bfd ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       [ -d stage3-opcodes ] || mkdir stage3-opcodes; \
-       set stage3-opcodes opcodes ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-opcodes ] || \
+         mkdir stage3-opcodes; \
+       set stage3-opcodes opcodes ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-opcodes prev-opcodes ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       [ -d stage3-binutils ] || mkdir stage3-binutils; \
-       set stage3-binutils binutils ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-binutils prev-binutils ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-binutils ] || \
+         mkdir stage3-binutils; \
+       set stage3-binutils binutils ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-binutils prev-binutils ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       [ -d stage3-gas ] || mkdir stage3-gas; \
-       set stage3-gas gas ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-gas prev-gas ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-gas ] || \
+         mkdir stage3-gas; \
+       set stage3-gas gas ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-gas prev-gas ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       [ -d stage3-gcc ] || mkdir stage3-gcc; \
-       set stage3-gcc gcc ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-gcc ] || \
+         mkdir stage3-gcc; \
+       set stage3-gcc gcc ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-gcc prev-gcc ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       [ -d stage3-intl ] || mkdir stage3-intl; \
-       set stage3-intl intl ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-intl prev-intl ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-intl ] || \
+         mkdir stage3-intl; \
+       set stage3-intl intl ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-intl prev-intl ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       [ -d stage3-ld ] || mkdir stage3-ld; \
-       set stage3-ld ld ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-ld prev-ld ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-ld ] || \
+         mkdir stage3-ld; \
+       set stage3-ld ld ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-ld prev-ld ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       [ -d stage3-libcpp ] || mkdir stage3-libcpp; \
-       set stage3-libcpp libcpp ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-libcpp ] || \
+         mkdir stage3-libcpp; \
+       set stage3-libcpp libcpp ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-libcpp prev-libcpp ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       [ -d stage3-libbanshee ] || mkdir stage3-libbanshee; \
-       set stage3-libbanshee libbanshee ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-libbanshee prev-libbanshee ; @CREATE_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       [ -d stage3-libiberty ] || mkdir stage3-libiberty; \
-       set stage3-libiberty libiberty ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-libiberty ] || \
+         mkdir stage3-libiberty; \
+       set stage3-libiberty libiberty ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-libiberty prev-libiberty ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       [ -d stage3-zlib ] || mkdir stage3-zlib; \
-       set stage3-zlib zlib ; @CREATE_LINK_TO_DIR@  ; \
-       set stage2-zlib prev-zlib ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage3-zlib ] || \
+         mkdir stage3-zlib; \
+       set stage3-zlib zlib ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage2-zlib prev-zlib ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif zlib
 
 stage3-end::
-       rm -f stage_current
+       @rm -f stage_current
 @if bfd
-       set bfd stage3-bfd ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-bfd stage2-bfd ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set bfd stage3-bfd ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-bfd stage2-bfd ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       set opcodes stage3-opcodes ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-opcodes stage2-opcodes ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set opcodes stage3-opcodes ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-opcodes stage2-opcodes ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       set binutils stage3-binutils ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-binutils stage2-binutils ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set binutils stage3-binutils ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-binutils stage2-binutils ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       set gas stage3-gas ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gas stage2-gas ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gas stage3-gas ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gas stage2-gas ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       set gcc stage3-gcc ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gcc stage2-gcc ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gcc stage3-gcc ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gcc stage2-gcc ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       set intl stage3-intl ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-intl stage2-intl ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set intl stage3-intl ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-intl stage2-intl ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       set ld stage3-ld ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-ld stage2-ld ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set ld stage3-ld ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-ld stage2-ld ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       set libcpp stage3-libcpp ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libcpp stage2-libcpp ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libcpp stage3-libcpp ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libcpp stage2-libcpp ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       set libbanshee stage3-libbanshee ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libbanshee stage2-libbanshee ; @UNDO_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       set libiberty stage3-libiberty ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libiberty stage2-libiberty ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libiberty stage3-libiberty ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libiberty stage2-libiberty ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       set zlib stage3-zlib ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-zlib stage2-zlib ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set zlib stage3-zlib ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-zlib stage2-zlib ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif zlib
 
 # Bubble a bugfix through all the stages up to stage 3.  They
@@ -29626,551 +32026,571 @@ stage3-end::
 # be reconfigured as well.
 .PHONY: stage3-bubble
 stage3-bubble:: stage2-bubble
-       @case `echo all-stage3-*` in \
-         'all-stage3-*') ;; \
-         *) echo Remaking stage 3 ; rm -f all-stage3-* ;; \
-       esac ; \
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage3
+       @bootstrap_lean@-rm -rf stage1-* ; $(STAMP) stage1-lean
+       @if test -f stage3-lean || test -f stage2-lean  ; then \
+         echo Skipping rebuild of stage3 ; \
+       else \
+         $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage3; \
+       fi
 
-.PHONY: all-stage3
+.PHONY: all-stage3 clean-stage3
 all-stage3:     \
   maybe-all-stage3-bfd \
   maybe-all-stage3-opcodes \
-  maybe-all-stage3-binutils             \
+  maybe-all-stage3-binutils              \
   maybe-all-stage3-gas \
   maybe-all-stage3-gcc        \
   maybe-all-stage3-intl   \
   maybe-all-stage3-ld \
   maybe-all-stage3-libcpp  \
-  maybe-all-stage3-libbanshee \
   maybe-all-stage3-libiberty                        \
-  maybe-all-stage3-zlib       
-
+  maybe-all-stage3-zlib        
+
+do-clean: clean-stage3
+clean-stage3:     \
+  maybe-clean-stage3-bfd \
+  maybe-clean-stage3-opcodes \
+  maybe-clean-stage3-binutils              \
+  maybe-clean-stage3-gas \
+  maybe-clean-stage3-gcc        \
+  maybe-clean-stage3-intl   \
+  maybe-clean-stage3-ld \
+  maybe-clean-stage3-libcpp  \
+  maybe-clean-stage3-libiberty                        \
+  maybe-clean-stage3-zlib        
+
+
+.PHONY: configure-stage3-bfd maybe-configure-stage3-bfd
+.PHONY: all-stage3-bfd maybe-all-stage3-bfd
+.PHONY: clean-stage3-bfd maybe-clean-stage3-bfd
 
 maybe-configure-stage3-bfd:
 maybe-all-stage3-bfd:
+maybe-clean-stage3-bfd:
 
 @if bfd-bootstrap
 maybe-configure-stage3-bfd: configure-stage3-bfd
-configure-stage3-bfd:  maybe-all-stage2-bfd 
-       $(MAKE) stage3-start
-       @if [ -f stage3-bfd/Makefile ] ; then \
-         $(STAMP) configure-stage3-bfd ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-bfd:
+       @$(MAKE) stage3-start
+       @[ -f bfd/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in bfd ; \
-       cd bfd || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bfd"; \
+       libsrcdir="$$s/bfd"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-bfd
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-bfd: all-stage3-bfd
 all-stage3-bfd: configure-stage3-bfd
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd bfd && \
+       cd $(HOST_SUBDIR)/bfd && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage3-bfd: clean-stage3-bfd
+clean-stage3-bfd:
+       @[ -f bfd/Makefile ] || [ -f stage3-bfd/Makefile ] \
+         || exit 0 ; \
+       [ -f bfd/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/bfd && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-bfd
+                 clean
 @endif bfd-bootstrap
 
+
+.PHONY: configure-stage3-opcodes maybe-configure-stage3-opcodes
+.PHONY: all-stage3-opcodes maybe-all-stage3-opcodes
+.PHONY: clean-stage3-opcodes maybe-clean-stage3-opcodes
+
 maybe-configure-stage3-opcodes:
 maybe-all-stage3-opcodes:
+maybe-clean-stage3-opcodes:
 
 @if opcodes-bootstrap
 maybe-configure-stage3-opcodes: configure-stage3-opcodes
-configure-stage3-opcodes:  maybe-all-stage2-opcodes 
-       $(MAKE) stage3-start
-       @if [ -f stage3-opcodes/Makefile ] ; then \
-         $(STAMP) configure-stage3-opcodes ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-opcodes:
+       @$(MAKE) stage3-start
+       @[ -f opcodes/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in opcodes ; \
-       cd opcodes || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/opcodes"; \
+       libsrcdir="$$s/opcodes"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-opcodes
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-opcodes: all-stage3-opcodes
 all-stage3-opcodes: configure-stage3-opcodes
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd opcodes && \
+       cd $(HOST_SUBDIR)/opcodes && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage3-opcodes: clean-stage3-opcodes
+clean-stage3-opcodes:
+       @[ -f opcodes/Makefile ] || [ -f stage3-opcodes/Makefile ] \
+         || exit 0 ; \
+       [ -f opcodes/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/opcodes && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-opcodes
+                 clean
 @endif opcodes-bootstrap
 
+
+.PHONY: configure-stage3-binutils maybe-configure-stage3-binutils
+.PHONY: all-stage3-binutils maybe-all-stage3-binutils
+.PHONY: clean-stage3-binutils maybe-clean-stage3-binutils
+
 maybe-configure-stage3-binutils:
 maybe-all-stage3-binutils:
+maybe-clean-stage3-binutils:
 
 @if binutils-bootstrap
 maybe-configure-stage3-binutils: configure-stage3-binutils
-configure-stage3-binutils:  maybe-all-stage2-binutils 
-       $(MAKE) stage3-start
-       @if [ -f stage3-binutils/Makefile ] ; then \
-         $(STAMP) configure-stage3-binutils ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-binutils:
+       @$(MAKE) stage3-start
+       @[ -f binutils/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in binutils ; \
-       cd binutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/binutils"; \
+       libsrcdir="$$s/binutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-binutils
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-binutils: all-stage3-binutils
 all-stage3-binutils: configure-stage3-binutils
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd binutils && \
+       cd $(HOST_SUBDIR)/binutils && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage3-binutils: clean-stage3-binutils
+clean-stage3-binutils:
+       @[ -f binutils/Makefile ] || [ -f stage3-binutils/Makefile ] \
+         || exit 0 ; \
+       [ -f binutils/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/binutils && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-binutils
+                 clean
 @endif binutils-bootstrap
 
+
+.PHONY: configure-stage3-gas maybe-configure-stage3-gas
+.PHONY: all-stage3-gas maybe-all-stage3-gas
+.PHONY: clean-stage3-gas maybe-clean-stage3-gas
+
 maybe-configure-stage3-gas:
 maybe-all-stage3-gas:
+maybe-clean-stage3-gas:
 
 @if gas-bootstrap
 maybe-configure-stage3-gas: configure-stage3-gas
-configure-stage3-gas:  maybe-all-stage2-gas 
-       $(MAKE) stage3-start
-       @if [ -f stage3-gas/Makefile ] ; then \
-         $(STAMP) configure-stage3-gas ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-gas:
+       @$(MAKE) stage3-start
+       @[ -f gas/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in gas ; \
-       cd gas || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gas"; \
+       libsrcdir="$$s/gas"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-gas
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-gas: all-stage3-gas
 all-stage3-gas: configure-stage3-gas
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gas && \
+       cd $(HOST_SUBDIR)/gas && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage3-gas: clean-stage3-gas
+clean-stage3-gas:
+       @[ -f gas/Makefile ] || [ -f stage3-gas/Makefile ] \
+         || exit 0 ; \
+       [ -f gas/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/gas && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-gas
+                 clean
 @endif gas-bootstrap
 
+
+.PHONY: configure-stage3-gcc maybe-configure-stage3-gcc
+.PHONY: all-stage3-gcc maybe-all-stage3-gcc
+.PHONY: clean-stage3-gcc maybe-clean-stage3-gcc
+
 maybe-configure-stage3-gcc:
 maybe-all-stage3-gcc:
+maybe-clean-stage3-gcc:
 
 @if gcc-bootstrap
 maybe-configure-stage3-gcc: configure-stage3-gcc
-configure-stage3-gcc:  maybe-all-stage2-gcc 
-       $(MAKE) stage3-start
-       @if [ -f stage3-gcc/Makefile ] ; then \
-         $(STAMP) configure-stage3-gcc ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-gcc:
+       @$(MAKE) stage3-start
+       @[ -f gcc/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in gcc ; \
-       cd gcc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gcc"; \
+       libsrcdir="$$s/gcc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-gcc
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-gcc: all-stage3-gcc
 all-stage3-gcc: configure-stage3-gcc
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gcc && \
+       cd $(HOST_SUBDIR)/gcc && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stage3-gcc: clean-stage3-gcc
+clean-stage3-gcc:
+       @[ -f gcc/Makefile ] || [ -f stage3-gcc/Makefile ] \
+         || exit 0 ; \
+       [ -f gcc/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/gcc && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                $(EXTRA_GCC_FLAGS) && \
-       $(STAMP) ../all-stage3-gcc
+                $(EXTRA_GCC_FLAGS) clean
 @endif gcc-bootstrap
 
+
+.PHONY: configure-stage3-intl maybe-configure-stage3-intl
+.PHONY: all-stage3-intl maybe-all-stage3-intl
+.PHONY: clean-stage3-intl maybe-clean-stage3-intl
+
 maybe-configure-stage3-intl:
 maybe-all-stage3-intl:
+maybe-clean-stage3-intl:
 
 @if intl-bootstrap
 maybe-configure-stage3-intl: configure-stage3-intl
-configure-stage3-intl:  maybe-all-stage2-intl 
-       $(MAKE) stage3-start
-       @if [ -f stage3-intl/Makefile ] ; then \
-         $(STAMP) configure-stage3-intl ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-intl:
+       @$(MAKE) stage3-start
+       @[ -f intl/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in intl ; \
-       cd intl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/intl"; \
+       libsrcdir="$$s/intl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-intl
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-intl: all-stage3-intl
 all-stage3-intl: configure-stage3-intl
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd intl && \
+       cd $(HOST_SUBDIR)/intl && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage3-intl: clean-stage3-intl
+clean-stage3-intl:
+       @[ -f intl/Makefile ] || [ -f stage3-intl/Makefile ] \
+         || exit 0 ; \
+       [ -f intl/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/intl && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-intl
+                 clean
 @endif intl-bootstrap
 
+
+.PHONY: configure-stage3-ld maybe-configure-stage3-ld
+.PHONY: all-stage3-ld maybe-all-stage3-ld
+.PHONY: clean-stage3-ld maybe-clean-stage3-ld
+
 maybe-configure-stage3-ld:
 maybe-all-stage3-ld:
+maybe-clean-stage3-ld:
 
 @if ld-bootstrap
 maybe-configure-stage3-ld: configure-stage3-ld
-configure-stage3-ld:  maybe-all-stage2-ld 
-       $(MAKE) stage3-start
-       @if [ -f stage3-ld/Makefile ] ; then \
-         $(STAMP) configure-stage3-ld ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-ld:
+       @$(MAKE) stage3-start
+       @[ -f ld/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in ld ; \
-       cd ld || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/ld"; \
+       libsrcdir="$$s/ld"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-ld
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-ld: all-stage3-ld
 all-stage3-ld: configure-stage3-ld
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd ld && \
+       cd $(HOST_SUBDIR)/ld && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage3-ld: clean-stage3-ld
+clean-stage3-ld:
+       @[ -f ld/Makefile ] || [ -f stage3-ld/Makefile ] \
+         || exit 0 ; \
+       [ -f ld/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/ld && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-ld
+                 clean
 @endif ld-bootstrap
 
+
+.PHONY: configure-stage3-libcpp maybe-configure-stage3-libcpp
+.PHONY: all-stage3-libcpp maybe-all-stage3-libcpp
+.PHONY: clean-stage3-libcpp maybe-clean-stage3-libcpp
+
 maybe-configure-stage3-libcpp:
 maybe-all-stage3-libcpp:
+maybe-clean-stage3-libcpp:
 
 @if libcpp-bootstrap
 maybe-configure-stage3-libcpp: configure-stage3-libcpp
-configure-stage3-libcpp:  maybe-all-stage2-libcpp 
-       $(MAKE) stage3-start
-       @if [ -f stage3-libcpp/Makefile ] ; then \
-         $(STAMP) configure-stage3-libcpp ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-libcpp:
+       @$(MAKE) stage3-start
+       @[ -f libcpp/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in libcpp ; \
-       cd libcpp || exit 1; \
+       cd $(HOST_SUBDIR)/libcpp || exit 1; \
        case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libcpp"; \
+       libsrcdir="$$s/libcpp"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-libcpp
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-libcpp: all-stage3-libcpp
 all-stage3-libcpp: configure-stage3-libcpp
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libcpp && \
+       cd $(HOST_SUBDIR)/libcpp && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage3-libcpp: clean-stage3-libcpp
+clean-stage3-libcpp:
+       @[ -f libcpp/Makefile ] || [ -f stage3-libcpp/Makefile ] \
+         || exit 0 ; \
+       [ -f libcpp/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/libcpp && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-libcpp
+                 clean
 @endif libcpp-bootstrap
 
-maybe-configure-stage3-libbanshee:
-maybe-all-stage3-libbanshee:
-
-@if libbanshee-bootstrap
-maybe-configure-stage3-libbanshee: configure-stage3-libbanshee
-configure-stage3-libbanshee:  maybe-all-stage2-libbanshee 
-       $(MAKE) stage3-start
-       @if [ -f stage3-libbanshee/Makefile ] ; then \
-         $(STAMP) configure-stage3-libbanshee ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       echo Configuring stage 3 in libbanshee ; \
-       cd libbanshee || exit 1; \
-       case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-       esac; \
-       $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-libbanshee
 
-maybe-all-stage3-libbanshee: all-stage3-libbanshee
-all-stage3-libbanshee: configure-stage3-libbanshee
-       $(MAKE) stage3-start
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       cd libbanshee && \
-       $(MAKE) $(FLAGS_TO_PASS)  \
-               $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-libbanshee
-@endif libbanshee-bootstrap
+.PHONY: configure-stage3-libiberty maybe-configure-stage3-libiberty
+.PHONY: all-stage3-libiberty maybe-all-stage3-libiberty
+.PHONY: clean-stage3-libiberty maybe-clean-stage3-libiberty
 
 maybe-configure-stage3-libiberty:
 maybe-all-stage3-libiberty:
+maybe-clean-stage3-libiberty:
 
 @if libiberty-bootstrap
 maybe-configure-stage3-libiberty: configure-stage3-libiberty
-configure-stage3-libiberty:  maybe-all-stage2-libiberty 
-       $(MAKE) stage3-start
-       @if [ -f stage3-libiberty/Makefile ] ; then \
-         $(STAMP) configure-stage3-libiberty ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-libiberty:
+       @$(MAKE) stage3-start
+       @[ -f libiberty/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in libiberty ; \
-       cd libiberty || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libiberty"; \
+       libsrcdir="$$s/libiberty"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-libiberty
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-libiberty: all-stage3-libiberty
 all-stage3-libiberty: configure-stage3-libiberty
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libiberty && \
+       cd $(HOST_SUBDIR)/libiberty && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage3-libiberty: clean-stage3-libiberty
+clean-stage3-libiberty:
+       @[ -f libiberty/Makefile ] || [ -f stage3-libiberty/Makefile ] \
+         || exit 0 ; \
+       [ -f libiberty/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/libiberty && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-libiberty
+                 clean
 @endif libiberty-bootstrap
 
+
+.PHONY: configure-stage3-zlib maybe-configure-stage3-zlib
+.PHONY: all-stage3-zlib maybe-all-stage3-zlib
+.PHONY: clean-stage3-zlib maybe-clean-stage3-zlib
+
 maybe-configure-stage3-zlib:
 maybe-all-stage3-zlib:
+maybe-clean-stage3-zlib:
 
 @if zlib-bootstrap
 maybe-configure-stage3-zlib: configure-stage3-zlib
-configure-stage3-zlib:  maybe-all-stage2-zlib 
-       $(MAKE) stage3-start
-       @if [ -f stage3-zlib/Makefile ] ; then \
-         $(STAMP) configure-stage3-zlib ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage3-zlib:
+       @$(MAKE) stage3-start
+       @[ -f zlib/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 3 in zlib ; \
-       cd zlib || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/zlib"; \
+       libsrcdir="$$s/zlib"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage3-zlib
+         @stage2_werror_flag@ 
 
 maybe-all-stage3-zlib: all-stage3-zlib
 all-stage3-zlib: configure-stage3-zlib
-       $(MAKE) stage3-start
+       @$(MAKE) stage3-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd zlib && \
+       cd $(HOST_SUBDIR)/zlib && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage3-zlib
+                
+
+maybe-clean-stage3-zlib: clean-stage3-zlib
+clean-stage3-zlib:
+       @[ -f zlib/Makefile ] || [ -f stage3-zlib/Makefile ] \
+         || exit 0 ; \
+       [ -f zlib/Makefile ] || $(MAKE) stage3-start ; \
+       cd $(HOST_SUBDIR)/zlib && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                 clean
 @endif zlib-bootstrap
 
 
+
 # FIXME: Will not need to be conditional when toplevel bootstrap is the
 # only possibility, but now it conflicts with no-bootstrap rules
 @if gcc-bootstrap
 
-compare: all-stage3-gcc
-       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+compare:
+       @if test -f stage2-lean; then \
+         echo Cannot compare object files as stage 2 was deleted. ; \
+         exit 0 ; \
+       fi; \
+       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        rm -f .bad_compare ; \
@@ -30190,46 +32610,24 @@ compare: all-stage3-gcc
          true; \
        fi ; \
        $(STAMP) compare
+       @bootstrap_lean@-rm -rf stage2-* ; $(STAMP) stage2-lean
 
 
 
 .PHONY: bootstrap
-bootstrap: stage3-bubble  compare  all
-
+bootstrap: stage3-bubble compare all
 
-.PHONY: restage3 touch-stage3 distclean-stage3
 
-# Rules to wipe a stage and all the following ones, used for cleanstrap
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
 distclean-stage2:: distclean-stage3 
+.PHONY: distclean-stage3
 distclean-stage3::
        [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
-       rm -rf configure-stage3-* all-stage3-* stage3-* compare 
-
-# Rules to renew the timestamp on a stage and all the following ones
-touch-stage2:: touch-stage3 
-touch-stage3::
-       @case `echo configure-stage3-*` in \
-         'configure-stage3-*') ;; \
-         *) \
-           echo '$(STAMP)' configure-stage3-* && \
-           $(STAMP) configure-stage3-* ;; \
-       esac ; \
-       case `echo all-stage3-*` in \
-         'all-stage3-*') ;; \
-         *) \
-           echo '$(STAMP)' all-stage3-* && \
-           $(STAMP) all-stage3-* ;; \
-       esac
-
-# After building a stage, touch the following ones
-restage2:: touch-stage3 
-restage3::
-       rm -rf all-stage3-* compare 
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare 
+       rm -rf stage3-* compare 
 
 
 .PHONY: cleanstrap
-cleanstrap: distclean-stage1 bootstrap
+cleanstrap: distclean bootstrap
 
 @endif gcc-bootstrap
 
@@ -30237,110 +32635,152 @@ cleanstrap: distclean-stage1 bootstrap
 .PHONY: stage4-start stage4-end
 
 stage4-start::
-       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+       @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
        echo stage4 > stage_current ; \
-       echo stage4 > stage_last
+       echo stage4 > stage_last; \
+       $(mkinstalldirs) $(HOST_SUBDIR)
 @if bfd
-       [ -d stage4-bfd ] || mkdir stage4-bfd; \
-       set stage4-bfd bfd ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-bfd prev-bfd ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-bfd ] || \
+         mkdir stage4-bfd; \
+       set stage4-bfd bfd ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-bfd prev-bfd ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       [ -d stage4-opcodes ] || mkdir stage4-opcodes; \
-       set stage4-opcodes opcodes ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-opcodes ] || \
+         mkdir stage4-opcodes; \
+       set stage4-opcodes opcodes ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-opcodes prev-opcodes ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       [ -d stage4-binutils ] || mkdir stage4-binutils; \
-       set stage4-binutils binutils ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-binutils prev-binutils ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-binutils ] || \
+         mkdir stage4-binutils; \
+       set stage4-binutils binutils ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-binutils prev-binutils ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       [ -d stage4-gas ] || mkdir stage4-gas; \
-       set stage4-gas gas ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-gas prev-gas ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-gas ] || \
+         mkdir stage4-gas; \
+       set stage4-gas gas ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-gas prev-gas ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       [ -d stage4-gcc ] || mkdir stage4-gcc; \
-       set stage4-gcc gcc ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-gcc ] || \
+         mkdir stage4-gcc; \
+       set stage4-gcc gcc ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-gcc prev-gcc ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       [ -d stage4-intl ] || mkdir stage4-intl; \
-       set stage4-intl intl ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-intl prev-intl ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-intl ] || \
+         mkdir stage4-intl; \
+       set stage4-intl intl ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-intl prev-intl ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       [ -d stage4-ld ] || mkdir stage4-ld; \
-       set stage4-ld ld ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-ld prev-ld ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-ld ] || \
+         mkdir stage4-ld; \
+       set stage4-ld ld ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-ld prev-ld ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       [ -d stage4-libcpp ] || mkdir stage4-libcpp; \
-       set stage4-libcpp libcpp ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-libcpp ] || \
+         mkdir stage4-libcpp; \
+       set stage4-libcpp libcpp ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-libcpp prev-libcpp ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       [ -d stage4-libbanshee ] || mkdir stage4-libbanshee; \
-       set stage4-libbanshee libbanshee ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-libbanshee prev-libbanshee ; @CREATE_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       [ -d stage4-libiberty ] || mkdir stage4-libiberty; \
-       set stage4-libiberty libiberty ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-libiberty ] || \
+         mkdir stage4-libiberty; \
+       set stage4-libiberty libiberty ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-libiberty prev-libiberty ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       [ -d stage4-zlib ] || mkdir stage4-zlib; \
-       set stage4-zlib zlib ; @CREATE_LINK_TO_DIR@  ; \
-       set stage3-zlib prev-zlib ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stage4-zlib ] || \
+         mkdir stage4-zlib; \
+       set stage4-zlib zlib ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage3-zlib prev-zlib ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif zlib
 
 stage4-end::
-       rm -f stage_current
+       @rm -f stage_current
 @if bfd
-       set bfd stage4-bfd ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-bfd stage3-bfd ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set bfd stage4-bfd ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-bfd stage3-bfd ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       set opcodes stage4-opcodes ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-opcodes stage3-opcodes ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set opcodes stage4-opcodes ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-opcodes stage3-opcodes ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       set binutils stage4-binutils ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-binutils stage3-binutils ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set binutils stage4-binutils ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-binutils stage3-binutils ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       set gas stage4-gas ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gas stage3-gas ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gas stage4-gas ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gas stage3-gas ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       set gcc stage4-gcc ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gcc stage3-gcc ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gcc stage4-gcc ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gcc stage3-gcc ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       set intl stage4-intl ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-intl stage3-intl ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set intl stage4-intl ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-intl stage3-intl ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       set ld stage4-ld ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-ld stage3-ld ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set ld stage4-ld ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-ld stage3-ld ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       set libcpp stage4-libcpp ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libcpp stage3-libcpp ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libcpp stage4-libcpp ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libcpp stage3-libcpp ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       set libbanshee stage4-libbanshee ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libbanshee stage3-libbanshee ; @UNDO_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       set libiberty stage4-libiberty ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libiberty stage3-libiberty ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libiberty stage4-libiberty ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libiberty stage3-libiberty ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       set zlib stage4-zlib ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-zlib stage3-zlib ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set zlib stage4-zlib ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-zlib stage3-zlib ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif zlib
 
 # Bubble a bugfix through all the stages up to stage 4.  They
@@ -30348,551 +32788,571 @@ stage4-end::
 # be reconfigured as well.
 .PHONY: stage4-bubble
 stage4-bubble:: stage3-bubble
-       @case `echo all-stage4-*` in \
-         'all-stage4-*') ;; \
-         *) echo Remaking stage 4 ; rm -f all-stage4-* ;; \
-       esac ; \
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage4
+       @bootstrap_lean@-rm -rf stage2-* ; $(STAMP) stage2-lean
+       @if test -f stage4-lean || test -f stage3-lean  ; then \
+         echo Skipping rebuild of stage4 ; \
+       else \
+         $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage4; \
+       fi
 
-.PHONY: all-stage4
+.PHONY: all-stage4 clean-stage4
 all-stage4:     \
   maybe-all-stage4-bfd \
   maybe-all-stage4-opcodes \
-  maybe-all-stage4-binutils             \
+  maybe-all-stage4-binutils              \
   maybe-all-stage4-gas \
   maybe-all-stage4-gcc        \
   maybe-all-stage4-intl   \
   maybe-all-stage4-ld \
   maybe-all-stage4-libcpp  \
-  maybe-all-stage4-libbanshee \
   maybe-all-stage4-libiberty                        \
-  maybe-all-stage4-zlib       
-
+  maybe-all-stage4-zlib        
+
+do-clean: clean-stage4
+clean-stage4:     \
+  maybe-clean-stage4-bfd \
+  maybe-clean-stage4-opcodes \
+  maybe-clean-stage4-binutils              \
+  maybe-clean-stage4-gas \
+  maybe-clean-stage4-gcc        \
+  maybe-clean-stage4-intl   \
+  maybe-clean-stage4-ld \
+  maybe-clean-stage4-libcpp  \
+  maybe-clean-stage4-libiberty                        \
+  maybe-clean-stage4-zlib        
+
+
+.PHONY: configure-stage4-bfd maybe-configure-stage4-bfd
+.PHONY: all-stage4-bfd maybe-all-stage4-bfd
+.PHONY: clean-stage4-bfd maybe-clean-stage4-bfd
 
 maybe-configure-stage4-bfd:
 maybe-all-stage4-bfd:
+maybe-clean-stage4-bfd:
 
 @if bfd-bootstrap
 maybe-configure-stage4-bfd: configure-stage4-bfd
-configure-stage4-bfd:  maybe-all-stage3-bfd 
-       $(MAKE) stage4-start
-       @if [ -f stage4-bfd/Makefile ] ; then \
-         $(STAMP) configure-stage4-bfd ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-bfd:
+       @$(MAKE) stage4-start
+       @[ -f bfd/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in bfd ; \
-       cd bfd || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bfd"; \
+       libsrcdir="$$s/bfd"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-bfd
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-bfd: all-stage4-bfd
 all-stage4-bfd: configure-stage4-bfd
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd bfd && \
+       cd $(HOST_SUBDIR)/bfd && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-bfd
+                
+
+maybe-clean-stage4-bfd: clean-stage4-bfd
+clean-stage4-bfd:
+       @[ -f bfd/Makefile ] || [ -f stage4-bfd/Makefile ] \
+         || exit 0 ; \
+       [ -f bfd/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/bfd && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                 clean
 @endif bfd-bootstrap
 
+
+.PHONY: configure-stage4-opcodes maybe-configure-stage4-opcodes
+.PHONY: all-stage4-opcodes maybe-all-stage4-opcodes
+.PHONY: clean-stage4-opcodes maybe-clean-stage4-opcodes
+
 maybe-configure-stage4-opcodes:
 maybe-all-stage4-opcodes:
+maybe-clean-stage4-opcodes:
 
 @if opcodes-bootstrap
 maybe-configure-stage4-opcodes: configure-stage4-opcodes
-configure-stage4-opcodes:  maybe-all-stage3-opcodes 
-       $(MAKE) stage4-start
-       @if [ -f stage4-opcodes/Makefile ] ; then \
-         $(STAMP) configure-stage4-opcodes ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-opcodes:
+       @$(MAKE) stage4-start
+       @[ -f opcodes/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in opcodes ; \
-       cd opcodes || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/opcodes"; \
+       libsrcdir="$$s/opcodes"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-opcodes
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-opcodes: all-stage4-opcodes
 all-stage4-opcodes: configure-stage4-opcodes
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd opcodes && \
+       cd $(HOST_SUBDIR)/opcodes && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage4-opcodes: clean-stage4-opcodes
+clean-stage4-opcodes:
+       @[ -f opcodes/Makefile ] || [ -f stage4-opcodes/Makefile ] \
+         || exit 0 ; \
+       [ -f opcodes/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/opcodes && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-opcodes
+                 clean
 @endif opcodes-bootstrap
 
+
+.PHONY: configure-stage4-binutils maybe-configure-stage4-binutils
+.PHONY: all-stage4-binutils maybe-all-stage4-binutils
+.PHONY: clean-stage4-binutils maybe-clean-stage4-binutils
+
 maybe-configure-stage4-binutils:
 maybe-all-stage4-binutils:
+maybe-clean-stage4-binutils:
 
 @if binutils-bootstrap
 maybe-configure-stage4-binutils: configure-stage4-binutils
-configure-stage4-binutils:  maybe-all-stage3-binutils 
-       $(MAKE) stage4-start
-       @if [ -f stage4-binutils/Makefile ] ; then \
-         $(STAMP) configure-stage4-binutils ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-binutils:
+       @$(MAKE) stage4-start
+       @[ -f binutils/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in binutils ; \
-       cd binutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/binutils"; \
+       libsrcdir="$$s/binutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-binutils
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-binutils: all-stage4-binutils
 all-stage4-binutils: configure-stage4-binutils
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd binutils && \
+       cd $(HOST_SUBDIR)/binutils && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-binutils
+                
+
+maybe-clean-stage4-binutils: clean-stage4-binutils
+clean-stage4-binutils:
+       @[ -f binutils/Makefile ] || [ -f stage4-binutils/Makefile ] \
+         || exit 0 ; \
+       [ -f binutils/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/binutils && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                 clean
 @endif binutils-bootstrap
 
+
+.PHONY: configure-stage4-gas maybe-configure-stage4-gas
+.PHONY: all-stage4-gas maybe-all-stage4-gas
+.PHONY: clean-stage4-gas maybe-clean-stage4-gas
+
 maybe-configure-stage4-gas:
 maybe-all-stage4-gas:
+maybe-clean-stage4-gas:
 
 @if gas-bootstrap
 maybe-configure-stage4-gas: configure-stage4-gas
-configure-stage4-gas:  maybe-all-stage3-gas 
-       $(MAKE) stage4-start
-       @if [ -f stage4-gas/Makefile ] ; then \
-         $(STAMP) configure-stage4-gas ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-gas:
+       @$(MAKE) stage4-start
+       @[ -f gas/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in gas ; \
-       cd gas || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gas"; \
+       libsrcdir="$$s/gas"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-gas
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-gas: all-stage4-gas
 all-stage4-gas: configure-stage4-gas
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gas && \
+       cd $(HOST_SUBDIR)/gas && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage4-gas: clean-stage4-gas
+clean-stage4-gas:
+       @[ -f gas/Makefile ] || [ -f stage4-gas/Makefile ] \
+         || exit 0 ; \
+       [ -f gas/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/gas && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-gas
+                 clean
 @endif gas-bootstrap
 
+
+.PHONY: configure-stage4-gcc maybe-configure-stage4-gcc
+.PHONY: all-stage4-gcc maybe-all-stage4-gcc
+.PHONY: clean-stage4-gcc maybe-clean-stage4-gcc
+
 maybe-configure-stage4-gcc:
 maybe-all-stage4-gcc:
+maybe-clean-stage4-gcc:
 
 @if gcc-bootstrap
 maybe-configure-stage4-gcc: configure-stage4-gcc
-configure-stage4-gcc:  maybe-all-stage3-gcc 
-       $(MAKE) stage4-start
-       @if [ -f stage4-gcc/Makefile ] ; then \
-         $(STAMP) configure-stage4-gcc ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-gcc:
+       @$(MAKE) stage4-start
+       @[ -f gcc/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in gcc ; \
-       cd gcc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gcc"; \
+       libsrcdir="$$s/gcc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-gcc
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-gcc: all-stage4-gcc
 all-stage4-gcc: configure-stage4-gcc
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gcc && \
+       cd $(HOST_SUBDIR)/gcc && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                $(EXTRA_GCC_FLAGS) && \
-       $(STAMP) ../all-stage4-gcc
+                $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stage4-gcc: clean-stage4-gcc
+clean-stage4-gcc:
+       @[ -f gcc/Makefile ] || [ -f stage4-gcc/Makefile ] \
+         || exit 0 ; \
+       [ -f gcc/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/gcc && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                $(EXTRA_GCC_FLAGS) clean
 @endif gcc-bootstrap
 
+
+.PHONY: configure-stage4-intl maybe-configure-stage4-intl
+.PHONY: all-stage4-intl maybe-all-stage4-intl
+.PHONY: clean-stage4-intl maybe-clean-stage4-intl
+
 maybe-configure-stage4-intl:
 maybe-all-stage4-intl:
+maybe-clean-stage4-intl:
 
 @if intl-bootstrap
 maybe-configure-stage4-intl: configure-stage4-intl
-configure-stage4-intl:  maybe-all-stage3-intl 
-       $(MAKE) stage4-start
-       @if [ -f stage4-intl/Makefile ] ; then \
-         $(STAMP) configure-stage4-intl ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-intl:
+       @$(MAKE) stage4-start
+       @[ -f intl/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in intl ; \
-       cd intl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/intl"; \
+       libsrcdir="$$s/intl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-intl
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-intl: all-stage4-intl
 all-stage4-intl: configure-stage4-intl
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd intl && \
+       cd $(HOST_SUBDIR)/intl && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage4-intl: clean-stage4-intl
+clean-stage4-intl:
+       @[ -f intl/Makefile ] || [ -f stage4-intl/Makefile ] \
+         || exit 0 ; \
+       [ -f intl/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/intl && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-intl
+                 clean
 @endif intl-bootstrap
 
+
+.PHONY: configure-stage4-ld maybe-configure-stage4-ld
+.PHONY: all-stage4-ld maybe-all-stage4-ld
+.PHONY: clean-stage4-ld maybe-clean-stage4-ld
+
 maybe-configure-stage4-ld:
 maybe-all-stage4-ld:
+maybe-clean-stage4-ld:
 
 @if ld-bootstrap
 maybe-configure-stage4-ld: configure-stage4-ld
-configure-stage4-ld:  maybe-all-stage3-ld 
-       $(MAKE) stage4-start
-       @if [ -f stage4-ld/Makefile ] ; then \
-         $(STAMP) configure-stage4-ld ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-ld:
+       @$(MAKE) stage4-start
+       @[ -f ld/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in ld ; \
-       cd ld || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/ld"; \
+       libsrcdir="$$s/ld"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-ld
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-ld: all-stage4-ld
 all-stage4-ld: configure-stage4-ld
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd ld && \
+       cd $(HOST_SUBDIR)/ld && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-ld
+                
+
+maybe-clean-stage4-ld: clean-stage4-ld
+clean-stage4-ld:
+       @[ -f ld/Makefile ] || [ -f stage4-ld/Makefile ] \
+         || exit 0 ; \
+       [ -f ld/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/ld && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                 clean
 @endif ld-bootstrap
 
+
+.PHONY: configure-stage4-libcpp maybe-configure-stage4-libcpp
+.PHONY: all-stage4-libcpp maybe-all-stage4-libcpp
+.PHONY: clean-stage4-libcpp maybe-clean-stage4-libcpp
+
 maybe-configure-stage4-libcpp:
 maybe-all-stage4-libcpp:
+maybe-clean-stage4-libcpp:
 
 @if libcpp-bootstrap
 maybe-configure-stage4-libcpp: configure-stage4-libcpp
-configure-stage4-libcpp:  maybe-all-stage3-libcpp 
-       $(MAKE) stage4-start
-       @if [ -f stage4-libcpp/Makefile ] ; then \
-         $(STAMP) configure-stage4-libcpp ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-libcpp:
+       @$(MAKE) stage4-start
+       @[ -f libcpp/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in libcpp ; \
-       cd libcpp || exit 1; \
+       cd $(HOST_SUBDIR)/libcpp || exit 1; \
        case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libcpp"; \
+       libsrcdir="$$s/libcpp"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-libcpp
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-libcpp: all-stage4-libcpp
 all-stage4-libcpp: configure-stage4-libcpp
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libcpp && \
+       cd $(HOST_SUBDIR)/libcpp && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage4-libcpp: clean-stage4-libcpp
+clean-stage4-libcpp:
+       @[ -f libcpp/Makefile ] || [ -f stage4-libcpp/Makefile ] \
+         || exit 0 ; \
+       [ -f libcpp/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/libcpp && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-libcpp
+                 clean
 @endif libcpp-bootstrap
 
-maybe-configure-stage4-libbanshee:
-maybe-all-stage4-libbanshee:
-
-@if libbanshee-bootstrap
-maybe-configure-stage4-libbanshee: configure-stage4-libbanshee
-configure-stage4-libbanshee:  maybe-all-stage3-libbanshee 
-       $(MAKE) stage4-start
-       @if [ -f stage4-libbanshee/Makefile ] ; then \
-         $(STAMP) configure-stage4-libbanshee ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       echo Configuring stage 4 in libbanshee ; \
-       cd libbanshee || exit 1; \
-       case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-       esac; \
-       $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-libbanshee
 
-maybe-all-stage4-libbanshee: all-stage4-libbanshee
-all-stage4-libbanshee: configure-stage4-libbanshee
-       $(MAKE) stage4-start
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       cd libbanshee && \
-       $(MAKE) $(FLAGS_TO_PASS)  \
-               $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-libbanshee
-@endif libbanshee-bootstrap
+.PHONY: configure-stage4-libiberty maybe-configure-stage4-libiberty
+.PHONY: all-stage4-libiberty maybe-all-stage4-libiberty
+.PHONY: clean-stage4-libiberty maybe-clean-stage4-libiberty
 
 maybe-configure-stage4-libiberty:
 maybe-all-stage4-libiberty:
+maybe-clean-stage4-libiberty:
 
 @if libiberty-bootstrap
 maybe-configure-stage4-libiberty: configure-stage4-libiberty
-configure-stage4-libiberty:  maybe-all-stage3-libiberty 
-       $(MAKE) stage4-start
-       @if [ -f stage4-libiberty/Makefile ] ; then \
-         $(STAMP) configure-stage4-libiberty ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-libiberty:
+       @$(MAKE) stage4-start
+       @[ -f libiberty/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in libiberty ; \
-       cd libiberty || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libiberty"; \
+       libsrcdir="$$s/libiberty"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-libiberty
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-libiberty: all-stage4-libiberty
 all-stage4-libiberty: configure-stage4-libiberty
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libiberty && \
+       cd $(HOST_SUBDIR)/libiberty && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage4-libiberty: clean-stage4-libiberty
+clean-stage4-libiberty:
+       @[ -f libiberty/Makefile ] || [ -f stage4-libiberty/Makefile ] \
+         || exit 0 ; \
+       [ -f libiberty/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/libiberty && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-libiberty
+                 clean
 @endif libiberty-bootstrap
 
+
+.PHONY: configure-stage4-zlib maybe-configure-stage4-zlib
+.PHONY: all-stage4-zlib maybe-all-stage4-zlib
+.PHONY: clean-stage4-zlib maybe-clean-stage4-zlib
+
 maybe-configure-stage4-zlib:
 maybe-all-stage4-zlib:
+maybe-clean-stage4-zlib:
 
 @if zlib-bootstrap
 maybe-configure-stage4-zlib: configure-stage4-zlib
-configure-stage4-zlib:  maybe-all-stage3-zlib 
-       $(MAKE) stage4-start
-       @if [ -f stage4-zlib/Makefile ] ; then \
-         $(STAMP) configure-stage4-zlib ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stage4-zlib:
+       @$(MAKE) stage4-start
+       @[ -f zlib/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage 4 in zlib ; \
-       cd zlib || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/zlib"; \
+       libsrcdir="$$s/zlib"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stage4-zlib
+         @stage2_werror_flag@ 
 
 maybe-all-stage4-zlib: all-stage4-zlib
 all-stage4-zlib: configure-stage4-zlib
-       $(MAKE) stage4-start
+       @$(MAKE) stage4-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd zlib && \
+       cd $(HOST_SUBDIR)/zlib && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+                
+
+maybe-clean-stage4-zlib: clean-stage4-zlib
+clean-stage4-zlib:
+       @[ -f zlib/Makefile ] || [ -f stage4-zlib/Makefile ] \
+         || exit 0 ; \
+       [ -f zlib/Makefile ] || $(MAKE) stage4-start ; \
+       cd $(HOST_SUBDIR)/zlib && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-                 && \
-       $(STAMP) ../all-stage4-zlib
+                 clean
 @endif zlib-bootstrap
 
 
+
 # FIXME: Will not need to be conditional when toplevel bootstrap is the
 # only possibility, but now it conflicts with no-bootstrap rules
 @if gcc-bootstrap
 
-compare3: all-stage4-gcc
-       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+compare3:
+       @if test -f stage3-lean; then \
+         echo Cannot compare object files as stage 3 was deleted. ; \
+         exit 0 ; \
+       fi; \
+       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
        rm -f .bad_compare ; \
@@ -30912,42 +33372,20 @@ compare3: all-stage4-gcc
          true; \
        fi ; \
        $(STAMP) compare3
+       @bootstrap_lean@-rm -rf stage3-* ; $(STAMP) stage3-lean
 
 
 
 .PHONY: bootstrap4
-bootstrap4: stage4-bubble  compare3  all
+bootstrap4: stage4-bubble compare3 all
 
 
-.PHONY: restage4 touch-stage4 distclean-stage4
-
-# Rules to wipe a stage and all the following ones, used for cleanstrap
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
 distclean-stage3:: distclean-stage4 
+.PHONY: distclean-stage4
 distclean-stage4::
        [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
-       rm -rf configure-stage4-* all-stage4-* stage4-* compare3 
-
-# Rules to renew the timestamp on a stage and all the following ones
-touch-stage3:: touch-stage4 
-touch-stage4::
-       @case `echo configure-stage4-*` in \
-         'configure-stage4-*') ;; \
-         *) \
-           echo '$(STAMP)' configure-stage4-* && \
-           $(STAMP) configure-stage4-* ;; \
-       esac ; \
-       case `echo all-stage4-*` in \
-         'all-stage4-*') ;; \
-         *) \
-           echo '$(STAMP)' all-stage4-* && \
-           $(STAMP) all-stage4-* ;; \
-       esac
-
-# After building a stage, touch the following ones
-restage3:: touch-stage4 
-restage4::
-       rm -rf all-stage4-* compare3 
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS) compare3 
+       rm -rf stage4-* compare3 
 
 
 @endif gcc-bootstrap
@@ -30956,110 +33394,152 @@ restage4::
 .PHONY: stageprofile-start stageprofile-end
 
 stageprofile-start::
-       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+       @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
        echo stageprofile > stage_current ; \
-       echo stageprofile > stage_last
+       echo stageprofile > stage_last; \
+       $(mkinstalldirs) $(HOST_SUBDIR)
 @if bfd
-       [ -d stageprofile-bfd ] || mkdir stageprofile-bfd; \
-       set stageprofile-bfd bfd ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-bfd prev-bfd ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-bfd ] || \
+         mkdir stageprofile-bfd; \
+       set stageprofile-bfd bfd ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-bfd prev-bfd ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       [ -d stageprofile-opcodes ] || mkdir stageprofile-opcodes; \
-       set stageprofile-opcodes opcodes ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-opcodes ] || \
+         mkdir stageprofile-opcodes; \
+       set stageprofile-opcodes opcodes ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-opcodes prev-opcodes ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       [ -d stageprofile-binutils ] || mkdir stageprofile-binutils; \
-       set stageprofile-binutils binutils ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-binutils prev-binutils ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-binutils ] || \
+         mkdir stageprofile-binutils; \
+       set stageprofile-binutils binutils ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-binutils prev-binutils ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       [ -d stageprofile-gas ] || mkdir stageprofile-gas; \
-       set stageprofile-gas gas ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-gas prev-gas ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-gas ] || \
+         mkdir stageprofile-gas; \
+       set stageprofile-gas gas ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-gas prev-gas ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       [ -d stageprofile-gcc ] || mkdir stageprofile-gcc; \
-       set stageprofile-gcc gcc ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-gcc ] || \
+         mkdir stageprofile-gcc; \
+       set stageprofile-gcc gcc ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-gcc prev-gcc ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       [ -d stageprofile-intl ] || mkdir stageprofile-intl; \
-       set stageprofile-intl intl ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-intl prev-intl ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-intl ] || \
+         mkdir stageprofile-intl; \
+       set stageprofile-intl intl ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-intl prev-intl ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       [ -d stageprofile-ld ] || mkdir stageprofile-ld; \
-       set stageprofile-ld ld ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-ld prev-ld ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-ld ] || \
+         mkdir stageprofile-ld; \
+       set stageprofile-ld ld ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-ld prev-ld ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       [ -d stageprofile-libcpp ] || mkdir stageprofile-libcpp; \
-       set stageprofile-libcpp libcpp ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-libcpp ] || \
+         mkdir stageprofile-libcpp; \
+       set stageprofile-libcpp libcpp ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-libcpp prev-libcpp ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       [ -d stageprofile-libbanshee ] || mkdir stageprofile-libbanshee; \
-       set stageprofile-libbanshee libbanshee ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-libbanshee prev-libbanshee ; @CREATE_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       [ -d stageprofile-libiberty ] || mkdir stageprofile-libiberty; \
-       set stageprofile-libiberty libiberty ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-libiberty ] || \
+         mkdir stageprofile-libiberty; \
+       set stageprofile-libiberty libiberty ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-libiberty prev-libiberty ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       [ -d stageprofile-zlib ] || mkdir stageprofile-zlib; \
-       set stageprofile-zlib zlib ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-zlib prev-zlib ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stageprofile-zlib ] || \
+         mkdir stageprofile-zlib; \
+       set stageprofile-zlib zlib ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-zlib prev-zlib ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif zlib
 
 stageprofile-end::
-       rm -f stage_current
+       @rm -f stage_current
 @if bfd
-       set bfd stageprofile-bfd ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-bfd stage1-bfd ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set bfd stageprofile-bfd ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-bfd stage1-bfd ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       set opcodes stageprofile-opcodes ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-opcodes stage1-opcodes ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set opcodes stageprofile-opcodes ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-opcodes stage1-opcodes ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       set binutils stageprofile-binutils ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-binutils stage1-binutils ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set binutils stageprofile-binutils ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-binutils stage1-binutils ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       set gas stageprofile-gas ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gas stage1-gas ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gas stageprofile-gas ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gas stage1-gas ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       set gcc stageprofile-gcc ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gcc stageprofile-gcc ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gcc stage1-gcc ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       set intl stageprofile-intl ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-intl stage1-intl ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set intl stageprofile-intl ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-intl stage1-intl ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       set ld stageprofile-ld ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-ld stage1-ld ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set ld stageprofile-ld ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-ld stage1-ld ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       set libcpp stageprofile-libcpp ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libcpp stage1-libcpp ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libcpp stageprofile-libcpp ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libcpp stage1-libcpp ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       set libbanshee stageprofile-libbanshee ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libbanshee stage1-libbanshee ; @UNDO_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       set libiberty stageprofile-libiberty ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libiberty stage1-libiberty ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libiberty stageprofile-libiberty ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libiberty stage1-libiberty ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       set zlib stageprofile-zlib ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-zlib stage1-zlib ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set zlib stageprofile-zlib ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-zlib stage1-zlib ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif zlib
 
 # Bubble a bugfix through all the stages up to stage profile.  They
@@ -31067,545 +33547,560 @@ stageprofile-end::
 # be reconfigured as well.
 .PHONY: stageprofile-bubble
 stageprofile-bubble:: stage1-bubble
-       @case `echo all-stageprofile-*` in \
-         'all-stageprofile-*') ;; \
-         *) echo Remaking stage profile ; rm -f all-stageprofile-* ;; \
-       esac ; \
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stageprofile
+       @if test -f stageprofile-lean || test -f stage1-lean  ; then \
+         echo Skipping rebuild of stageprofile ; \
+       else \
+         $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stageprofile; \
+       fi
 
-.PHONY: all-stageprofile
+.PHONY: all-stageprofile clean-stageprofile
 all-stageprofile:     \
   maybe-all-stageprofile-bfd \
   maybe-all-stageprofile-opcodes \
-  maybe-all-stageprofile-binutils             \
+  maybe-all-stageprofile-binutils              \
   maybe-all-stageprofile-gas \
   maybe-all-stageprofile-gcc        \
   maybe-all-stageprofile-intl   \
   maybe-all-stageprofile-ld \
   maybe-all-stageprofile-libcpp  \
-  maybe-all-stageprofile-libbanshee \
   maybe-all-stageprofile-libiberty                        \
-  maybe-all-stageprofile-zlib       
-
+  maybe-all-stageprofile-zlib        
+
+do-clean: clean-stageprofile
+clean-stageprofile:     \
+  maybe-clean-stageprofile-bfd \
+  maybe-clean-stageprofile-opcodes \
+  maybe-clean-stageprofile-binutils              \
+  maybe-clean-stageprofile-gas \
+  maybe-clean-stageprofile-gcc        \
+  maybe-clean-stageprofile-intl   \
+  maybe-clean-stageprofile-ld \
+  maybe-clean-stageprofile-libcpp  \
+  maybe-clean-stageprofile-libiberty                        \
+  maybe-clean-stageprofile-zlib        
+
+
+.PHONY: configure-stageprofile-bfd maybe-configure-stageprofile-bfd
+.PHONY: all-stageprofile-bfd maybe-all-stageprofile-bfd
+.PHONY: clean-stageprofile-bfd maybe-clean-stageprofile-bfd
 
 maybe-configure-stageprofile-bfd:
 maybe-all-stageprofile-bfd:
+maybe-clean-stageprofile-bfd:
 
 @if bfd-bootstrap
 maybe-configure-stageprofile-bfd: configure-stageprofile-bfd
-configure-stageprofile-bfd:  maybe-all-stage1-bfd 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-bfd/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-bfd ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-bfd:
+       @$(MAKE) stageprofile-start
+       @[ -f bfd/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in bfd ; \
-       cd bfd || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bfd"; \
+       libsrcdir="$$s/bfd"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-bfd
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-bfd: all-stageprofile-bfd
 all-stageprofile-bfd: configure-stageprofile-bfd
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd bfd && \
+       cd $(HOST_SUBDIR)/bfd && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" 
+
+maybe-clean-stageprofile-bfd: clean-stageprofile-bfd
+clean-stageprofile-bfd:
+       @[ -f bfd/Makefile ] || [ -f stageprofile-bfd/Makefile ] \
+         || exit 0 ; \
+       [ -f bfd/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/bfd && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-bfd
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
 @endif bfd-bootstrap
 
+
+.PHONY: configure-stageprofile-opcodes maybe-configure-stageprofile-opcodes
+.PHONY: all-stageprofile-opcodes maybe-all-stageprofile-opcodes
+.PHONY: clean-stageprofile-opcodes maybe-clean-stageprofile-opcodes
+
 maybe-configure-stageprofile-opcodes:
 maybe-all-stageprofile-opcodes:
+maybe-clean-stageprofile-opcodes:
 
 @if opcodes-bootstrap
 maybe-configure-stageprofile-opcodes: configure-stageprofile-opcodes
-configure-stageprofile-opcodes:  maybe-all-stage1-opcodes 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-opcodes/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-opcodes ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-opcodes:
+       @$(MAKE) stageprofile-start
+       @[ -f opcodes/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in opcodes ; \
-       cd opcodes || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/opcodes"; \
+       libsrcdir="$$s/opcodes"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-opcodes
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-opcodes: all-stageprofile-opcodes
 all-stageprofile-opcodes: configure-stageprofile-opcodes
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd opcodes && \
+       cd $(HOST_SUBDIR)/opcodes && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" 
+
+maybe-clean-stageprofile-opcodes: clean-stageprofile-opcodes
+clean-stageprofile-opcodes:
+       @[ -f opcodes/Makefile ] || [ -f stageprofile-opcodes/Makefile ] \
+         || exit 0 ; \
+       [ -f opcodes/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/opcodes && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-opcodes
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
 @endif opcodes-bootstrap
 
+
+.PHONY: configure-stageprofile-binutils maybe-configure-stageprofile-binutils
+.PHONY: all-stageprofile-binutils maybe-all-stageprofile-binutils
+.PHONY: clean-stageprofile-binutils maybe-clean-stageprofile-binutils
+
 maybe-configure-stageprofile-binutils:
 maybe-all-stageprofile-binutils:
+maybe-clean-stageprofile-binutils:
 
 @if binutils-bootstrap
 maybe-configure-stageprofile-binutils: configure-stageprofile-binutils
-configure-stageprofile-binutils:  maybe-all-stage1-binutils 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-binutils/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-binutils ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-binutils:
+       @$(MAKE) stageprofile-start
+       @[ -f binutils/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in binutils ; \
-       cd binutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/binutils"; \
+       libsrcdir="$$s/binutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-binutils
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-binutils: all-stageprofile-binutils
 all-stageprofile-binutils: configure-stageprofile-binutils
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd binutils && \
+       cd $(HOST_SUBDIR)/binutils && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" 
+
+maybe-clean-stageprofile-binutils: clean-stageprofile-binutils
+clean-stageprofile-binutils:
+       @[ -f binutils/Makefile ] || [ -f stageprofile-binutils/Makefile ] \
+         || exit 0 ; \
+       [ -f binutils/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/binutils && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-binutils
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
 @endif binutils-bootstrap
 
+
+.PHONY: configure-stageprofile-gas maybe-configure-stageprofile-gas
+.PHONY: all-stageprofile-gas maybe-all-stageprofile-gas
+.PHONY: clean-stageprofile-gas maybe-clean-stageprofile-gas
+
 maybe-configure-stageprofile-gas:
 maybe-all-stageprofile-gas:
+maybe-clean-stageprofile-gas:
 
 @if gas-bootstrap
 maybe-configure-stageprofile-gas: configure-stageprofile-gas
-configure-stageprofile-gas:  maybe-all-stage1-gas 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-gas/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-gas ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-gas:
+       @$(MAKE) stageprofile-start
+       @[ -f gas/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in gas ; \
-       cd gas || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gas"; \
+       libsrcdir="$$s/gas"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-gas
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-gas: all-stageprofile-gas
 all-stageprofile-gas: configure-stageprofile-gas
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gas && \
+       cd $(HOST_SUBDIR)/gas && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" 
+
+maybe-clean-stageprofile-gas: clean-stageprofile-gas
+clean-stageprofile-gas:
+       @[ -f gas/Makefile ] || [ -f stageprofile-gas/Makefile ] \
+         || exit 0 ; \
+       [ -f gas/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/gas && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-gas
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
 @endif gas-bootstrap
 
+
+.PHONY: configure-stageprofile-gcc maybe-configure-stageprofile-gcc
+.PHONY: all-stageprofile-gcc maybe-all-stageprofile-gcc
+.PHONY: clean-stageprofile-gcc maybe-clean-stageprofile-gcc
+
 maybe-configure-stageprofile-gcc:
 maybe-all-stageprofile-gcc:
+maybe-clean-stageprofile-gcc:
 
 @if gcc-bootstrap
 maybe-configure-stageprofile-gcc: configure-stageprofile-gcc
-configure-stageprofile-gcc:  maybe-all-stage1-gcc 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-gcc/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-gcc ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-gcc:
+       @$(MAKE) stageprofile-start
+       @[ -f gcc/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in gcc ; \
-       cd gcc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gcc"; \
+       libsrcdir="$$s/gcc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-gcc
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-gcc: all-stageprofile-gcc
 all-stageprofile-gcc: configure-stageprofile-gcc
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gcc && \
+       cd $(HOST_SUBDIR)/gcc && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stageprofile-gcc: clean-stageprofile-gcc
+clean-stageprofile-gcc:
+       @[ -f gcc/Makefile ] || [ -f stageprofile-gcc/Makefile ] \
+         || exit 0 ; \
+       [ -f gcc/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/gcc && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(EXTRA_GCC_FLAGS) && \
-       $(STAMP) ../all-stageprofile-gcc
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(EXTRA_GCC_FLAGS) clean
 @endif gcc-bootstrap
 
+
+.PHONY: configure-stageprofile-intl maybe-configure-stageprofile-intl
+.PHONY: all-stageprofile-intl maybe-all-stageprofile-intl
+.PHONY: clean-stageprofile-intl maybe-clean-stageprofile-intl
+
 maybe-configure-stageprofile-intl:
 maybe-all-stageprofile-intl:
+maybe-clean-stageprofile-intl:
 
 @if intl-bootstrap
 maybe-configure-stageprofile-intl: configure-stageprofile-intl
-configure-stageprofile-intl:  maybe-all-stage1-intl 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-intl/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-intl ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-intl:
+       @$(MAKE) stageprofile-start
+       @[ -f intl/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in intl ; \
-       cd intl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/intl"; \
+       libsrcdir="$$s/intl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-intl
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-intl: all-stageprofile-intl
 all-stageprofile-intl: configure-stageprofile-intl
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd intl && \
+       cd $(HOST_SUBDIR)/intl && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" 
+
+maybe-clean-stageprofile-intl: clean-stageprofile-intl
+clean-stageprofile-intl:
+       @[ -f intl/Makefile ] || [ -f stageprofile-intl/Makefile ] \
+         || exit 0 ; \
+       [ -f intl/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/intl && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-intl
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
 @endif intl-bootstrap
 
+
+.PHONY: configure-stageprofile-ld maybe-configure-stageprofile-ld
+.PHONY: all-stageprofile-ld maybe-all-stageprofile-ld
+.PHONY: clean-stageprofile-ld maybe-clean-stageprofile-ld
+
 maybe-configure-stageprofile-ld:
 maybe-all-stageprofile-ld:
+maybe-clean-stageprofile-ld:
 
 @if ld-bootstrap
 maybe-configure-stageprofile-ld: configure-stageprofile-ld
-configure-stageprofile-ld:  maybe-all-stage1-ld 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-ld/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-ld ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-ld:
+       @$(MAKE) stageprofile-start
+       @[ -f ld/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in ld ; \
-       cd ld || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/ld"; \
+       libsrcdir="$$s/ld"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-ld
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-ld: all-stageprofile-ld
 all-stageprofile-ld: configure-stageprofile-ld
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd ld && \
+       cd $(HOST_SUBDIR)/ld && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" 
+
+maybe-clean-stageprofile-ld: clean-stageprofile-ld
+clean-stageprofile-ld:
+       @[ -f ld/Makefile ] || [ -f stageprofile-ld/Makefile ] \
+         || exit 0 ; \
+       [ -f ld/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/ld && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-ld
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
 @endif ld-bootstrap
 
+
+.PHONY: configure-stageprofile-libcpp maybe-configure-stageprofile-libcpp
+.PHONY: all-stageprofile-libcpp maybe-all-stageprofile-libcpp
+.PHONY: clean-stageprofile-libcpp maybe-clean-stageprofile-libcpp
+
 maybe-configure-stageprofile-libcpp:
 maybe-all-stageprofile-libcpp:
+maybe-clean-stageprofile-libcpp:
 
 @if libcpp-bootstrap
 maybe-configure-stageprofile-libcpp: configure-stageprofile-libcpp
-configure-stageprofile-libcpp:  maybe-all-stage1-libcpp 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-libcpp/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-libcpp ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-libcpp:
+       @$(MAKE) stageprofile-start
+       @[ -f libcpp/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in libcpp ; \
-       cd libcpp || exit 1; \
+       cd $(HOST_SUBDIR)/libcpp || exit 1; \
        case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libcpp"; \
+       libsrcdir="$$s/libcpp"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-libcpp
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-libcpp: all-stageprofile-libcpp
 all-stageprofile-libcpp: configure-stageprofile-libcpp
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libcpp && \
+       cd $(HOST_SUBDIR)/libcpp && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" 
+
+maybe-clean-stageprofile-libcpp: clean-stageprofile-libcpp
+clean-stageprofile-libcpp:
+       @[ -f libcpp/Makefile ] || [ -f stageprofile-libcpp/Makefile ] \
+         || exit 0 ; \
+       [ -f libcpp/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/libcpp && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-libcpp
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
 @endif libcpp-bootstrap
 
-maybe-configure-stageprofile-libbanshee:
-maybe-all-stageprofile-libbanshee:
-
-@if libbanshee-bootstrap
-maybe-configure-stageprofile-libbanshee: configure-stageprofile-libbanshee
-configure-stageprofile-libbanshee:  maybe-all-stage1-libbanshee 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-libbanshee/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-libbanshee ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       echo Configuring stage profile in libbanshee ; \
-       cd libbanshee || exit 1; \
-       case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-       esac; \
-       $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-libbanshee
 
-maybe-all-stageprofile-libbanshee: all-stageprofile-libbanshee
-all-stageprofile-libbanshee: configure-stageprofile-libbanshee
-       $(MAKE) stageprofile-start
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       cd libbanshee && \
-       $(MAKE) $(FLAGS_TO_PASS)  \
-               $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-libbanshee
-@endif libbanshee-bootstrap
+.PHONY: configure-stageprofile-libiberty maybe-configure-stageprofile-libiberty
+.PHONY: all-stageprofile-libiberty maybe-all-stageprofile-libiberty
+.PHONY: clean-stageprofile-libiberty maybe-clean-stageprofile-libiberty
 
 maybe-configure-stageprofile-libiberty:
 maybe-all-stageprofile-libiberty:
+maybe-clean-stageprofile-libiberty:
 
 @if libiberty-bootstrap
 maybe-configure-stageprofile-libiberty: configure-stageprofile-libiberty
-configure-stageprofile-libiberty:  maybe-all-stage1-libiberty 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-libiberty/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-libiberty ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-libiberty:
+       @$(MAKE) stageprofile-start
+       @[ -f libiberty/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in libiberty ; \
-       cd libiberty || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libiberty"; \
+       libsrcdir="$$s/libiberty"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-libiberty
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-libiberty: all-stageprofile-libiberty
 all-stageprofile-libiberty: configure-stageprofile-libiberty
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libiberty && \
+       cd $(HOST_SUBDIR)/libiberty && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-libiberty
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" 
+
+maybe-clean-stageprofile-libiberty: clean-stageprofile-libiberty
+clean-stageprofile-libiberty:
+       @[ -f libiberty/Makefile ] || [ -f stageprofile-libiberty/Makefile ] \
+         || exit 0 ; \
+       [ -f libiberty/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/libiberty && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
 @endif libiberty-bootstrap
 
+
+.PHONY: configure-stageprofile-zlib maybe-configure-stageprofile-zlib
+.PHONY: all-stageprofile-zlib maybe-all-stageprofile-zlib
+.PHONY: clean-stageprofile-zlib maybe-clean-stageprofile-zlib
+
 maybe-configure-stageprofile-zlib:
 maybe-all-stageprofile-zlib:
+maybe-clean-stageprofile-zlib:
 
 @if zlib-bootstrap
 maybe-configure-stageprofile-zlib: configure-stageprofile-zlib
-configure-stageprofile-zlib:  maybe-all-stage1-zlib 
-       $(MAKE) stageprofile-start
-       @if [ -f stageprofile-zlib/Makefile ] ; then \
-         $(STAMP) configure-stageprofile-zlib ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stageprofile-zlib:
+       @$(MAKE) stageprofile-start
+       @[ -f zlib/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage profile in zlib ; \
-       cd zlib || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/zlib"; \
+       libsrcdir="$$s/zlib"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stageprofile-zlib
+         @stage2_werror_flag@ 
 
 maybe-all-stageprofile-zlib: all-stageprofile-zlib
 all-stageprofile-zlib: configure-stageprofile-zlib
-       $(MAKE) stageprofile-start
+       @$(MAKE) stageprofile-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd zlib && \
+       cd $(HOST_SUBDIR)/zlib && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" 
+
+maybe-clean-stageprofile-zlib: clean-stageprofile-zlib
+clean-stageprofile-zlib:
+       @[ -f zlib/Makefile ] || [ -f stageprofile-zlib/Makefile ] \
+         || exit 0 ; \
+       [ -f zlib/Makefile ] || $(MAKE) stageprofile-start ; \
+       cd $(HOST_SUBDIR)/zlib && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  && \
-       $(STAMP) ../all-stageprofile-zlib
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
 @endif zlib-bootstrap
 
 
+
 # FIXME: Will not need to be conditional when toplevel bootstrap is the
 # only possibility, but now it conflicts with no-bootstrap rules
 @if gcc-bootstrap
@@ -31613,35 +34108,12 @@ all-stageprofile-zlib: configure-stageprofile-zlib
 
 
 
-.PHONY: restageprofile touch-stageprofile distclean-stageprofile
-
-# Rules to wipe a stage and all the following ones, used for cleanstrap
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
 distclean-stage1:: distclean-stageprofile 
+.PHONY: distclean-stageprofile
 distclean-stageprofile::
        [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
-       rm -rf configure-stageprofile-* all-stageprofile-* stageprofile-* 
-
-# Rules to renew the timestamp on a stage and all the following ones
-touch-stage1:: touch-stageprofile 
-touch-stageprofile::
-       @case `echo configure-stageprofile-*` in \
-         'configure-stageprofile-*') ;; \
-         *) \
-           echo '$(STAMP)' configure-stageprofile-* && \
-           $(STAMP) configure-stageprofile-* ;; \
-       esac ; \
-       case `echo all-stageprofile-*` in \
-         'all-stageprofile-*') ;; \
-         *) \
-           echo '$(STAMP)' all-stageprofile-* && \
-           $(STAMP) all-stageprofile-* ;; \
-       esac
-
-# After building a stage, touch the following ones
-restage1:: touch-stageprofile 
-restageprofile::
-       rm -rf all-stageprofile-* 
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS)  all-stageprofile 
+       rm -rf stageprofile-* 
 
 
 @endif gcc-bootstrap
@@ -31650,110 +34122,152 @@ restageprofile::
 .PHONY: stagefeedback-start stagefeedback-end
 
 stagefeedback-start::
-       [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+       @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
        echo stagefeedback > stage_current ; \
-       echo stagefeedback > stage_last
+       echo stagefeedback > stage_last; \
+       $(mkinstalldirs) $(HOST_SUBDIR)
 @if bfd
-       [ -d stagefeedback-bfd ] || mkdir stagefeedback-bfd; \
-       set stagefeedback-bfd bfd ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-bfd prev-bfd ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-bfd ] || \
+         mkdir stagefeedback-bfd; \
+       set stagefeedback-bfd bfd ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-bfd prev-bfd ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       [ -d stagefeedback-opcodes ] || mkdir stagefeedback-opcodes; \
-       set stagefeedback-opcodes opcodes ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-opcodes prev-opcodes ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-opcodes ] || \
+         mkdir stagefeedback-opcodes; \
+       set stagefeedback-opcodes opcodes ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-opcodes prev-opcodes ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       [ -d stagefeedback-binutils ] || mkdir stagefeedback-binutils; \
-       set stagefeedback-binutils binutils ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-binutils prev-binutils ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-binutils ] || \
+         mkdir stagefeedback-binutils; \
+       set stagefeedback-binutils binutils ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-binutils prev-binutils ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       [ -d stagefeedback-gas ] || mkdir stagefeedback-gas; \
-       set stagefeedback-gas gas ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-gas prev-gas ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-gas ] || \
+         mkdir stagefeedback-gas; \
+       set stagefeedback-gas gas ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-gas prev-gas ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       [ -d stagefeedback-gcc ] || mkdir stagefeedback-gcc; \
-       set stagefeedback-gcc gcc ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-gcc prev-gcc ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-gcc ] || \
+         mkdir stagefeedback-gcc; \
+       set stagefeedback-gcc gcc ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-gcc prev-gcc ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       [ -d stagefeedback-intl ] || mkdir stagefeedback-intl; \
-       set stagefeedback-intl intl ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-intl prev-intl ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-intl ] || \
+         mkdir stagefeedback-intl; \
+       set stagefeedback-intl intl ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-intl prev-intl ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       [ -d stagefeedback-ld ] || mkdir stagefeedback-ld; \
-       set stagefeedback-ld ld ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-ld prev-ld ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-ld ] || \
+         mkdir stagefeedback-ld; \
+       set stagefeedback-ld ld ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-ld prev-ld ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       [ -d stagefeedback-libcpp ] || mkdir stagefeedback-libcpp; \
-       set stagefeedback-libcpp libcpp ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-libcpp prev-libcpp ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-libcpp ] || \
+         mkdir stagefeedback-libcpp; \
+       set stagefeedback-libcpp libcpp ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-libcpp prev-libcpp ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       [ -d stagefeedback-libbanshee ] || mkdir stagefeedback-libbanshee; \
-       set stagefeedback-libbanshee libbanshee ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-libbanshee prev-libbanshee ; @CREATE_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       [ -d stagefeedback-libiberty ] || mkdir stagefeedback-libiberty; \
-       set stagefeedback-libiberty libiberty ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-libiberty prev-libiberty ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-libiberty ] || \
+         mkdir stagefeedback-libiberty; \
+       set stagefeedback-libiberty libiberty ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-libiberty prev-libiberty ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       [ -d stagefeedback-zlib ] || mkdir stagefeedback-zlib; \
-       set stagefeedback-zlib zlib ; @CREATE_LINK_TO_DIR@  ; \
-       set stage1-zlib prev-zlib ; @CREATE_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); [ -d stagefeedback-zlib ] || \
+         mkdir stagefeedback-zlib; \
+       set stagefeedback-zlib zlib ; \
+       @CREATE_LINK_TO_DIR@  ; \
+       set stage1-zlib prev-zlib ; \
+       @CREATE_LINK_TO_DIR@ 
 @endif zlib
 
 stagefeedback-end::
-       rm -f stage_current
+       @rm -f stage_current
 @if bfd
-       set bfd stagefeedback-bfd ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-bfd stage1-bfd ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set bfd stagefeedback-bfd ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-bfd stage1-bfd ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif bfd
 @if opcodes
-       set opcodes stagefeedback-opcodes ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-opcodes stage1-opcodes ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set opcodes stagefeedback-opcodes ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-opcodes stage1-opcodes ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif opcodes
 @if binutils
-       set binutils stagefeedback-binutils ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-binutils stage1-binutils ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set binutils stagefeedback-binutils ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-binutils stage1-binutils ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif binutils
 @if gas
-       set gas stagefeedback-gas ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gas stage1-gas ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gas stagefeedback-gas ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gas stage1-gas ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gas
 @if gcc
-       set gcc stagefeedback-gcc ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-gcc stage1-gcc ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set gcc stagefeedback-gcc ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-gcc stage1-gcc ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif gcc
 @if intl
-       set intl stagefeedback-intl ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-intl stage1-intl ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set intl stagefeedback-intl ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-intl stage1-intl ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif intl
 @if ld
-       set ld stagefeedback-ld ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-ld stage1-ld ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set ld stagefeedback-ld ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-ld stage1-ld ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif ld
 @if libcpp
-       set libcpp stagefeedback-libcpp ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libcpp stage1-libcpp ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libcpp stagefeedback-libcpp ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libcpp stage1-libcpp ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libcpp
-@if libbanshee
-       set libbanshee stagefeedback-libbanshee ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libbanshee stage1-libbanshee ; @UNDO_LINK_TO_DIR@ 
-@endif libbanshee
 @if libiberty
-       set libiberty stagefeedback-libiberty ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-libiberty stage1-libiberty ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set libiberty stagefeedback-libiberty ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-libiberty stage1-libiberty ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif libiberty
 @if zlib
-       set zlib stagefeedback-zlib ; @UNDO_LINK_TO_DIR@  ; \
-       set prev-zlib stage1-zlib ; @UNDO_LINK_TO_DIR@ 
+       @cd $(HOST_SUBDIR); set zlib stagefeedback-zlib ; \
+       @UNDO_LINK_TO_DIR@  ; \
+       set prev-zlib stage1-zlib ; \
+       @UNDO_LINK_TO_DIR@ 
 @endif zlib
 
 # Bubble a bugfix through all the stages up to stage feedback.  They
@@ -31761,545 +34275,560 @@ stagefeedback-end::
 # be reconfigured as well.
 .PHONY: stagefeedback-bubble
 stagefeedback-bubble:: stage1-bubble
-       @case `echo all-stagefeedback-*` in \
-         'all-stagefeedback-*') ;; \
-         *) echo Remaking stage feedback ; rm -f all-stagefeedback-* ;; \
-       esac ; \
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stagefeedback
+       @if test -f stagefeedback-lean || test -f stage1-lean  ; then \
+         echo Skipping rebuild of stagefeedback ; \
+       else \
+         $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stagefeedback; \
+       fi
 
-.PHONY: all-stagefeedback
+.PHONY: all-stagefeedback clean-stagefeedback
 all-stagefeedback:     \
   maybe-all-stagefeedback-bfd \
   maybe-all-stagefeedback-opcodes \
-  maybe-all-stagefeedback-binutils             \
+  maybe-all-stagefeedback-binutils              \
   maybe-all-stagefeedback-gas \
   maybe-all-stagefeedback-gcc        \
   maybe-all-stagefeedback-intl   \
   maybe-all-stagefeedback-ld \
   maybe-all-stagefeedback-libcpp  \
-  maybe-all-stagefeedback-libbanshee \
   maybe-all-stagefeedback-libiberty                        \
-  maybe-all-stagefeedback-zlib       
-
+  maybe-all-stagefeedback-zlib        
+
+do-clean: clean-stagefeedback
+clean-stagefeedback:     \
+  maybe-clean-stagefeedback-bfd \
+  maybe-clean-stagefeedback-opcodes \
+  maybe-clean-stagefeedback-binutils              \
+  maybe-clean-stagefeedback-gas \
+  maybe-clean-stagefeedback-gcc        \
+  maybe-clean-stagefeedback-intl   \
+  maybe-clean-stagefeedback-ld \
+  maybe-clean-stagefeedback-libcpp  \
+  maybe-clean-stagefeedback-libiberty                        \
+  maybe-clean-stagefeedback-zlib        
+
+
+.PHONY: configure-stagefeedback-bfd maybe-configure-stagefeedback-bfd
+.PHONY: all-stagefeedback-bfd maybe-all-stagefeedback-bfd
+.PHONY: clean-stagefeedback-bfd maybe-clean-stagefeedback-bfd
 
 maybe-configure-stagefeedback-bfd:
 maybe-all-stagefeedback-bfd:
+maybe-clean-stagefeedback-bfd:
 
 @if bfd-bootstrap
 maybe-configure-stagefeedback-bfd: configure-stagefeedback-bfd
-configure-stagefeedback-bfd:  maybe-all-stage1-bfd 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-bfd/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-bfd ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-bfd:
+       @$(MAKE) stagefeedback-start
+       @[ -f bfd/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in bfd ; \
-       cd bfd || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/bfd"; \
+       libsrcdir="$$s/bfd"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-bfd
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-bfd: all-stagefeedback-bfd
 all-stagefeedback-bfd: configure-stagefeedback-bfd
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd bfd && \
+       cd $(HOST_SUBDIR)/bfd && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-bfd
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" 
+
+maybe-clean-stagefeedback-bfd: clean-stagefeedback-bfd
+clean-stagefeedback-bfd:
+       @[ -f bfd/Makefile ] || [ -f stagefeedback-bfd/Makefile ] \
+         || exit 0 ; \
+       [ -f bfd/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/bfd && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
 @endif bfd-bootstrap
 
+
+.PHONY: configure-stagefeedback-opcodes maybe-configure-stagefeedback-opcodes
+.PHONY: all-stagefeedback-opcodes maybe-all-stagefeedback-opcodes
+.PHONY: clean-stagefeedback-opcodes maybe-clean-stagefeedback-opcodes
+
 maybe-configure-stagefeedback-opcodes:
 maybe-all-stagefeedback-opcodes:
+maybe-clean-stagefeedback-opcodes:
 
 @if opcodes-bootstrap
 maybe-configure-stagefeedback-opcodes: configure-stagefeedback-opcodes
-configure-stagefeedback-opcodes:  maybe-all-stage1-opcodes 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-opcodes/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-opcodes ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-opcodes:
+       @$(MAKE) stagefeedback-start
+       @[ -f opcodes/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in opcodes ; \
-       cd opcodes || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/opcodes"; \
+       libsrcdir="$$s/opcodes"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-opcodes
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-opcodes: all-stagefeedback-opcodes
 all-stagefeedback-opcodes: configure-stagefeedback-opcodes
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd opcodes && \
+       cd $(HOST_SUBDIR)/opcodes && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" 
+
+maybe-clean-stagefeedback-opcodes: clean-stagefeedback-opcodes
+clean-stagefeedback-opcodes:
+       @[ -f opcodes/Makefile ] || [ -f stagefeedback-opcodes/Makefile ] \
+         || exit 0 ; \
+       [ -f opcodes/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/opcodes && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-opcodes
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
 @endif opcodes-bootstrap
 
+
+.PHONY: configure-stagefeedback-binutils maybe-configure-stagefeedback-binutils
+.PHONY: all-stagefeedback-binutils maybe-all-stagefeedback-binutils
+.PHONY: clean-stagefeedback-binutils maybe-clean-stagefeedback-binutils
+
 maybe-configure-stagefeedback-binutils:
 maybe-all-stagefeedback-binutils:
+maybe-clean-stagefeedback-binutils:
 
 @if binutils-bootstrap
 maybe-configure-stagefeedback-binutils: configure-stagefeedback-binutils
-configure-stagefeedback-binutils:  maybe-all-stage1-binutils 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-binutils/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-binutils ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-binutils:
+       @$(MAKE) stagefeedback-start
+       @[ -f binutils/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in binutils ; \
-       cd binutils || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/binutils"; \
+       libsrcdir="$$s/binutils"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-binutils
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-binutils: all-stagefeedback-binutils
 all-stagefeedback-binutils: configure-stagefeedback-binutils
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd binutils && \
+       cd $(HOST_SUBDIR)/binutils && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-binutils
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" 
+
+maybe-clean-stagefeedback-binutils: clean-stagefeedback-binutils
+clean-stagefeedback-binutils:
+       @[ -f binutils/Makefile ] || [ -f stagefeedback-binutils/Makefile ] \
+         || exit 0 ; \
+       [ -f binutils/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/binutils && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
 @endif binutils-bootstrap
 
+
+.PHONY: configure-stagefeedback-gas maybe-configure-stagefeedback-gas
+.PHONY: all-stagefeedback-gas maybe-all-stagefeedback-gas
+.PHONY: clean-stagefeedback-gas maybe-clean-stagefeedback-gas
+
 maybe-configure-stagefeedback-gas:
 maybe-all-stagefeedback-gas:
+maybe-clean-stagefeedback-gas:
 
 @if gas-bootstrap
 maybe-configure-stagefeedback-gas: configure-stagefeedback-gas
-configure-stagefeedback-gas:  maybe-all-stage1-gas 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-gas/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-gas ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-gas:
+       @$(MAKE) stagefeedback-start
+       @[ -f gas/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in gas ; \
-       cd gas || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gas/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gas"; \
+       libsrcdir="$$s/gas"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-gas
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-gas: all-stagefeedback-gas
 all-stagefeedback-gas: configure-stagefeedback-gas
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gas && \
+       cd $(HOST_SUBDIR)/gas && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" 
+
+maybe-clean-stagefeedback-gas: clean-stagefeedback-gas
+clean-stagefeedback-gas:
+       @[ -f gas/Makefile ] || [ -f stagefeedback-gas/Makefile ] \
+         || exit 0 ; \
+       [ -f gas/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/gas && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-gas
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
 @endif gas-bootstrap
 
+
+.PHONY: configure-stagefeedback-gcc maybe-configure-stagefeedback-gcc
+.PHONY: all-stagefeedback-gcc maybe-all-stagefeedback-gcc
+.PHONY: clean-stagefeedback-gcc maybe-clean-stagefeedback-gcc
+
 maybe-configure-stagefeedback-gcc:
 maybe-all-stagefeedback-gcc:
+maybe-clean-stagefeedback-gcc:
 
 @if gcc-bootstrap
 maybe-configure-stagefeedback-gcc: configure-stagefeedback-gcc
-configure-stagefeedback-gcc:  maybe-all-stage1-gcc 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-gcc/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-gcc ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-gcc:
+       @$(MAKE) stagefeedback-start
+       @[ -f gcc/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in gcc ; \
-       cd gcc || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/gcc"; \
+       libsrcdir="$$s/gcc"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-gcc
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-gcc: all-stagefeedback-gcc
 all-stagefeedback-gcc: configure-stagefeedback-gcc
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd gcc && \
+       cd $(HOST_SUBDIR)/gcc && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(EXTRA_GCC_FLAGS) && \
-       $(STAMP) ../all-stagefeedback-gcc
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(EXTRA_GCC_FLAGS)
+
+maybe-clean-stagefeedback-gcc: clean-stagefeedback-gcc
+clean-stagefeedback-gcc:
+       @[ -f gcc/Makefile ] || [ -f stagefeedback-gcc/Makefile ] \
+         || exit 0 ; \
+       [ -f gcc/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/gcc && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(EXTRA_GCC_FLAGS) clean
 @endif gcc-bootstrap
 
+
+.PHONY: configure-stagefeedback-intl maybe-configure-stagefeedback-intl
+.PHONY: all-stagefeedback-intl maybe-all-stagefeedback-intl
+.PHONY: clean-stagefeedback-intl maybe-clean-stagefeedback-intl
+
 maybe-configure-stagefeedback-intl:
 maybe-all-stagefeedback-intl:
+maybe-clean-stagefeedback-intl:
 
 @if intl-bootstrap
 maybe-configure-stagefeedback-intl: configure-stagefeedback-intl
-configure-stagefeedback-intl:  maybe-all-stage1-intl 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-intl/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-intl ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-intl:
+       @$(MAKE) stagefeedback-start
+       @[ -f intl/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in intl ; \
-       cd intl || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/intl/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/intl"; \
+       libsrcdir="$$s/intl"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-intl
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-intl: all-stagefeedback-intl
 all-stagefeedback-intl: configure-stagefeedback-intl
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd intl && \
+       cd $(HOST_SUBDIR)/intl && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" 
+
+maybe-clean-stagefeedback-intl: clean-stagefeedback-intl
+clean-stagefeedback-intl:
+       @[ -f intl/Makefile ] || [ -f stagefeedback-intl/Makefile ] \
+         || exit 0 ; \
+       [ -f intl/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/intl && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-intl
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
 @endif intl-bootstrap
 
+
+.PHONY: configure-stagefeedback-ld maybe-configure-stagefeedback-ld
+.PHONY: all-stagefeedback-ld maybe-all-stagefeedback-ld
+.PHONY: clean-stagefeedback-ld maybe-clean-stagefeedback-ld
+
 maybe-configure-stagefeedback-ld:
 maybe-all-stagefeedback-ld:
+maybe-clean-stagefeedback-ld:
 
 @if ld-bootstrap
 maybe-configure-stagefeedback-ld: configure-stagefeedback-ld
-configure-stagefeedback-ld:  maybe-all-stage1-ld 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-ld/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-ld ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-ld:
+       @$(MAKE) stagefeedback-start
+       @[ -f ld/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in ld ; \
-       cd ld || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/ld/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/ld"; \
+       libsrcdir="$$s/ld"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-ld
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-ld: all-stagefeedback-ld
 all-stagefeedback-ld: configure-stagefeedback-ld
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd ld && \
+       cd $(HOST_SUBDIR)/ld && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-ld
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" 
+
+maybe-clean-stagefeedback-ld: clean-stagefeedback-ld
+clean-stagefeedback-ld:
+       @[ -f ld/Makefile ] || [ -f stagefeedback-ld/Makefile ] \
+         || exit 0 ; \
+       [ -f ld/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/ld && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
 @endif ld-bootstrap
 
+
+.PHONY: configure-stagefeedback-libcpp maybe-configure-stagefeedback-libcpp
+.PHONY: all-stagefeedback-libcpp maybe-all-stagefeedback-libcpp
+.PHONY: clean-stagefeedback-libcpp maybe-clean-stagefeedback-libcpp
+
 maybe-configure-stagefeedback-libcpp:
 maybe-all-stagefeedback-libcpp:
+maybe-clean-stagefeedback-libcpp:
 
 @if libcpp-bootstrap
 maybe-configure-stagefeedback-libcpp: configure-stagefeedback-libcpp
-configure-stagefeedback-libcpp:  maybe-all-stage1-libcpp 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-libcpp/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-libcpp ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-libcpp:
+       @$(MAKE) stagefeedback-start
+       @[ -f libcpp/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in libcpp ; \
-       cd libcpp || exit 1; \
+       cd $(HOST_SUBDIR)/libcpp || exit 1; \
        case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libcpp"; \
-           libsrcdir="$$s/libcpp";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libcpp"; \
+       libsrcdir="$$s/libcpp"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-libcpp
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-libcpp: all-stagefeedback-libcpp
 all-stagefeedback-libcpp: configure-stagefeedback-libcpp
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libcpp && \
+       cd $(HOST_SUBDIR)/libcpp && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" 
+
+maybe-clean-stagefeedback-libcpp: clean-stagefeedback-libcpp
+clean-stagefeedback-libcpp:
+       @[ -f libcpp/Makefile ] || [ -f stagefeedback-libcpp/Makefile ] \
+         || exit 0 ; \
+       [ -f libcpp/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/libcpp && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-libcpp
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
 @endif libcpp-bootstrap
 
-maybe-configure-stagefeedback-libbanshee:
-maybe-all-stagefeedback-libbanshee:
 
-@if libbanshee-bootstrap
-maybe-configure-stagefeedback-libbanshee: configure-stagefeedback-libbanshee
-configure-stagefeedback-libbanshee:  maybe-all-stage1-libbanshee 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-libbanshee/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-libbanshee ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
-       r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       echo Configuring stage feedback in libbanshee ; \
-       cd libbanshee || exit 1; \
-       case $(srcdir) in \
-         \.) \
-           srcdiroption="--srcdir=."; \
-           libsrcdir=".";; \
-         /* | [A-Za-z]:[\\/]*) \
-           srcdiroption="--srcdir=$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-         *) \
-           srcdiroption="--srcdir=../$(srcdir)/libbanshee"; \
-           libsrcdir="$$s/libbanshee";; \
-       esac; \
-       $(SHELL) $${libsrcdir}/configure \
-         $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-libbanshee
-
-maybe-all-stagefeedback-libbanshee: all-stagefeedback-libbanshee
-all-stagefeedback-libbanshee: configure-stagefeedback-libbanshee
-       $(MAKE) stagefeedback-start
-       @r=`${PWD_COMMAND}`; export r; \
-       s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
-       $(STAGE_HOST_EXPORTS)  \
-       cd libbanshee && \
-       $(MAKE) $(FLAGS_TO_PASS)  \
-               $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-libbanshee
-@endif libbanshee-bootstrap
+.PHONY: configure-stagefeedback-libiberty maybe-configure-stagefeedback-libiberty
+.PHONY: all-stagefeedback-libiberty maybe-all-stagefeedback-libiberty
+.PHONY: clean-stagefeedback-libiberty maybe-clean-stagefeedback-libiberty
 
 maybe-configure-stagefeedback-libiberty:
 maybe-all-stagefeedback-libiberty:
+maybe-clean-stagefeedback-libiberty:
 
 @if libiberty-bootstrap
 maybe-configure-stagefeedback-libiberty: configure-stagefeedback-libiberty
-configure-stagefeedback-libiberty:  maybe-all-stage1-libiberty 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-libiberty/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-libiberty ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-libiberty:
+       @$(MAKE) stagefeedback-start
+       @[ -f libiberty/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in libiberty ; \
-       cd libiberty || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/libiberty"; \
+       libsrcdir="$$s/libiberty"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-libiberty
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-libiberty: all-stagefeedback-libiberty
 all-stagefeedback-libiberty: configure-stagefeedback-libiberty
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd libiberty && \
+       cd $(HOST_SUBDIR)/libiberty && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" 
+
+maybe-clean-stagefeedback-libiberty: clean-stagefeedback-libiberty
+clean-stagefeedback-libiberty:
+       @[ -f libiberty/Makefile ] || [ -f stagefeedback-libiberty/Makefile ] \
+         || exit 0 ; \
+       [ -f libiberty/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/libiberty && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-libiberty
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
 @endif libiberty-bootstrap
 
+
+.PHONY: configure-stagefeedback-zlib maybe-configure-stagefeedback-zlib
+.PHONY: all-stagefeedback-zlib maybe-all-stagefeedback-zlib
+.PHONY: clean-stagefeedback-zlib maybe-clean-stagefeedback-zlib
+
 maybe-configure-stagefeedback-zlib:
 maybe-all-stagefeedback-zlib:
+maybe-clean-stagefeedback-zlib:
 
 @if zlib-bootstrap
 maybe-configure-stagefeedback-zlib: configure-stagefeedback-zlib
-configure-stagefeedback-zlib:  maybe-all-stage1-zlib 
-       $(MAKE) stagefeedback-start
-       @if [ -f stagefeedback-zlib/Makefile ] ; then \
-         $(STAMP) configure-stagefeedback-zlib ; \
-         exit 0; \
-       else \
-         true ; \
-       fi ; \
+configure-stagefeedback-zlib:
+       @$(MAKE) stagefeedback-start
+       @[ -f zlib/Makefile ] && exit 0 || : ; \
        r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
        echo Configuring stage feedback in zlib ; \
-       cd zlib || exit 1; \
+       cd $(HOST_SUBDIR)/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";; \
+         /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+         *) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
+               sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
        esac; \
+       srcdiroption="--srcdir=$${topdir}/zlib"; \
+       libsrcdir="$$s/zlib"; \
        $(SHELL) $${libsrcdir}/configure \
          $(HOST_CONFIGARGS) $${srcdiroption} \
-         @stage2_werror_flag@  && \
-         $(STAMP) ../configure-stagefeedback-zlib
+         @stage2_werror_flag@ 
 
 maybe-all-stagefeedback-zlib: all-stagefeedback-zlib
 all-stagefeedback-zlib: configure-stagefeedback-zlib
-       $(MAKE) stagefeedback-start
+       @$(MAKE) stagefeedback-start
        @r=`${PWD_COMMAND}`; export r; \
        s=`cd $(srcdir); ${PWD_COMMAND}`; export s;  \
        $(STAGE_HOST_EXPORTS)  \
-       cd zlib && \
+       cd $(HOST_SUBDIR)/zlib && \
+       $(MAKE) $(FLAGS_TO_PASS)  \
+               $(POSTSTAGE1_FLAGS_TO_PASS)  \
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use" 
+
+maybe-clean-stagefeedback-zlib: clean-stagefeedback-zlib
+clean-stagefeedback-zlib:
+       @[ -f zlib/Makefile ] || [ -f stagefeedback-zlib/Makefile ] \
+         || exit 0 ; \
+       [ -f zlib/Makefile ] || $(MAKE) stagefeedback-start ; \
+       cd $(HOST_SUBDIR)/zlib && \
        $(MAKE) $(FLAGS_TO_PASS)  \
                $(POSTSTAGE1_FLAGS_TO_PASS)  \
-               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  && \
-       $(STAMP) ../all-stagefeedback-zlib
+               CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
 @endif zlib-bootstrap
 
 
+
 # FIXME: Will not need to be conditional when toplevel bootstrap is the
 # only possibility, but now it conflicts with no-bootstrap rules
 @if gcc-bootstrap
@@ -32307,35 +34836,12 @@ all-stagefeedback-zlib: configure-stagefeedback-zlib
 
 
 
-.PHONY: restagefeedback touch-stagefeedback distclean-stagefeedback
-
-# Rules to wipe a stage and all the following ones, used for cleanstrap
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
 distclean-stage1:: distclean-stagefeedback 
+.PHONY: distclean-stagefeedback
 distclean-stagefeedback::
        [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
-       rm -rf configure-stagefeedback-* all-stagefeedback-* stagefeedback-* 
-
-# Rules to renew the timestamp on a stage and all the following ones
-touch-stage1:: touch-stagefeedback 
-touch-stagefeedback::
-       @case `echo configure-stagefeedback-*` in \
-         'configure-stagefeedback-*') ;; \
-         *) \
-           echo '$(STAMP)' configure-stagefeedback-* && \
-           $(STAMP) configure-stagefeedback-* ;; \
-       esac ; \
-       case `echo all-stagefeedback-*` in \
-         'all-stagefeedback-*') ;; \
-         *) \
-           echo '$(STAMP)' all-stagefeedback-* && \
-           $(STAMP) all-stagefeedback-* ;; \
-       esac
-
-# After building a stage, touch the following ones
-restage1:: touch-stagefeedback 
-restagefeedback::
-       rm -rf all-stagefeedback-* 
-       $(MAKE) $(RECURSE_FLAGS_TO_PASS)  all-stagefeedback 
+       rm -rf stagefeedback-* 
 
 
 @endif gcc-bootstrap
@@ -32372,6 +34878,12 @@ profiledbootstrap:
        $(MAKE) stagefeedback-bubble stagefeedback-end
 @endif gcc-bootstrap
 
+@if gcc-bootstrap
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+do-distclean: distclean-stage1
+@endif gcc-bootstrap
+
 # --------------------------------------
 # Dependencies between different modules
 # --------------------------------------
@@ -32471,6 +34983,7 @@ all-build-flex: maybe-all-build-byacc
 all-build-flex: maybe-all-build-m4
 all-build-libiberty: maybe-all-build-texinfo
 all-build-m4: maybe-all-build-texinfo
+all-build-fixincludes: maybe-all-build-libiberty
 configure-gcc: maybe-configure-intl
 
 configure-stage1-gcc: maybe-configure-stage1-intl
@@ -32555,6 +35068,24 @@ all-stage4-gcc: maybe-all-build-flex
 all-stageprofile-gcc: maybe-all-build-flex
 all-stagefeedback-gcc: maybe-all-build-flex
 all-prebootstrap: maybe-all-build-flex
+all-gcc: maybe-all-build-libiberty
+
+all-stage1-gcc: maybe-all-build-libiberty
+all-stage2-gcc: maybe-all-build-libiberty
+all-stage3-gcc: maybe-all-build-libiberty
+all-stage4-gcc: maybe-all-build-libiberty
+all-stageprofile-gcc: maybe-all-build-libiberty
+all-stagefeedback-gcc: maybe-all-build-libiberty
+all-prebootstrap: maybe-all-build-libiberty
+all-gcc: maybe-all-build-fixincludes
+
+all-stage1-gcc: maybe-all-build-fixincludes
+all-stage2-gcc: maybe-all-build-fixincludes
+all-stage3-gcc: maybe-all-build-fixincludes
+all-stage4-gcc: maybe-all-build-fixincludes
+all-stageprofile-gcc: maybe-all-build-fixincludes
+all-stagefeedback-gcc: maybe-all-build-fixincludes
+all-prebootstrap: maybe-all-build-fixincludes
 all-gcc: maybe-all-binutils
 
 all-stage1-gcc: maybe-all-stage1-binutils
@@ -32587,14 +35118,6 @@ all-stage3-gcc: maybe-all-stage3-zlib
 all-stage4-gcc: maybe-all-stage4-zlib
 all-stageprofile-gcc: maybe-all-stageprofile-zlib
 all-stagefeedback-gcc: maybe-all-stagefeedback-zlib
-all-gcc: maybe-all-libbanshee
-
-all-stage1-gcc: maybe-all-stage1-libbanshee
-all-stage2-gcc: maybe-all-stage2-libbanshee
-all-stage3-gcc: maybe-all-stage3-libbanshee
-all-stage4-gcc: maybe-all-stage4-libbanshee
-all-stageprofile-gcc: maybe-all-stageprofile-libbanshee
-all-stagefeedback-gcc: maybe-all-stagefeedback-libbanshee
 all-gcc: all-libcpp
 
 all-stage1-gcc: all-stage1-libcpp
@@ -32603,15 +35126,16 @@ all-stage3-gcc: all-stage3-libcpp
 all-stage4-gcc: all-stage4-libcpp
 all-stageprofile-gcc: all-stageprofile-libcpp
 all-stagefeedback-gcc: all-stagefeedback-libcpp
-all-gcc: maybe-all-build-libiberty
-
-all-stage1-gcc: maybe-all-build-libiberty
-all-stage2-gcc: maybe-all-build-libiberty
-all-stage3-gcc: maybe-all-build-libiberty
-all-stage4-gcc: maybe-all-build-libiberty
-all-stageprofile-gcc: maybe-all-build-libiberty
-all-stagefeedback-gcc: maybe-all-build-libiberty
-all-prebootstrap: maybe-all-build-libiberty
+all-gcc: maybe-all-libiberty
+
+all-stage1-gcc: maybe-all-stage1-libiberty
+all-stage2-gcc: maybe-all-stage2-libiberty
+all-stage3-gcc: maybe-all-stage3-libiberty
+all-stage4-gcc: maybe-all-stage4-libiberty
+all-stageprofile-gcc: maybe-all-stageprofile-libiberty
+all-stagefeedback-gcc: maybe-all-stagefeedback-libiberty
+all-gcc: maybe-all-fixincludes
+install-gcc: maybe-install-fixincludes
 configure-libcpp: configure-libiberty
 
 configure-stage1-libcpp: configure-stage1-libiberty
@@ -32644,6 +35168,8 @@ all-stage3-libcpp: maybe-all-stage3-intl
 all-stage4-libcpp: maybe-all-stage4-intl
 all-stageprofile-libcpp: maybe-all-stageprofile-intl
 all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
+all-fixincludes: maybe-all-libiberty
+all-gnattools: maybe-all-target-libada
 configure-gdb: maybe-configure-itcl
 configure-gdb: maybe-configure-tcl
 configure-gdb: maybe-configure-tk
@@ -32953,7 +35479,6 @@ all-prebootstrap: maybe-all-gas
 all-prebootstrap: maybe-all-intl
 all-prebootstrap: maybe-all-ld
 all-prebootstrap: maybe-all-libcpp
-all-prebootstrap: maybe-all-libbanshee
 all-prebootstrap: maybe-all-libiberty
 all-prebootstrap: maybe-all-zlib
 @endif gcc-no-bootstrap