+@endif target-libada
+
+.PHONY: maybe-TAGS-target-libada TAGS-target-libada
+maybe-TAGS-target-libada:
+@if target-libada
+maybe-TAGS-target-libada: TAGS-target-libada
+
+TAGS-target-libada: \
+ configure-target-libada
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS 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}" \
+ TAGS) \
+ || exit 1
+
+@endif target-libada
+
+.PHONY: maybe-install-info-target-libada install-info-target-libada
+maybe-install-info-target-libada:
+@if target-libada
+maybe-install-info-target-libada: install-info-target-libada
+
+install-info-target-libada: \
+ configure-target-libada \
+ info-target-libada
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info 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}" \
+ install-info) \
+ || exit 1
+
+@endif target-libada
+
+.PHONY: maybe-installcheck-target-libada installcheck-target-libada
+maybe-installcheck-target-libada:
+@if target-libada
+maybe-installcheck-target-libada: installcheck-target-libada
+
+installcheck-target-libada: \
+ configure-target-libada
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck 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}" \
+ installcheck) \
+ || exit 1
+
+@endif target-libada
+
+.PHONY: maybe-mostlyclean-target-libada mostlyclean-target-libada
+maybe-mostlyclean-target-libada:
+@if target-libada
+maybe-mostlyclean-target-libada: mostlyclean-target-libada
+
+mostlyclean-target-libada:
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean 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}" \
+ mostlyclean) \
+ || exit 1
+
+@endif target-libada
+
+.PHONY: maybe-clean-target-libada clean-target-libada
+maybe-clean-target-libada:
+@if target-libada
+maybe-clean-target-libada: clean-target-libada
+
+clean-target-libada:
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean 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}" \
+ clean) \
+ || exit 1
+
+@endif target-libada
+
+.PHONY: maybe-distclean-target-libada distclean-target-libada
+maybe-distclean-target-libada:
+@if target-libada
+maybe-distclean-target-libada: distclean-target-libada
+
+distclean-target-libada:
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean 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}" \
+ distclean) \
+ || exit 1
+
+@endif target-libada
+
+.PHONY: maybe-maintainer-clean-target-libada maintainer-clean-target-libada
+maybe-maintainer-clean-target-libada:
+@if target-libada
+maybe-maintainer-clean-target-libada: maintainer-clean-target-libada
+
+maintainer-clean-target-libada:
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean 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}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libada
+
+
+
+# ----------
+# GCC module
+# ----------
+
+@if gcc-no-bootstrap
+# GCC has some more recursive targets, which trigger the old
+# (but still current, until the toplevel bootstrap project
+# is finished) compiler bootstrapping rules.
+
+GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
+.PHONY: $(GCC_STRAP_TARGETS)
+$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo "Bootstrapping the compiler"; \
+ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,:[ :]*,:,g;s,^[ :]*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ case "$@" in \
+ *bootstrap4-lean ) \
+ msg="Comparing stage3 and stage4 of the compiler"; \
+ compare=compare3-lean ;; \
+ *bootstrap4 ) \
+ msg="Comparing stage3 and stage4 of the compiler"; \
+ compare=compare3 ;; \
+ *-lean ) \
+ msg="Comparing stage2 and stage3 of the compiler"; \
+ compare=compare-lean ;; \
+ * ) \
+ msg="Comparing stage2 and stage3 of the compiler"; \
+ compare=compare ;; \
+ esac; \
+ $(HOST_EXPORTS) \
+ echo "$$msg"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ echo "Building runtime libraries"; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
+
+profiledbootstrap: all-prebootstrap configure-gcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,:[ :]*,:,g;s,^[ :]*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
+ echo "Bootstrapping training compiler"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo "Building feedback based compiler"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ echo "Building runtime libraries"; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
+
+.PHONY: cross
+cross: all-build all-gas all-ld
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ echo "Building the C and C++ compiler"; \
+ cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ echo "Building runtime libraries"; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
+@endif gcc-no-bootstrap
+
+@if gcc
+.PHONY: check-gcc-c++
+check-gcc-c++:
+ @if [ -f ./gcc/Makefile ] ; then \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
+ else \
+ true; \
+ fi
+
+.PHONY: check-c++
+check-c++: check-target-libstdc++-v3 check-gcc-c++
+
+# Install the gcc headers files, but not the fixed include files,
+# which Cygnus is not allowed to distribute. This rule is very
+# dependent on the workings of the gcc Makefile.in.
+.PHONY: gcc-no-fixedincludes
+gcc-no-fixedincludes:
+ @if [ -f ./gcc/Makefile ]; then \
+ rm -rf gcc/tmp-include; \
+ mv gcc/include gcc/tmp-include 2>/dev/null; \
+ mkdir gcc/include; \
+ cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
+ touch gcc/stmp-fixinc gcc/include/fixed; \
+ rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ $(HOST_EXPORTS) \
+ (cd ./gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
+ rm -rf gcc/include; \
+ mv gcc/tmp-include gcc/include 2>/dev/null; \
+ else true; fi
+@endif gcc
+
+# ---------------------
+# GCC bootstrap support
+# ---------------------
+
+# We track the current stage (the one in 'gcc') in the stage_current file.
+# stage_last instead tracks the stage that was built last. These targets
+# are dummy when toplevel bootstrap is not active.
+
+.PHONY: unstage
+unstage:
+@if gcc-bootstrap
+ @[ -f stage_current ] || $(MAKE) `cat stage_last`-start
+@endif gcc-bootstrap
+
+.PHONY: stage
+stage:
+@if gcc-bootstrap
+ @$(MAKE) `cat stage_current`-end
+@endif gcc-bootstrap
+
+# We name the build directories for the various stages "stage1-gcc",
+# "stage2-gcc","stage3-gcc", etc.
+
+# Since the 'compare' process will fail (on debugging information) if any
+# directory names are different, we need to link the gcc directory for
+# the previous stage to a constant name ('gcc-prev'), and to make the name of
+# the build directories constant as well. For the latter, we use naked names
+# like 'gcc', because the scripts in that directory assume it. We use
+# mv on platforms where symlinks to directories do not work or are not
+# reliable.
+
+# At the end of the bootstrap, a symlink to 'stage3-gcc' named 'gcc' must
+# be kept, so that libraries can find it. Ick!
+
+# It would be best to preinstall gcc into a staging area (and in the
+# future, gather there all prebootstrap packages). This would allow
+# assemblers and linkers can be bootstrapped as well as the compiler
+# (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 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 >
+
+# Only build the C compiler for stage1, because that is the only one that
+# we can guarantee will build with the native compiler, and also it is the
+# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
+
+STAGE1_CFLAGS=@stage1_cflags@
+STAGE1_LANGUAGES=@stage1_languages@
+
+# We only want to compare .o files, so set this!
+objext = .o
+
+# Flags to pass to stage2 and later makes.
+POSTSTAGE1_FLAGS_TO_PASS = \
+ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
+ STAGE_PREFIX=$$r/stage-gcc/ \
+ CFLAGS="$(BOOT_CFLAGS)" \
+ ADAC="\$$(CC)"
+
+# For stage 1:
+# * We force-disable intermodule optimizations, even if
+# --enable-intermodule was passed, since the installed compiler probably
+# can't handle them. Luckily, autoconf always respects
+# the last argument when conflicting --enable arguments are passed.
+# * Likewise, we force-disable coverage flags, since the installed compiler
+# probably has never heard of them.
+# * We build only C (and possibly Ada).
+
+
+.PHONY: stage1-start stage1-end
+
+stage1-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stage1 > stage_current ; \
+ echo stage1 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_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 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
+
+stage1-end::
+ @rm -f stage_current
+@if bfd
+ @cd $(HOST_SUBDIR); set bfd stage1-bfd ; \
+ @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); set opcodes stage1-opcodes ; \
+ @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); set binutils stage1-binutils ; \
+ @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); set gas stage1-gas ; \
+ @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); set gcc stage1-gcc ; \
+ @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); set intl stage1-intl ; \
+ @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); set ld stage1-ld ; \
+ @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); set libcpp stage1-libcpp ; \
+ @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @cd $(HOST_SUBDIR); set libiberty stage1-libiberty ; \
+ @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @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
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage1-bubble
+stage1-bubble::
+ @if test -f stage1-lean ; then \
+ echo Skipping rebuild of stage1 ; \
+ else \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= 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::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stage1-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage2-start stage2-end
+
+stage2-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stage2 > stage_current ; \
+ echo stage2 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_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 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
+
+stage2-end::
+ @rm -f stage_current
+@if bfd
+ @cd $(HOST_SUBDIR); set bfd stage2-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage1-bfd ; \
+ @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); set opcodes stage2-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage1-opcodes ; \
+ @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); set binutils stage2-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage1-binutils ; \
+ @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); set gas stage2-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage1-gas ; \
+ @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); set gcc stage2-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage1-gcc ; \
+ @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); set intl stage2-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage1-intl ; \
+ @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); set ld stage2-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage1-ld ; \
+ @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); set libcpp stage2-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage1-libcpp ; \
+ @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @cd $(HOST_SUBDIR); set libiberty stage2-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage1-libiberty ; \
+ @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @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
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage2-bubble
+stage2-bubble:: stage1-bubble
+ @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 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: stage2-bubble all
+
+
+# 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 stage2-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage3-start stage3-end
+
+stage3-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stage3 > stage_current ; \
+ echo stage3 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_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 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
+
+stage3-end::
+ @rm -f stage_current
+@if bfd
+ @cd $(HOST_SUBDIR); set bfd stage3-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage2-bfd ; \
+ @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); set opcodes stage3-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage2-opcodes ; \
+ @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); set binutils stage3-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage2-binutils ; \
+ @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); set gas stage3-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage2-gas ; \
+ @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); set gcc stage3-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage2-gcc ; \
+ @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); set intl stage3-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage2-intl ; \
+ @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); set ld stage3-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage2-ld ; \
+ @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); set libcpp stage3-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage2-libcpp ; \
+ @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @cd $(HOST_SUBDIR); set libiberty stage3-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage2-libiberty ; \
+ @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @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
+# 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
+ @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 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:
+ @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 ; \
+ cd stage3-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \
+ cd .. ; \
+ for file in $${files} ; do \
+ f1=$$r/stage2-gcc/$$file; f2=$$r/stage3-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
+ test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+ done ; \
+ if [ -f .bad_compare ]; then \
+ echo "Bootstrap comparison failure!"; \
+ cat .bad_compare; \
+ exit 1; \
+ else \
+ true; \
+ fi ; \
+ $(STAMP) compare
+ @bootstrap_lean@-rm -rf stage2-* ; $(STAMP) stage2-lean
+
+
+
+.PHONY: bootstrap
+bootstrap: stage3-bubble compare all
+
+
+# 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 stage3-* compare
+
+
+.PHONY: cleanstrap
+cleanstrap: distclean bootstrap
+
+@endif gcc-bootstrap
+
+
+.PHONY: stage4-start stage4-end
+
+stage4-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stage4 > stage_current ; \
+ echo stage4 > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
+@if bfd
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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 libiberty
+ @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
+ @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
+@if bfd
+ @cd $(HOST_SUBDIR); set bfd stage4-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage3-bfd ; \
+ @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); set opcodes stage4-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage3-opcodes ; \
+ @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); set binutils stage4-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage3-binutils ; \
+ @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); set gas stage4-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage3-gas ; \
+ @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); set gcc stage4-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage3-gcc ; \
+ @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); set intl stage4-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage3-intl ; \
+ @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); set ld stage4-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage3-ld ; \
+ @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); set libcpp stage4-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage3-libcpp ; \
+ @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @cd $(HOST_SUBDIR); set libiberty stage4-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage3-libiberty ; \
+ @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @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
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stage4-bubble
+stage4-bubble:: stage3-bubble
+ @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 clean-stage4
+do-clean: clean-stage4
+
+# 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:
+ @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 ; \
+ cd stage4-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \
+ cd .. ; \
+ for file in $${files} ; do \
+ f1=$$r/stage3-gcc/$$file; f2=$$r/stage4-gcc/$$file; \
+ @do_compare@ > /dev/null 2>&1; \
+ test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+ done ; \
+ if [ -f .bad_compare ]; then \
+ echo "Bootstrap comparison failure!"; \
+ cat .bad_compare; \
+ exit 1; \
+ else \
+ true; \
+ fi ; \
+ $(STAMP) compare3
+ @bootstrap_lean@-rm -rf stage3-* ; $(STAMP) stage3-lean
+
+
+
+.PHONY: bootstrap4
+bootstrap4: stage4-bubble compare3 all
+
+
+# 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 stage4-* compare3
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stageprofile-start stageprofile-end
+
+stageprofile-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stageprofile > stage_current ; \
+ echo stageprofile > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
+@if bfd
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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
+ @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 libiberty
+ @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
+ @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
+@if bfd
+ @cd $(HOST_SUBDIR); set bfd stageprofile-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stage1-bfd ; \
+ @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); set opcodes stageprofile-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stage1-opcodes ; \
+ @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); set binutils stageprofile-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stage1-binutils ; \
+ @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); set gas stageprofile-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stage1-gas ; \
+ @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); set gcc stageprofile-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stage1-gcc ; \
+ @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); set intl stageprofile-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stage1-intl ; \
+ @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); set ld stageprofile-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stage1-ld ; \
+ @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); set libcpp stageprofile-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stage1-libcpp ; \
+ @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @cd $(HOST_SUBDIR); set libiberty stageprofile-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stage1-libiberty ; \
+ @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @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
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stageprofile-bubble
+stageprofile-bubble:: stage1-bubble
+ @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 clean-stageprofile
+do-clean: clean-stageprofile
+
+# 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
+distclean-stage1:: distclean-stageprofile
+.PHONY: distclean-stageprofile
+distclean-stageprofile::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stageprofile-*
+
+
+@endif gcc-bootstrap
+
+
+.PHONY: stagefeedback-start stagefeedback-end
+
+stagefeedback-start::
+ @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ echo stagefeedback > stage_current ; \
+ echo stagefeedback > stage_last; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
+@if bfd
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-bfd ] || \
+ mkdir stagefeedback-bfd; \
+ set stagefeedback-bfd bfd ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-bfd prev-bfd ; \
+ @CREATE_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-opcodes ] || \
+ mkdir stagefeedback-opcodes; \
+ set stagefeedback-opcodes opcodes ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-opcodes prev-opcodes ; \
+ @CREATE_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-binutils ] || \
+ mkdir stagefeedback-binutils; \
+ set stagefeedback-binutils binutils ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-binutils prev-binutils ; \
+ @CREATE_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-gas ] || \
+ mkdir stagefeedback-gas; \
+ set stagefeedback-gas gas ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-gas prev-gas ; \
+ @CREATE_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-gcc ] || \
+ mkdir stagefeedback-gcc; \
+ set stagefeedback-gcc gcc ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-gcc prev-gcc ; \
+ @CREATE_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-intl ] || \
+ mkdir stagefeedback-intl; \
+ set stagefeedback-intl intl ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-intl prev-intl ; \
+ @CREATE_LINK_TO_DIR@
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-ld ] || \
+ mkdir stagefeedback-ld; \
+ set stagefeedback-ld ld ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-ld prev-ld ; \
+ @CREATE_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-libcpp ] || \
+ mkdir stagefeedback-libcpp; \
+ set stagefeedback-libcpp libcpp ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-libcpp prev-libcpp ; \
+ @CREATE_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-libiberty ] || \
+ mkdir stagefeedback-libiberty; \
+ set stagefeedback-libiberty libiberty ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-libiberty prev-libiberty ; \
+ @CREATE_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-zlib ] || \
+ mkdir stagefeedback-zlib; \
+ set stagefeedback-zlib zlib ; \
+ @CREATE_LINK_TO_DIR@ ; \
+ set stageprofile-zlib prev-zlib ; \
+ @CREATE_LINK_TO_DIR@
+@endif zlib
+
+stagefeedback-end::
+ @rm -f stage_current
+@if bfd
+ @cd $(HOST_SUBDIR); set bfd stagefeedback-bfd ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-bfd stageprofile-bfd ; \
+ @UNDO_LINK_TO_DIR@
+@endif bfd
+@if opcodes
+ @cd $(HOST_SUBDIR); set opcodes stagefeedback-opcodes ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-opcodes stageprofile-opcodes ; \
+ @UNDO_LINK_TO_DIR@
+@endif opcodes
+@if binutils
+ @cd $(HOST_SUBDIR); set binutils stagefeedback-binutils ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-binutils stageprofile-binutils ; \
+ @UNDO_LINK_TO_DIR@
+@endif binutils
+@if gas
+ @cd $(HOST_SUBDIR); set gas stagefeedback-gas ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gas stageprofile-gas ; \
+ @UNDO_LINK_TO_DIR@
+@endif gas
+@if gcc
+ @cd $(HOST_SUBDIR); set gcc stagefeedback-gcc ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-gcc stageprofile-gcc ; \
+ @UNDO_LINK_TO_DIR@
+@endif gcc
+@if intl
+ @cd $(HOST_SUBDIR); set intl stagefeedback-intl ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-intl stageprofile-intl ; \
+ @UNDO_LINK_TO_DIR@
+@endif intl
+@if ld
+ @cd $(HOST_SUBDIR); set ld stagefeedback-ld ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-ld stageprofile-ld ; \
+ @UNDO_LINK_TO_DIR@
+@endif ld
+@if libcpp
+ @cd $(HOST_SUBDIR); set libcpp stagefeedback-libcpp ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libcpp stageprofile-libcpp ; \
+ @UNDO_LINK_TO_DIR@
+@endif libcpp
+@if libiberty
+ @cd $(HOST_SUBDIR); set libiberty stagefeedback-libiberty ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-libiberty stageprofile-libiberty ; \
+ @UNDO_LINK_TO_DIR@
+@endif libiberty
+@if zlib
+ @cd $(HOST_SUBDIR); set zlib stagefeedback-zlib ; \
+ @UNDO_LINK_TO_DIR@ ; \
+ set prev-zlib stageprofile-zlib ; \
+ @UNDO_LINK_TO_DIR@
+@endif zlib
+
+# Bubble a bugfix through all the stages up to stage feedback. They
+# are remade, but not reconfigured. The next stage (if any) will not
+# be reconfigured as well.
+.PHONY: stagefeedback-bubble
+stagefeedback-bubble:: stageprofile-bubble
+ @if test -f stagefeedback-lean || test -f stageprofile-lean ; then \
+ echo Skipping rebuild of stagefeedback ; \
+ else \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stagefeedback; \
+ fi
+
+.PHONY: all-stagefeedback clean-stagefeedback
+do-clean: clean-stagefeedback
+
+# 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: profiledbootstrap
+profiledbootstrap: stagefeedback-bubble all
+
+
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
+distclean-stageprofile:: distclean-stagefeedback
+.PHONY: distclean-stagefeedback
+distclean-stagefeedback::
+ [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ rm -rf stagefeedback-*
+
+
+@endif gcc-bootstrap
+
+
+
+stageprofile-end::
+ $(MAKE) distclean-stagefeedback
+
+stagefeedback-start::
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ for i in prev-*; do \
+ j=`echo $$i | sed s/^prev-//` ; \
+ cd $$r/$$i && \
+ { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL) ; } && \
+ { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL) ; } ; \
+ done
+
+@if gcc-bootstrap
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+do-distclean: distclean-stage1
+@endif gcc-bootstrap
+
+# --------------------------------------
+# Dependencies between different modules
+# --------------------------------------
+
+# Generic dependencies for target modules on host stuff, especially gcc
+
+configure-target-libstdc++-v3: maybe-all-gcc
+
+configure-target-libmudflap: maybe-all-gcc
+
+configure-target-newlib: maybe-all-gcc
+
+configure-target-libgfortran: maybe-all-gcc