+.PHONY: stage1-start stage1-end
+
+stage1-start::
+ @: $(MAKE); $(stage); \
+ echo stage1 > stage_current ; \
+ echo stage1 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+@if bfd
+ @cd $(HOST_SUBDIR); [ -d stage1-bfd ] || \
+ mkdir stage1-bfd; \
+ set stage1-bfd bfd ; \
+ @CREATE_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); [ -d stage1-opcodes ] || \
+ mkdir stage1-opcodes; \
+ set stage1-opcodes opcodes ; \
+ @CREATE_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); [ -d stage1-binutils ] || \
+ mkdir stage1-binutils; \
+ set stage1-binutils binutils ; \
+ @CREATE_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); [ -d stage1-gas ] || \
+ mkdir stage1-gas; \
+ set stage1-gas gas ; \
+ @CREATE_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); [ -d stage1-gcc ] || \
+ mkdir stage1-gcc; \
+ set stage1-gcc gcc ; \
+ @CREATE_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); [ -d stage1-intl ] || \
+ mkdir stage1-intl; \
+ set stage1-intl intl ; \
+ @CREATE_LINK_TO_DIR@
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); [ -d stage1-ld ] || \
+ mkdir stage1-ld; \
+ set stage1-ld ld ; \
+ @CREATE_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); [ -d stage1-libcpp ] || \
+ mkdir stage1-libcpp; \
+ set stage1-libcpp libcpp ; \
+ @CREATE_LINK_TO_DIR@
+@endif libcpp
+@if libdecnumber
+ @cd $(HOST_SUBDIR); [ -d stage1-libdecnumber ] || \
+ mkdir stage1-libdecnumber; \
+ set stage1-libdecnumber libdecnumber ; \
+ @CREATE_LINK_TO_DIR@
+@endif libdecnumber
+@if libiberty
+ @cd $(HOST_SUBDIR); [ -d stage1-libiberty ] || \
+ mkdir stage1-libiberty; \
+ set stage1-libiberty libiberty ; \
+ @CREATE_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @cd $(HOST_SUBDIR); [ -d stage1-zlib ] || \
+ mkdir stage1-zlib; \
+ set stage1-zlib zlib ; \
+ @CREATE_LINK_TO_DIR@
+@endif zlib
+ @[ -d stage1-$(TARGET_SUBDIR) ] || \
+ mkdir stage1-$(TARGET_SUBDIR); \
+ set stage1-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ @CREATE_LINK_TO_DIR@
+
+stage1-end::
+ @rm -f stage_current
+@if bfd
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set bfd stage1-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif bfd
+@if opcodes
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set opcodes stage1-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif opcodes
+@if binutils
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set binutils stage1-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif binutils
+@if gas
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set gas stage1-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif gas
+@if gcc
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set gcc stage1-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif gcc
+@if intl
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set intl stage1-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif intl
+@if ld
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set ld stage1-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif ld
+@if libcpp
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set libcpp stage1-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif libcpp
+@if libdecnumber
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set libdecnumber stage1-libdecnumber ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif libdecnumber
+@if libiberty
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set libiberty stage1-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif libiberty
+@if zlib
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set zlib stage1-zlib ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif zlib
+ @if test -d $(TARGET_SUBDIR) ; then \
+ set $(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+
+# Bubble a bugfix through all the stages up to stage 1. They are
+# remade, but not reconfigured. The next stage (if any) will not be
+# reconfigured as well.
+.PHONY: stage1-bubble
+stage1-bubble::
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage1-lean ; then \
+ echo Skipping rebuild of stage1 ; \
+ else \
+ $(MAKE) stage1-start; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage1; \
+ fi
+
+.PHONY: all-stage1 clean-stage1
+do-clean: clean-stage1
+
+# 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
+
+
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+
+.PHONY: distclean-stage1
+distclean-stage1::
+ @: $(MAKE); $(stage)
+ rm -rf stage1-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage2-start stage2-end
+
+stage2-start::
+ @: $(MAKE); $(stage); \
+ echo stage2 > stage_current ; \
+ echo stage2 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+@if bfd
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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 libdecnumber
+ @cd $(HOST_SUBDIR); [ -d stage2-libdecnumber ] || \
+ mkdir stage2-libdecnumber; \
+ set stage2-libdecnumber libdecnumber ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stage1-libdecnumber prev-libdecnumber ; \
+ @CREATE_LINK_TO_DIR@
+@endif libdecnumber
+@if libiberty
+ @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
+ @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
+ @[ -d stage2-$(TARGET_SUBDIR) ] || \
+ mkdir stage2-$(TARGET_SUBDIR); \
+ set stage2-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stage1-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) ; \
+ @CREATE_LINK_TO_DIR@
+
+stage2-end::
+ @rm -f stage_current
+@if bfd
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set bfd stage2-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage1-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif bfd
+@if opcodes
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set opcodes stage2-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage1-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif opcodes
+@if binutils
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set binutils stage2-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage1-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif binutils
+@if gas
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set gas stage2-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage1-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif gas
+@if gcc
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set gcc stage2-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage1-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif gcc
+@if intl
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set intl stage2-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage1-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif intl
+@if ld
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set ld stage2-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage1-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif ld
+@if libcpp
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set libcpp stage2-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage1-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif libcpp
+@if libdecnumber
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set libdecnumber stage2-libdecnumber ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libdecnumber stage1-libdecnumber ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif libdecnumber
+@if libiberty
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set libiberty stage2-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage1-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif libiberty
+@if zlib
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set zlib stage2-zlib ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-zlib stage1-zlib ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif zlib
+ @if test -d $(TARGET_SUBDIR) ; then \
+ set $(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+
+# Bubble a bugfix through all the stages up to stage 2. They are
+# remade, but not reconfigured. The next stage (if any) will not be
+# reconfigured as well.
+.PHONY: stage2-bubble
+stage2-bubble:: stage1-bubble
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage2-lean || test -f stage1-lean ; then \
+ echo Skipping rebuild of stage2 ; \
+ else \
+ $(MAKE) stage2-start; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage2; \
+ fi
+
+.PHONY: all-stage2 clean-stage2
+do-clean: clean-stage2
+
+# 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
+
+
+
+.PHONY: bootstrap2
+bootstrap2:
+ echo stage2 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage2-bubble
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stage1:: distclean-stage2
+.PHONY: distclean-stage2
+distclean-stage2::
+ @: $(MAKE); $(stage)
+ rm -rf stage2-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage3-start stage3-end
+
+stage3-start::
+ @: $(MAKE); $(stage); \
+ echo stage3 > stage_current ; \
+ echo stage3 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+@if bfd
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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 libdecnumber
+ @cd $(HOST_SUBDIR); [ -d stage3-libdecnumber ] || \
+ mkdir stage3-libdecnumber; \
+ set stage3-libdecnumber libdecnumber ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stage2-libdecnumber prev-libdecnumber ; \
+ @CREATE_LINK_TO_DIR@
+@endif libdecnumber
+@if libiberty
+ @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
+ @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
+ @[ -d stage3-$(TARGET_SUBDIR) ] || \
+ mkdir stage3-$(TARGET_SUBDIR); \
+ set stage3-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stage2-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) ; \
+ @CREATE_LINK_TO_DIR@
+
+stage3-end::
+ @rm -f stage_current
+@if bfd
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set bfd stage3-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage2-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif bfd
+@if opcodes
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set opcodes stage3-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage2-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif opcodes
+@if binutils
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set binutils stage3-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage2-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif binutils
+@if gas
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set gas stage3-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage2-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif gas
+@if gcc
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set gcc stage3-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage2-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif gcc
+@if intl
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set intl stage3-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage2-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif intl
+@if ld
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set ld stage3-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage2-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif ld
+@if libcpp
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set libcpp stage3-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage2-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif libcpp
+@if libdecnumber
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set libdecnumber stage3-libdecnumber ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libdecnumber stage2-libdecnumber ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif libdecnumber
+@if libiberty
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set libiberty stage3-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage2-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif libiberty
+@if zlib
+ @if test -d $(HOST_SUBDIR) ; then \
+ cd $(HOST_SUBDIR); set zlib stage3-zlib ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-zlib stage2-zlib ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+@endif zlib
+ @if test -d $(TARGET_SUBDIR) ; then \
+ set $(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR) ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-$(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ fi
+
+# Bubble a bugfix through all the stages up to stage 3. They are
+# remade, but not reconfigured. The next stage (if any) will not be
+# reconfigured as well.
+.PHONY: stage3-bubble
+stage3-bubble:: stage2-bubble
+ @bootstrap_lean@-rm -rf stage1-* ; $(STAMP) stage1-lean
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage3-lean || test -f stage2-lean ; then \
+ echo Skipping rebuild of stage3 ; \
+ else \
+ $(MAKE) stage3-start; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage3; \
+ fi
+ $(MAKE) compare
+
+.PHONY: all-stage3 clean-stage3
+do-clean: clean-stage3
+
+# 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:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if test -f stage2-lean; then \
+ echo Cannot compare object files as stage 2 was deleted. ; \
+ exit 0 ; \
+ fi; \
+ : $(MAKE); $(stage); \
+ rm -f .bad_compare ; \
+ cd stage3-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \