Skip to content
Snippets Groups Projects
Makefile.in 1.11 MiB
Newer Older
	srcdiroption="--srcdir=$${topdir}/bfd"; \
	libsrcdir="$$s/bfd"; \
	$(SHELL) $${libsrcdir}/configure \
	  $(HOST_CONFIGARGS) $${srcdiroption} \
	  @stage2_werror_flag@ 
@endif bfd-bootstrap

.PHONY: configure-stage4-bfd maybe-configure-stage4-bfd
maybe-configure-stage4-bfd:
@if bfd-bootstrap
maybe-configure-stage4-bfd: configure-stage4-bfd
	@[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start
	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd
	test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	echo Configuring stage 4 in $(HOST_SUBDIR)/bfd ; \
	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
	cd $(HOST_SUBDIR)/bfd || exit 1; \
	case $(srcdir) in \
	  /* | [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@ 
@endif bfd-bootstrap

.PHONY: configure-stageprofile-bfd maybe-configure-stageprofile-bfd
maybe-configure-stageprofile-bfd:
@if bfd-bootstrap
maybe-configure-stageprofile-bfd: configure-stageprofile-bfd
	@[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start
	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd
	test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	echo Configuring stage profile in $(HOST_SUBDIR)/bfd ; \
	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
	cd $(HOST_SUBDIR)/bfd || exit 1; \
	case $(srcdir) in \
	  /* | [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@ 
@endif bfd-bootstrap

.PHONY: configure-stagefeedback-bfd maybe-configure-stagefeedback-bfd
maybe-configure-stagefeedback-bfd:
@if bfd-bootstrap
maybe-configure-stagefeedback-bfd: configure-stagefeedback-bfd
	@[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start
	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd
	test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	echo Configuring stage feedback in $(HOST_SUBDIR)/bfd ; \
	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
	cd $(HOST_SUBDIR)/bfd || exit 1; \
	case $(srcdir) in \
	  /* | [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@ 
@endif bfd-bootstrap





Paolo Bonzini's avatar
Paolo Bonzini committed
TARGET-bfd=all
Paolo Bonzini's avatar
Paolo Bonzini committed
	@test -f stage_last && exit 0; \
	r=`${PWD_COMMAND}`; export r; \
	(cd $(HOST_SUBDIR)/bfd && \
	  $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-bfd))

.PHONY: all-stage1-bfd maybe-all-stage1-bfd
.PHONY: clean-stage1-bfd maybe-clean-stage1-bfd
maybe-all-stage1-bfd:
maybe-clean-stage1-bfd:
@if bfd-bootstrap
maybe-all-stage1-bfd: all-stage1-bfd
all-stage1: all-stage1-bfd
TARGET-stage1-bfd = $(TARGET-bfd)
all-stage1-bfd: configure-stage1-bfd
	@[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS)  CFLAGS="$(STAGE1_CFLAGS)"  \
		$(TARGET-stage1-bfd)

maybe-clean-stage1-bfd: clean-stage1-bfd
clean-stage1: clean-stage1-bfd
clean-stage1-bfd:
	@[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-bfd/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		CFLAGS="$(STAGE1_CFLAGS)"  clean
@endif bfd-bootstrap


.PHONY: all-stage2-bfd maybe-all-stage2-bfd
.PHONY: clean-stage2-bfd maybe-clean-stage2-bfd
maybe-all-stage2-bfd:
maybe-clean-stage2-bfd:
@if bfd-bootstrap
maybe-all-stage2-bfd: all-stage2-bfd
all-stage2: all-stage2-bfd
TARGET-stage2-bfd = $(TARGET-bfd)
all-stage2-bfd: configure-stage2-bfd
	@[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS)   \
		$(TARGET-stage2-bfd)

maybe-clean-stage2-bfd: clean-stage2-bfd
clean-stage2: clean-stage2-bfd
clean-stage2-bfd:
	@[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-bfd/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		  clean
@endif bfd-bootstrap


.PHONY: all-stage3-bfd maybe-all-stage3-bfd
.PHONY: clean-stage3-bfd maybe-clean-stage3-bfd
maybe-all-stage3-bfd:
maybe-clean-stage3-bfd:
@if bfd-bootstrap
maybe-all-stage3-bfd: all-stage3-bfd
all-stage3: all-stage3-bfd
TARGET-stage3-bfd = $(TARGET-bfd)
all-stage3-bfd: configure-stage3-bfd
	@[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS)   \
		$(TARGET-stage3-bfd)

maybe-clean-stage3-bfd: clean-stage3-bfd
clean-stage3: clean-stage3-bfd
clean-stage3-bfd:
	@[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-bfd/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		  clean
@endif bfd-bootstrap


.PHONY: all-stage4-bfd maybe-all-stage4-bfd
.PHONY: clean-stage4-bfd maybe-clean-stage4-bfd
maybe-all-stage4-bfd:
maybe-clean-stage4-bfd:
@if bfd-bootstrap
maybe-all-stage4-bfd: all-stage4-bfd
all-stage4: all-stage4-bfd
TARGET-stage4-bfd = $(TARGET-bfd)
all-stage4-bfd: configure-stage4-bfd
	@[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS)   \
		$(TARGET-stage4-bfd)

maybe-clean-stage4-bfd: clean-stage4-bfd
clean-stage4: clean-stage4-bfd
clean-stage4-bfd:
	@[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-bfd/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		  clean
@endif bfd-bootstrap


.PHONY: all-stageprofile-bfd maybe-all-stageprofile-bfd
.PHONY: clean-stageprofile-bfd maybe-clean-stageprofile-bfd
maybe-all-stageprofile-bfd:
maybe-clean-stageprofile-bfd:
@if bfd-bootstrap
maybe-all-stageprofile-bfd: all-stageprofile-bfd
all-stageprofile: all-stageprofile-bfd
TARGET-stageprofile-bfd = $(TARGET-bfd)
all-stageprofile-bfd: configure-stageprofile-bfd
	@[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  \
		$(TARGET-stageprofile-bfd)

maybe-clean-stageprofile-bfd: clean-stageprofile-bfd
clean-stageprofile: clean-stageprofile-bfd
clean-stageprofile-bfd:
	@[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-bfd/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
@endif bfd-bootstrap


.PHONY: all-stagefeedback-bfd maybe-all-stagefeedback-bfd
.PHONY: clean-stagefeedback-bfd maybe-clean-stagefeedback-bfd
maybe-all-stagefeedback-bfd:
maybe-clean-stagefeedback-bfd:
@if bfd-bootstrap
maybe-all-stagefeedback-bfd: all-stagefeedback-bfd
all-stagefeedback: all-stagefeedback-bfd
TARGET-stagefeedback-bfd = $(TARGET-bfd)
all-stagefeedback-bfd: configure-stagefeedback-bfd
	@[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  \
		$(TARGET-stagefeedback-bfd)

maybe-clean-stagefeedback-bfd: clean-stagefeedback-bfd
clean-stagefeedback: clean-stagefeedback-bfd
clean-stagefeedback-bfd:
	@[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-bfd/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start
	cd $(HOST_SUBDIR)/bfd && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
@endif bfd-bootstrap





@if bfd
maybe-check-bfd: check-bfd
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	(cd $(HOST_SUBDIR)/bfd && \
	  $(MAKE) $(FLAGS_TO_PASS)  check)
.PHONY: install-bfd maybe-install-bfd
maybe-install-bfd:
@if bfd
maybe-install-bfd: install-bfd
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	(cd $(HOST_SUBDIR)/bfd && \
# Other targets (info, dvi, etc.)

.PHONY: maybe-info-bfd info-bfd
maybe-info-bfd:
@if bfd
maybe-info-bfd: info-bfd
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \
	(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}" \
@if bfd
maybe-dvi-bfd: dvi-bfd
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \
	(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}" \
.PHONY: maybe-html-bfd html-bfd
maybe-html-bfd:
@if bfd
maybe-html-bfd: html-bfd

html-bfd: \
	@[ -f ./bfd/Makefile ] || exit 0; \
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(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

@if bfd
maybe-TAGS-bfd: TAGS-bfd
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \
	(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}" \
.PHONY: maybe-install-info-bfd install-info-bfd
maybe-install-info-bfd:
@if bfd
maybe-install-info-bfd: install-info-bfd
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \
	(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}" \
	          install-info) \
.PHONY: maybe-installcheck-bfd installcheck-bfd
maybe-installcheck-bfd:
@if bfd
maybe-installcheck-bfd: installcheck-bfd
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \
	(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}" \
	          installcheck) \
.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd
maybe-mostlyclean-bfd:
@if bfd
maybe-mostlyclean-bfd: mostlyclean-bfd
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \
	(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}" \
	          mostlyclean) \
@if bfd
maybe-clean-bfd: clean-bfd
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \
	(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}" \
.PHONY: maybe-distclean-bfd distclean-bfd
maybe-distclean-bfd:
@if bfd
maybe-distclean-bfd: distclean-bfd
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \
	(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}" \
	          distclean) \
.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd
maybe-maintainer-clean-bfd:
@if bfd
maybe-maintainer-clean-bfd: maintainer-clean-bfd
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \
	(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}" \
	          maintainer-clean) \
.PHONY: configure-opcodes maybe-configure-opcodes
maybe-configure-opcodes:
@if opcodes
maybe-configure-opcodes: configure-opcodes
Paolo Bonzini's avatar
Paolo Bonzini committed
	@test -f stage_last && exit 0; \
	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; \
	echo Configuring in $(HOST_SUBDIR)/opcodes; \
	cd "$(HOST_SUBDIR)/opcodes" || exit 1; \
	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
	  *) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
	srcdiroption="--srcdir=$${topdir}/opcodes"; \
	libsrcdir="$$s/opcodes"; \
.PHONY: configure-stage1-opcodes maybe-configure-stage1-opcodes
maybe-configure-stage1-opcodes:
@if opcodes-bootstrap
maybe-configure-stage1-opcodes: configure-stage1-opcodes
	@[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start
	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
	test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
	$(HOST_EXPORTS) \
	echo Configuring stage 1 in $(HOST_SUBDIR)/opcodes ; \
	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
	cd $(HOST_SUBDIR)/opcodes || exit 1; \
	case $(srcdir) in \
	  /* | [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)" 
@endif opcodes-bootstrap

.PHONY: configure-stage2-opcodes maybe-configure-stage2-opcodes
maybe-configure-stage2-opcodes:
@if opcodes-bootstrap
maybe-configure-stage2-opcodes: configure-stage2-opcodes
	@[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start
	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
	test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	echo Configuring stage 2 in $(HOST_SUBDIR)/opcodes ; \
	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
	cd $(HOST_SUBDIR)/opcodes || exit 1; \
	case $(srcdir) in \
	  /* | [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@ 
@endif opcodes-bootstrap

.PHONY: configure-stage3-opcodes maybe-configure-stage3-opcodes
maybe-configure-stage3-opcodes:
@if opcodes-bootstrap
maybe-configure-stage3-opcodes: configure-stage3-opcodes
	@[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start
	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
	test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	echo Configuring stage 3 in $(HOST_SUBDIR)/opcodes ; \
	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
	cd $(HOST_SUBDIR)/opcodes || exit 1; \
	case $(srcdir) in \
	  /* | [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@ 
@endif opcodes-bootstrap

.PHONY: configure-stage4-opcodes maybe-configure-stage4-opcodes
maybe-configure-stage4-opcodes:
@if opcodes-bootstrap
maybe-configure-stage4-opcodes: configure-stage4-opcodes
	@[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start
	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
	test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	echo Configuring stage 4 in $(HOST_SUBDIR)/opcodes ; \
	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
	cd $(HOST_SUBDIR)/opcodes || exit 1; \
	case $(srcdir) in \
	  /* | [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@ 
@endif opcodes-bootstrap

.PHONY: configure-stageprofile-opcodes maybe-configure-stageprofile-opcodes
maybe-configure-stageprofile-opcodes:
@if opcodes-bootstrap
maybe-configure-stageprofile-opcodes: configure-stageprofile-opcodes
	@[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start
	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
	test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	echo Configuring stage profile in $(HOST_SUBDIR)/opcodes ; \
	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
	cd $(HOST_SUBDIR)/opcodes || exit 1; \
	case $(srcdir) in \
	  /* | [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@ 
@endif opcodes-bootstrap

.PHONY: configure-stagefeedback-opcodes maybe-configure-stagefeedback-opcodes
maybe-configure-stagefeedback-opcodes:
@if opcodes-bootstrap
maybe-configure-stagefeedback-opcodes: configure-stagefeedback-opcodes
	@[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start
	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes
	test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	echo Configuring stage feedback in $(HOST_SUBDIR)/opcodes ; \
	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
	cd $(HOST_SUBDIR)/opcodes || exit 1; \
	case $(srcdir) in \
	  /* | [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@ 
@endif opcodes-bootstrap





.PHONY: all-opcodes maybe-all-opcodes
maybe-all-opcodes:
Paolo Bonzini's avatar
Paolo Bonzini committed
TARGET-opcodes=all
maybe-all-opcodes: all-opcodes
Paolo Bonzini's avatar
Paolo Bonzini committed
	@test -f stage_last && exit 0; \
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	(cd $(HOST_SUBDIR)/opcodes && \
	  $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-opcodes))

.PHONY: all-stage1-opcodes maybe-all-stage1-opcodes
.PHONY: clean-stage1-opcodes maybe-clean-stage1-opcodes
maybe-all-stage1-opcodes:
maybe-clean-stage1-opcodes:
@if opcodes-bootstrap
maybe-all-stage1-opcodes: all-stage1-opcodes
all-stage1: all-stage1-opcodes
TARGET-stage1-opcodes = $(TARGET-opcodes)
all-stage1-opcodes: configure-stage1-opcodes
	@[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS)  CFLAGS="$(STAGE1_CFLAGS)"  \
		$(TARGET-stage1-opcodes)

maybe-clean-stage1-opcodes: clean-stage1-opcodes
clean-stage1: clean-stage1-opcodes
clean-stage1-opcodes:
	@[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-opcodes/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stage1 ] || $(MAKE) stage1-start
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		CFLAGS="$(STAGE1_CFLAGS)"  clean
@endif opcodes-bootstrap


.PHONY: all-stage2-opcodes maybe-all-stage2-opcodes
.PHONY: clean-stage2-opcodes maybe-clean-stage2-opcodes
maybe-all-stage2-opcodes:
maybe-clean-stage2-opcodes:
@if opcodes-bootstrap
maybe-all-stage2-opcodes: all-stage2-opcodes
all-stage2: all-stage2-opcodes
TARGET-stage2-opcodes = $(TARGET-opcodes)
all-stage2-opcodes: configure-stage2-opcodes
	@[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS)   \
		$(TARGET-stage2-opcodes)

maybe-clean-stage2-opcodes: clean-stage2-opcodes
clean-stage2: clean-stage2-opcodes
clean-stage2-opcodes:
	@[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-opcodes/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stage2 ] || $(MAKE) stage2-start
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		  clean
@endif opcodes-bootstrap


.PHONY: all-stage3-opcodes maybe-all-stage3-opcodes
.PHONY: clean-stage3-opcodes maybe-clean-stage3-opcodes
maybe-all-stage3-opcodes:
maybe-clean-stage3-opcodes:
@if opcodes-bootstrap
maybe-all-stage3-opcodes: all-stage3-opcodes
all-stage3: all-stage3-opcodes
TARGET-stage3-opcodes = $(TARGET-opcodes)
all-stage3-opcodes: configure-stage3-opcodes
	@[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS)   \
		$(TARGET-stage3-opcodes)

maybe-clean-stage3-opcodes: clean-stage3-opcodes
clean-stage3: clean-stage3-opcodes
clean-stage3-opcodes:
	@[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-opcodes/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stage3 ] || $(MAKE) stage3-start
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		  clean
@endif opcodes-bootstrap


.PHONY: all-stage4-opcodes maybe-all-stage4-opcodes
.PHONY: clean-stage4-opcodes maybe-clean-stage4-opcodes
maybe-all-stage4-opcodes:
maybe-clean-stage4-opcodes:
@if opcodes-bootstrap
maybe-all-stage4-opcodes: all-stage4-opcodes
all-stage4: all-stage4-opcodes
TARGET-stage4-opcodes = $(TARGET-opcodes)
all-stage4-opcodes: configure-stage4-opcodes
	@[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS)   \
		$(TARGET-stage4-opcodes)

maybe-clean-stage4-opcodes: clean-stage4-opcodes
clean-stage4: clean-stage4-opcodes
clean-stage4-opcodes:
	@[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-opcodes/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stage4 ] || $(MAKE) stage4-start
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		  clean
@endif opcodes-bootstrap


.PHONY: all-stageprofile-opcodes maybe-all-stageprofile-opcodes
.PHONY: clean-stageprofile-opcodes maybe-clean-stageprofile-opcodes
maybe-all-stageprofile-opcodes:
maybe-clean-stageprofile-opcodes:
@if opcodes-bootstrap
maybe-all-stageprofile-opcodes: all-stageprofile-opcodes
all-stageprofile: all-stageprofile-opcodes
TARGET-stageprofile-opcodes = $(TARGET-opcodes)
all-stageprofile-opcodes: configure-stageprofile-opcodes
	@[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  \
		$(TARGET-stageprofile-opcodes)

maybe-clean-stageprofile-opcodes: clean-stageprofile-opcodes
clean-stageprofile: clean-stageprofile-opcodes
clean-stageprofile-opcodes:
	@[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-opcodes/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stageprofile ] || $(MAKE) stageprofile-start
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"  clean
@endif opcodes-bootstrap


.PHONY: all-stagefeedback-opcodes maybe-all-stagefeedback-opcodes
.PHONY: clean-stagefeedback-opcodes maybe-clean-stagefeedback-opcodes
maybe-all-stagefeedback-opcodes:
maybe-clean-stagefeedback-opcodes:
@if opcodes-bootstrap
maybe-all-stagefeedback-opcodes: all-stagefeedback-opcodes
all-stagefeedback: all-stagefeedback-opcodes
TARGET-stagefeedback-opcodes = $(TARGET-opcodes)
all-stagefeedback-opcodes: configure-stagefeedback-opcodes
	@[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
	$(POSTSTAGE1_HOST_EXPORTS) \
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  \
		$(TARGET-stagefeedback-opcodes)

maybe-clean-stagefeedback-opcodes: clean-stagefeedback-opcodes
clean-stagefeedback: clean-stagefeedback-opcodes
clean-stagefeedback-opcodes:
	@[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-opcodes/Makefile ] \
	  || exit 0 ; \
	[ `cat stage_current` = stagefeedback ] || $(MAKE) stagefeedback-start
	cd $(HOST_SUBDIR)/opcodes && \
	$(MAKE) $(FLAGS_TO_PASS)  \
		$(POSTSTAGE1_FLAGS_TO_PASS)  \
		CFLAGS="$(BOOT_CFLAGS) -fprofile-use"  clean
@endif opcodes-bootstrap





.PHONY: check-opcodes maybe-check-opcodes
maybe-check-opcodes:
@if opcodes
maybe-check-opcodes: check-opcodes
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	(cd $(HOST_SUBDIR)/opcodes && \
	  $(MAKE) $(FLAGS_TO_PASS)  check)
.PHONY: install-opcodes maybe-install-opcodes
maybe-install-opcodes:
@if opcodes
maybe-install-opcodes: install-opcodes
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	(cd $(HOST_SUBDIR)/opcodes && \
.PHONY: maybe-info-opcodes info-opcodes
maybe-info-opcodes:
@if opcodes
maybe-info-opcodes: info-opcodes
	r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	for flag in $(EXTRA_HOST_FLAGS) ; do \
	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
	done; \