Lines Matching +full:install +full:- +full:module

1 [+ AutoGen5 template -*- Mode: Makefile -*-
35 # -------------------------------
36 # Standard Autoconf-set variables
37 # -------------------------------
86 INSTALL = @INSTALL@
96 # -------------------------------------------------
97 # Miscellaneous non-standard autoconf-set variables
98 # -------------------------------------------------
122 BUILD_CONFIGARGS = @build_configargs@ --with-build-subdir="$(BUILD_SUBDIR)"
140 # re-runs configure.
248 @if gcc-bootstrap
250 @endif gcc-bootstrap
256 @if target-libstdc++-v3-bootstrap
259 CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xg++$(exeext) \
260 -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \
261 -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
262 -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
263 …`if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/in…
264 …`if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/in…
265 `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$s/libstdc++-v3/libsupc++ \
266 -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
267 -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \
270 @endif target-libstdc++-v3-bootstrap
275 CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
276 -B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ \
281 GDC="$$r/$(HOST_SUBDIR)/prev-gcc/gdc$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \
282 -B$(build_tooldir)/bin/ $(GDCFLAGS_FOR_TARGET) \
283 -B$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/gcc \
284 -B$$r/prev-$(TARGET_SUBDIR)/libphobos/src \
285 -B$$r/prev-$(TARGET_SUBDIR)/libphobos/src/.libs \
286 -I$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime -I$$s/libphobos/libdruntime \
287 -L$$r/prev-$(TARGET_SUBDIR)/libphobos/src/.libs \
288 -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
289 -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; \
292 GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \
300 TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
331 @if gcc-bootstrap
333 @endif gcc-bootstrap
354 # ----------------------------------------------
356 # ----------------------------------------------
366 PWD_COMMAND = $${PWDCMD-pwd}
398 BOOT_CFLAGS= -g -O2
400 BOOT_ADAFLAGS= -gnatpg
413 AUTO_PROFILE = gcc-auto-profile --all -c 10000000
416 # sub-makes. It lets flags be given on the command line while still
419 MAKEINFOFLAGS = --split-size=5000000
421 # ---------------------------------------------
423 # ---------------------------------------------
451 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
476 $(filter-out -Werror=%,$(CFLAGS))
478 $(filter-out -Werror=%,$(CXXFLAGS))
480 $(filter-out -Wall,$(PGO_BUILD_TRAINING_CFLAGS))
482 $(filter-out -Wall,$(PGO_BUILD_TRAINING_CXXFLAGS))
484 $(filter-out -specs=%,$(PGO_BUILD_TRAINING_CFLAGS))
486 $(filter-out -specs=%,$(PGO_BUILD_TRAINING_CXXFLAGS))
493 PGO_BUILD_TRAINING_MFLAGS = -i
503 PGO-TRAINING-TARGETS = binutils gas gdb ld sim
504 PGO_BUILD_TRAINING = $(addprefix maybe-check-,$(PGO-TRAINING-TARGETS))
517 [+ FOR bootstrap-stage +]
521 @if target-libstdc++-v3-bootstrap
524 @endif target-libstdc++-v3-bootstrap
527 [+ ENDFOR bootstrap-stage +]
536 # * We force-disable intermodule optimizations, even if
537 # --enable-intermodule was passed, since the installed compiler
539 # the last argument when conflicting --enable arguments are passed.
540 # * Likewise, we force-disable coverage flags, since the installed
542 # * We also disable -Wformat, since older GCCs don't understand newer %s.
543 STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
544 --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \
545 --disable-build-format-warnings
547 @if target-libphobos-bootstrap
548 STAGE1_CONFIGURE_FLAGS += --with-libphobos-druntime-only
549 STAGE2_CONFIGURE_FLAGS += --with-libphobos-druntime-only
550 @endif target-libphobos-bootstrap
556 STAGE1_TFLAGS += -fno-checking
557 STAGE2_CFLAGS += -fno-checking
558 STAGE2_TFLAGS += -fno-checking
559 STAGE3_CFLAGS += -fchecking=1
560 STAGE3_TFLAGS += -fchecking=1
562 STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate
565 STAGEtrain_CFLAGS = $(filter-out -fchecking=1,$(STAGE3_CFLAGS))
566 STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS))
568 STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use -fprofile-reproducible=parallel-runs
571 # - sources for gen* binaries do not have .gcda files available
572 # - inlining decisions generate extra warnings
573 STAGEfeedback_CONFIGURE_FLAGS = $(filter-out --enable-werror-always,$(STAGE_CONFIGURE_FLAGS))
575 STAGEautoprofile_CFLAGS = $(filter-out -gtoggle,$(STAGE2_CFLAGS)) -g
580 # Disable warnings as errors since inlining decisions with -fauto-profile
582 STAGEautofeedback_CONFIGURE_FLAGS = $(filter-out --enable-werror-always,$(STAGE_CONFIGURE_FLAGS))
584 do-compare = @do_compare@
585 do-compare3 = $(do-compare)
587 # -----------------------------------------------
589 # -----------------------------------------------
629 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
631 GM2FLAGS_FOR_TARGET = -O2 -g
632 GOCFLAGS_FOR_TARGET = -O2 -g
633 GDCFLAGS_FOR_TARGET = -O2 -g
641 # ------------------------------------
643 # ------------------------------------
659 IF lib_path +]$(TARGET_LIB_PATH_[+module+])[+ ENDIF lib_path +][+
662 @if target-[+module+]
663 TARGET_LIB_PATH_[+module+] = $$r/$(TARGET_SUBDIR)/[+module+]/[+lib_path+]:
664 @endif target-[+module+]
671 IF lib_path +]$(HOST_LIB_PATH_[+module+])[+ ENDIF lib_path +][+
676 HOST_LIB_PATH_gcc = $$r/$(HOST_SUBDIR)/gcc$(GCC_SHLIB_SUBDIR):$$r/$(HOST_SUBDIR)/prev-gcc$(GCC_SHLI…
680 @if [+module+]
681 HOST_LIB_PATH_[+module+] = \
682 $$r/$(HOST_SUBDIR)/[+module+]/[+lib_path+]:[+ IF bootstrap
683 +]$$r/$(HOST_SUBDIR)/prev-[+module+]/[+lib_path+]:[+ ENDIF bootstrap +]
684 @endif [+module+]
689 @if target-libstdc++-v3
692 # CXX_FOR_TARGET before configuring libstdc++-v3, we won't get
694 # -funconfigured-* word, so that we'll get errors if this invalid C++
697 # don't pass it on, sub-make will use the default definition, that
698 # re-expands it at the time of use, so we'll get it right when we need
701 # really work, for C++ host programs can't depend on the current-stage
704 …$(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX…
705 @endif target-libstdc++-v3
707 # Flags to pass down to all sub-makes. STAGE*FLAGS,
711 "`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \
712 "[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +][+ FOR bootstrap-stage +] \
716 "STAGE[+id+]_TFLAGS=$(STAGE[+id+]_TFLAGS)"[+ ENDFOR bootstrap-stage +] \
726 # Flags to pass down to most sub-makes, in which we're building with
771 "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
773 @if gcc-bootstrap
779 @endif gcc-bootstrap
783 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
791 'CXX=$$(CXX_FOR_TARGET) -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
792 -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
825 # If any variables are added here, they must be added to do-*, below.
827 # cross-building scheme.
831 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
832 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
843 .PHONY: configure-host
844 configure-host: [+
846 maybe-configure-[+module+][+
848 .PHONY: configure-target
849 configure-target: [+
851 maybe-configure-target-[+module+][+
854 # The target built for a native non-bootstrap build.
857 # --enable-pgo-build enables the PGO build.
858 # 1. First build with -fprofile-generate.
859 # 2. Use "make maybe-check-*" to generate profiling data.
861 # 4. Rebuild with -fprofile-use.
863 @if gcc-bootstrap
864 [ -f stage_final ] || echo stage3 > stage_final
867 $(MAKE) $(RECURSE_FLAGS_TO_PASS) `cat stage_final`-bubble
868 @endif gcc-bootstrap
872 @if gcc-bootstrap
873 if [ -f stage_last ]; then \
874 TFLAGS="$(STAGE$(shell test ! -f stage_last || sed s,^stage,, stage_last)_TFLAGS)"; \
875 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \
877 @endif gcc-bootstrap
879 $(PGO_BUILD_GEN_FLAGS_TO_PASS) all-host all-target \
880 @if pgo-build
887 $(PGO_BUILD_USE_FLAGS_TO_PASS) all-host all-target \
888 @endif pgo-build
889 @if gcc-bootstrap
892 @endif gcc-bootstrap
895 .PHONY: all-build
897 all-build: maybe-all-build-[+module+][+ ENDFOR build_modules +]
899 .PHONY: all-host
901 @if [+module+]-no-bootstrap[+ ENDIF bootstrap +]
902 all-host: maybe-all-[+module+][+ IF bootstrap +]
903 @endif [+module+]-no-bootstrap[+ ENDIF bootstrap +][+ ENDFOR host_modules +]
905 .PHONY: all-target
907 @if target-[+module+]-no-bootstrap[+ ENDIF bootstrap +]
908 all-target: maybe-all-target-[+module+][+ IF bootstrap +]
909 @endif target-[+module+]-no-bootstrap[+
912 # Do a target for all the subdirectories. A ``make do-X'' will do a
914 # dependency (below) of X upon do-X, a ``make X'' will also do this,
917 .PHONY: do-[+make_target+]
918 do-[+make_target+]:
922 $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+make_target+]-host \
923 [+make_target+]-target
926 .PHONY: [+make_target+]-host
928 [+make_target+]-host: maybe-[+make_target+]-[+module+][+ ENDFOR host_modules +]
930 .PHONY: [+make_target+]-target
932 [+make_target+]-target: maybe-[+make_target+]-target-[+module+][+ ENDFOR target_modules +]
935 # Here are the targets which correspond to the do-X targets.
938 .PHONY: install-info install-dvi install-pdf install-html
939 .PHONY: clean distclean mostlyclean maintainer-clean realclean
940 .PHONY: local-clean local-distclean local-maintainer-clean
941 info: do-info
942 installcheck: do-installcheck
943 dvi: do-dvi
944 pdf: do-pdf
945 html: do-html
949 do-info: maybe-all-texinfo
951 install-info: do-install-info dir.info
953 if [ -f dir.info ]; then \
957 install-dvi: do-install-dvi
959 install-pdf: do-install-pdf
961 install-html: do-install-html
963 local-clean:
964 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
966 local-distclean:
967 -rm -f Makefile config.status config.cache mh-frag mt-frag
968 -rm -f maybedep.tmp serdep.tmp stage_final
969 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
970 rm -rf $(TARGET_SUBDIR); \
972 -rm -rf $(BUILD_SUBDIR)
973 -if [ "$(HOST_SUBDIR)" != "." ]; then \
974 rm -rf $(HOST_SUBDIR); \
976 -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile
977 -rm -f texinfo/doc/Makefile texinfo/po/POTFILES
978 -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null
979 -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null
980 -rmdir c++tools fastjar gcc gnattools gotools 2>/dev/null
981 -rmdir libcc1 libiberty texinfo zlib 2>/dev/null
982 -find . -name config.cache -exec rm -f {} \; \; 2>/dev/null
984 local-maintainer-clean:
988 clean: do-clean local-clean
989 mostlyclean: do-mostlyclean local-clean
990 distclean: do-distclean local-clean local-distclean
991 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
992 maintainer-clean: local-distclean
993 realclean: maintainer-clean
997 .PHONY: check do-check
998 check: do-check
1001 .PHONY: check-host
1002 check-host: [+
1004 maybe-check-[+module+][+
1007 .PHONY: check-target
1008 check-target: [+
1010 maybe-check-target-[+module+][+
1013 do-check:
1017 $(MAKE) $(RECURSE_FLAGS_TO_PASS) check-host check-target
1024 mail-report.log:
1028 $(srcdir)/contrib/test_summary -t >$@
1030 echo If you really want to send e-mail, run ./$@ now
1032 mail-report-with-warnings.log: warning.log
1036 $(srcdir)/contrib/test_summary -t -i warning.log >$@
1038 echo If you really want to send e-mail, run ./$@ now
1052 # clang-format config
1054 $(srcdir)/.clang-format:
1055 $(LN_S) contrib/clang-format $@
1057 clang-format: $(srcdir)/.clang-format
1059 .PHONY: clang-format
1063 .PHONY: install uninstall
1064 install:
1068 $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-host install-target
1070 .PHONY: install-host-nogcc
1071 install-host-nogcc: [+
1072 FOR host_modules +][+ IF (not (= (get "module") "gcc")) +] \
1073 maybe-install-[+module+][+ ENDIF +][+
1076 .PHONY: install-host
1077 install-host: [+
1079 maybe-install-[+module+][+
1082 .PHONY: install-target
1083 install-target: [+
1085 maybe-install-target-[+module+][+
1091 .PHONY: install.all
1092 install.all: install-no-fixedincludes
1093 @if [ -f ./gcc/Makefile ]; then \
1098 $(MAKE) $(FLAGS_TO_PASS) install-headers); \
1103 # install-no-fixedincludes is used to allow the elaboration of binary packages
1106 .PHONY: install-no-fixedincludes
1107 install-no-fixedincludes: installdirs install-host-nogcc \
1108 install-target gcc-install-no-fixedincludes
1110 .PHONY: install-strip
1111 install-strip:
1115 $(MAKE) $(RECURSE_FLAGS_TO_PASS) installdirs install-strip-host install-strip-target
1117 .PHONY: install-strip-host
1118 install-strip-host: [+
1120 maybe-install-strip-[+module+][+
1123 .PHONY: install-strip-target
1124 install-strip-target: [+
1126 maybe-install-strip-target-[+module+][+
1139 dir.info: do-install-info
1140 if [ -f $(srcdir)/texinfo/gen-info-dir ]; then \
1141 …$(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info…
1142 mv -f dir.info.new dir.info; \
1158 TAGS: do-TAGS
1160 # ------------------------------------
1162 # ------------------------------------
1165 .PHONY: configure-[+prefix+][+module+] maybe-configure-[+prefix+][+module+]
1166 maybe-configure-[+prefix+][+module+]:
1167 @if gcc-bootstrap
1168 configure-[+prefix+][+module+]: stage_current
1169 @endif gcc-bootstrap
1170 @if [+prefix+][+module+]
1171 maybe-configure-[+prefix+][+module+]: configure-[+prefix+][+module+]
1172 configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
1177 +]echo "Checking multilib configuration for [+module+]..."; \
1178 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \
1179 $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null; \
1180 if test -r [+subdir+]/[+module+]/multilib.out; then \
1181 if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
1182 rm -f [+subdir+]/[+module+]/multilib.tmp; \
1184 rm -f [+subdir+]/[+module+]/Makefile; \
1185 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
1188 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
1190 [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
1191 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \
1193 echo Configuring in [+subdir+]/[+module+]; \
1194 cd "[+subdir+]/[+module+]" || exit 1; \
1196 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
1197 *) topdir=`echo [+subdir+]/[+module+]/ | \
1198 sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
1200 module_srcdir=[+? module_srcdir (get "module_srcdir") (get "module")+]; \
1201 [+ IF no-config-site +]rm -f no-such-file || : ; \
1202 CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) \
1204 --srcdir=$${topdir}/$$module_srcdir \
1205 [+args+] --build=${build_alias} --host=[+host_alias+] \
1206 --target=[+target_alias+] [+extra_configure_flags+] \
1208 @endif [+prefix+][+module+]
1212 .PHONY: configure-stage[+id+]-[+prefix+][+module+] maybe-configure-stage[+id+]-[+prefix+][+module+]
1213 maybe-configure-stage[+id+]-[+prefix+][+module+]:
1214 @if [+prefix+][+module+]-bootstrap
1215 maybe-configure-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
1216 configure-stage[+id+]-[+prefix+][+module+]:
1217 @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
1218 @$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]
1223 +]echo "Checking multilib configuration for [+module+]..."; \
1224 $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null; \
1225 if test -r [+subdir+]/[+module+]/multilib.out; then \
1226 if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
1227 rm -f [+subdir+]/[+module+]/multilib.tmp; \
1229 rm -f [+subdir+]/[+module+]/Makefile; \
1230 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
1233 mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
1235 [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
1246 echo Configuring stage [+id+] in [+subdir+]/[+module+]; \
1247 $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \
1248 cd [+subdir+]/[+module+] || exit 1; \
1250 /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
1251 *) topdir=`echo [+subdir+]/[+module+]/ | \
1252 sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
1254 module_srcdir=[+? module_srcdir (get "module_srcdir") (get "module")+]; \
1256 --srcdir=$${topdir}/$$module_srcdir \
1257 [+args+] --build=${build_alias} --host=[+host_alias+] \
1258 --target=[+target_alias+] \
1259 [+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \
1262 @endif [+prefix+][+module+]-bootstrap
1268 .PHONY: all-[+prefix+][+module+] maybe-all-[+prefix+][+module+]
1269 maybe-all-[+prefix+][+module+]:
1270 @if gcc-bootstrap
1271 all-[+prefix+][+module+]: stage_current
1272 @endif gcc-bootstrap
1273 @if [+prefix+][+module+]
1274 TARGET-[+prefix+][+module+]=[+
1276 maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+]
1277 all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELSE +]
1282 (cd [+subdir+]/[+module+] && \
1284 $(TARGET-[+prefix+][+module+]))
1285 @endif [+prefix+][+module+]
1289 .PHONY: all-stage[+id+]-[+prefix+][+module+] maybe-all-stage[+id+]-[+prefix+][+module+]
1290 .PHONY: clean-stage[+id+]-[+prefix+][+module+] maybe-clean-stage[+id+]-[+prefix+][+module+]
1291 maybe-all-stage[+id+]-[+prefix+][+module+]:
1292 maybe-clean-stage[+id+]-[+prefix+][+module+]:
1293 @if [+prefix+][+module+]-bootstrap
1294 maybe-all-stage[+id+]-[+prefix+][+module+]: all-stage[+id+]-[+prefix+][+module+]
1295 all-stage[+id+]: all-stage[+id+]-[+prefix+][+module+]
1296 TARGET-stage[+id+]-[+prefix+][+module+] = $(TARGET-[+prefix+][+module+])
1297 all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
1298 @[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
1304 cd [+subdir+]/[+module+] && \
1321 $(TARGET-stage[+id+]-[+prefix+][+module+])
1323 maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+]
1324 clean-stage[+id+]: clean-stage[+id+]-[+prefix+][+module+]
1325 clean-stage[+id+]-[+prefix+][+module+]:
1327 [ -f [+subdir+]/[+module+]/Makefile ] || exit 0; \
1329 [ -f [+subdir+]/stage[+id+]-[+module+]/Makefile ] || exit 0; \
1330 $(MAKE) stage[+id+]-start; \
1332 cd [+subdir+]/[+module+] && \
1335 @endif [+prefix+][+module+]-bootstrap
1341 # --------------------------------------
1343 # --------------------------------------
1345 [+ configure prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
1348 args="$(BUILD_CONFIGARGS)" no-config-site=true +]
1350 [+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
1354 # --------------------------------------
1356 # --------------------------------------
1372 .PHONY: check-[+module+] maybe-check-[+module+]
1373 maybe-check-[+module+]:
1374 @if [+module+]
1375 maybe-check-[+module+]: check-[+module+]
1377 check-[+module+]:
1379 # This module is only tested in a native toolchain.
1380 check-[+module+]:
1387 (cd $(HOST_SUBDIR)/[+module+] && \
1392 check-[+module+]:
1398 (cd $(HOST_SUBDIR)/[+module+] && \
1402 @endif [+module+]
1404 .PHONY: install-[+module+] maybe-install-[+module+]
1405 maybe-install-[+module+]:
1406 @if [+module+]
1407 maybe-install-[+module+]: install-[+module+]
1409 install-[+module+]:
1410 [+ ELSE install +]
1411 install-[+module+]: installdirs
1416 (cd $(HOST_SUBDIR)/[+module+] && \
1417 $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] install)
1419 @endif [+module+]
1421 .PHONY: install-strip-[+module+] maybe-install-strip-[+module+]
1422 maybe-install-strip-[+module+]:
1423 @if [+module+]
1424 maybe-install-strip-[+module+]: install-strip-[+module+]
1426 install-strip-[+module+]:
1427 [+ ELSE install +]
1428 install-strip-[+module+]: installdirs
1433 (cd $(HOST_SUBDIR)/[+module+] && \
1434 $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] install-strip)
1436 @endif [+module+]
1440 .PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
1441 maybe-[+make_target+]-[+module+]:
1442 @if [+module+]
1443 maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
1444 [+ IF (match-value? = "missing" (get "make_target") ) +]
1445 # [+module+] doesn't support [+make_target+].
1446 [+make_target+]-[+module+]:
1448 [+make_target+]-[+module+]: [+
1450 [+depend+]-[+module+] [+
1453 @[+ ENDIF bootstrap +][ -f ./[+module+]/Makefile ] || exit 0; \
1458 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1460 echo "Doing [+make_target+] in [+module+]"; \
1461 (cd $(HOST_SUBDIR)/[+module+] && \
1469 @endif [+module+]
1473 # ---------------------------------------
1475 # ---------------------------------------
1479 [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
1484 args="$(TARGET_CONFIGARGS)" no-config-site=true +]
1486 [+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
1490 [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
1495 args="$(TARGET_CONFIGARGS)" no-config-site=true +]
1497 [+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
1502 .PHONY: check-target-[+module+] maybe-check-target-[+module+]
1503 maybe-check-target-[+module+]:
1504 @if target-[+module+]
1505 maybe-check-target-[+module+]: check-target-[+module+]
1507 # Dummy target for uncheckable module.
1508 check-target-[+module+]:
1510 check-target-[+module+]:
1519 (cd $(TARGET_SUBDIR)/[+module+] && \
1526 @endif target-[+module+]
1528 .PHONY: install-target-[+module+] maybe-install-target-[+module+]
1529 maybe-install-target-[+module+]:
1530 @if target-[+module+]
1531 maybe-install-target-[+module+]: install-target-[+module+]
1534 install-target-[+module+]:
1535 [+ ELSE install +]
1536 install-target-[+module+]: installdirs
1545 (cd $(TARGET_SUBDIR)/[+module+] && \
1546 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+extra_make_flags+] install)
1548 @endif target-[+module+]
1550 .PHONY: install-strip-target-[+module+] maybe-install-strip-target-[+module+]
1551 maybe-install-strip-target-[+module+]:
1552 @if target-[+module+]
1553 maybe-install-strip-target-[+module+]: install-strip-target-[+module+]
1556 install-strip-target-[+module+]:
1557 [+ ELSE install +]
1558 install-strip-target-[+module+]: installdirs
1567 (cd $(TARGET_SUBDIR)/[+module+] && \
1568 $(MAKE) $(TARGET_FLAGS_TO_PASS) [+extra_make_flags+] install-strip)
1570 @endif target-[+module+]
1574 .PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
1575 maybe-[+make_target+]-target-[+module+]:
1576 @if target-[+module+]
1577 maybe-[+make_target+]-target-[+module+]: [+make_target+]-target-[+module+]
1578 [+ IF (match-value? = "missing" (get "make_target") ) +]
1579 # [+module+] doesn't support [+make_target+].
1580 [+make_target+]-target-[+module+]:
1582 [+make_target+]-target-[+module+]: [+
1584 [+depend+]-target-[+module+] [+
1587 @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0; \
1595 echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]"; \
1597 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
1599 (cd $(TARGET_SUBDIR)/[+module+] && \
1607 @endif target-[+module+]
1611 @if target-libgomp
1612 .PHONY: check-target-libgomp-c++
1613 check-target-libgomp-c++:
1614 $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libgomp
1616 .PHONY: check-target-libgomp-fortran
1617 check-target-libgomp-fortran:
1618 $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) fortran.exp" check-target-libgomp
1620 @endif target-libgomp
1622 @if target-libitm
1623 .PHONY: check-target-libitm-c++
1624 check-target-libitm-c++:
1625 $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libitm
1627 @endif target-libitm
1629 # ----------
1630 # GCC module
1631 # ----------
1633 @if gcc-no-bootstrap
1635 cross: all-build all-gas all-ld
1645 @endif gcc-no-bootstrap
1649 .PHONY: gcc-site.exp
1650 gcc-site.exp:
1657 .PHONY: check-gcc-[+language+] check-[+language+]
1658 check-gcc-[+language+]: gcc-site.exp
1662 (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) [+gcc-check-target+]);
1663 check-[+language+]: check-gcc-[+language+][+ FOR lib-check-target +] [+ lib-check-target +][+ ENDFO…
1666 # The gcc part of install-no-fixedincludes, which relies on an intimate
1668 .PHONY: gcc-install-no-fixedincludes
1669 gcc-install-no-fixedincludes:
1670 @if [ -f ./gcc/Makefile ]; then \
1675 && $(MAKE) $(GCC_FLAGS_TO_PASS) install-no-fixedincludes); \
1679 # ---------------------
1681 # ---------------------
1697 @if gcc-bootstrap
1698 unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit…
1699 stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end || exit 1; else :; fi
1701 @endif gcc-bootstrap
1712 # We name the build directories for the various stages "stage1-gcc",
1713 # "stage2-gcc","stage3-gcc", etc.
1717 # the previous stage to a constant name ('prev-gcc'), and to make the name of
1729 [+ FOR bootstrap-stage +]
1730 .PHONY: stage[+id+]-start stage[+id+]-end
1732 stage[+id+]-start::
1738 @if [+ module +]
1739 @cd $(HOST_SUBDIR); [ -d stage[+id+]-[+module+] ] || \
1740 mkdir stage[+id+]-[+module+]; \
1741 mv stage[+id+]-[+module+] [+module+][+ IF prev +]; \
1742 mv stage[+prev+]-[+module+] prev-[+module+] || test -f stage[+prev+]-lean [+ ENDIF prev +]
1743 @endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
1744 @[ -d stage[+id+]-$(TARGET_SUBDIR) ] || \
1745 mkdir stage[+id+]-$(TARGET_SUBDIR); \
1746 mv stage[+id+]-$(TARGET_SUBDIR) $(TARGET_SUBDIR)[+ IF prev +]; \
1747 …mv stage[+prev+]-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage[+prev+]-lean [+ ENDIF pre…
1749 stage[+id+]-end:: [+ FOR host_modules +][+ IF bootstrap +]
1750 @if [+ module +]
1751 @if test -d $(HOST_SUBDIR)/[+module+]; then \
1752 cd $(HOST_SUBDIR); mv [+module+] stage[+id+]-[+module+][+ IF prev +]; \
1753 mv prev-[+module+] stage[+prev+]-[+module+]; : [+ ENDIF prev +]; \
1755 @endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
1756 @if test -d $(TARGET_SUBDIR); then \
1757 mv $(TARGET_SUBDIR) stage[+id+]-$(TARGET_SUBDIR)[+ IF prev +]; \
1758 mv prev-$(TARGET_SUBDIR) stage[+prev+]-$(TARGET_SUBDIR); : [+ ENDIF prev +]; \
1760 rm -f stage_current
1765 .PHONY: stage[+id+]-bubble
1766 stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +]
1769 if test -f stage[+id+]-lean [+
1770 IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +]; then \
1773 $(MAKE) stage[+id+]-start; \[+IF lean +]
1775 rm -rf stage[+lean+]-*; \
1776 $(STAMP) stage[+lean+]-lean; \
1778 $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \
1779 fi[+ IF compare-target +]
1780 $(MAKE) $(RECURSE_FLAGS_TO_PASS) [+compare-target+][+ ENDIF compare-target +]
1782 .PHONY: all-stage[+id+] clean-stage[+id+]
1783 do-clean: clean-stage[+id+]
1786 # only possibility, but now it conflicts with no-bootstrap rules
1787 @if gcc-bootstrap
1788 [+ IF compare-target +]
1789 [+compare-target+]:
1792 if test -f stage[+prev+]-lean; then \
1797 rm -f .bad_compare; \
1800 files=`find stage[+id+]-* -name "*$(objext)" -print | \
1801 sed -n s,^stage$$sed-,,p`; \
1802 for file in $${files} ${extra-compare}; do \
1803 f1=$$r/stage[+prev+]-$$file; f2=$$r/stage[+id+]-$$file; \
1804 if test ! -f $$f1; then continue; fi; \
1805 $(do-[+compare-target+]) > /dev/null 2>&1; \
1806 if test $$? -eq 1; then \
1815 if [ -f .bad_compare ]; then \
1822 $(STAMP) [+compare-target+][+ IF prev +]
1824 rm -rf stage[+prev+]-*; \
1825 $(STAMP) stage[+prev+]-lean; \
1827 [+ ENDIF compare-target +]
1829 [+ IF bootstrap-target +]
1830 .PHONY: [+bootstrap-target+] [+bootstrap-target+]-lean
1831 [+bootstrap-target+]:
1835 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble
1840 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
1842 [+bootstrap-target+]-lean:
1846 $(MAKE) $(RECURSE_FLAGS_TO_PASS) LEAN=: stage[+id+]-bubble
1851 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
1852 [+ ENDIF bootstrap-target +]
1855 [+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +]
1856 .PHONY: distclean-stage[+id+]
1857 distclean-stage[+id+]::
1859 @test "`cat stage_last`" != stage[+id+] || rm -f stage_last
1860 rm -rf stage[+id+]-* [+
1861 IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
1863 [+ IF cleanstrap-target +]
1864 .PHONY: [+cleanstrap-target+]
1865 [+cleanstrap-target+]: do-distclean local-clean
1869 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble
1874 $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
1875 [+ ENDIF cleanstrap-target +]
1876 @endif gcc-bootstrap
1878 [+ ENDFOR bootstrap-stage +]
1880 stageprofile-end::
1881 $(MAKE) distclean-stagefeedback
1883 stagefeedback-start::
1886 for i in prev-*; do \
1887 j=`echo $$i | sed s/^prev-//`; \
1889 …{ find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL); } &&…
1890 { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL); }; \
1893 @if gcc-bootstrap
1894 do-distclean: distclean-stage1
1901 $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage1-bubble
1903 # Same as unstage, but not phony and defaulting to stage1-start. We place
1904 # it in the dependency so that for example `make -j3 all-gcc' works.
1906 @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
1911 rm -rf stage1-$(TARGET_SUBDIR)[+ FOR bootstrap-stage +][+ IF prev
1912 +] stage[+id+]-*[+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
1914 @endif gcc-bootstrap
1916 # --------------------------------------
1918 # --------------------------------------
1921 @if gcc-bootstrap[+ FOR target_modules +][+ IF bootstrap
1923 configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-gcc[+
1925 configure-target-[+module+]: stage_last[+
1927 @endif gcc-bootstrap
1929 @if gcc-no-bootstrap[+ FOR target_modules +]
1930 configure-target-[+module+]: maybe-all-gcc[+
1932 @endif gcc-no-bootstrap
1936 # module simply won't build without the other; and 'soft' dependencies, where
1937 # if the depended-on module is missing, the depending module will do without
1939 # are made here to depend on a 'maybe-' target. If you're not sure,
1943 ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc",
1944 ;; where "maybe-" is only included if HARD is not true, and all-gcc
1945 ;; is taken from VAR-NAME.
1946 (define dep-target (lambda (module-kind var-name hard)
1947 (string-append
1948 (if hard "" "maybe-")
1949 (dep-subtarget var-name)
1950 module-kind
1951 (dep-module var-name)
1954 ;; make-dep builds a dependency from the MODULE and ON AutoGen vars.
1955 (define make-dep (lambda (module-kind on-kind)
1956 (string-append
1957 (dep-target module-kind "module" #t) ": "
1958 (dep-target on-kind "on" (exist? "hard")))))
1960 ;; dep-subtarget extracts everything up to the first dash in the given
1961 ;; AutoGen variable, for example it extracts "all-" out of "all-gcc".
1962 (define dep-subtarget (lambda (var-name)
1963 (substring (get var-name) 0 (+ 1 (string-index (get var-name) #\-)))))
1965 ;; dep-module extracts everything up to the first dash in the given
1966 ;; AutoGen variable, for example it extracts "gcc" out of "all-gcc".
1967 (define dep-module (lambda (var-name)
1968 (substring (get var-name) (+ 1 (string-index (get var-name) #\-)))))
1970 ;; dep-stage builds a string for the prefix of a bootstrap stage.
1971 (define dep-stage (lambda ()
1972 (string-append
1975 "-")))
1977 ;; dep-maybe is the same as the AutoGen expression "- hard 'maybe-'"
1979 (define dep-maybe (lambda ()
1980 (if (exist? "hard") "" "maybe-")))
1982 ;; dep-kind returns returns "prebootstrap" for configure or build
1983 ;; dependencies of bootstrapped modules on a build module
1984 ;; (e.g. all-gcc on all-build-bison); "normal" if the dependency is
1985 ;; on an "install" target, or if the dependence module is not
1987 ;; "postbootstrap" depending on whether the dependent module is
1992 ;; modules. If there were any non-bootstrap host modules that
1993 ;; bootstrap modules depended on, we'd get unsatisfied per-stage
1995 (define dep-kind (lambda ()
1997 ((and (hash-ref boot-modules (dep-module "module"))
1998 (=* (dep-module "on") "build-"))
2001 ((or (= (dep-subtarget "on") "install-")
2002 (not (hash-ref boot-modules (dep-module "on"))))
2005 ((hash-ref boot-modules (dep-module "module"))
2010 (define make-postboot-dep (lambda ()
2011 (let ((target (dep-module "module")) (dep "stage_last"))
2012 (unless (= (hash-ref postboot-targets target) dep)
2013 (hash-create-handle! postboot-targets target dep)
2014 ;; All non-bootstrap modules' configure target already
2016 (unless (=* target "target-")
2017 (string-append "configure-" target ": " dep "\n"))))))
2019 ;; We now build the hash table that is used by dep-kind.
2020 (define boot-modules (make-hash-table 113))
2021 (define postboot-targets (make-hash-table 113))
2026 (hash-create-handle! boot-modules (get "module") #t))
2030 (hash-create-handle! boot-modules (string-append "target-" (get "module")) #t))
2038 [+ FOR dependencies +][+ CASE (dep-kind) +]
2039 [+ == "prebootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
2040 [+ (make-dep (dep-stage) "") +][+ ENDFOR bootstrap_stage +]
2041 [+ == "bootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
2042 [+ (make-dep (dep-stage) (dep-stage)) +][+ ENDFOR bootstrap_stage +]
2043 [+ == "normal" +][+ (make-dep "" "") +]
2046 @if gcc-bootstrap
2047 [+ FOR dependencies +][+ CASE (dep-kind) +]
2048 [+ == "postbootstrap" +][+ (make-postboot-dep) +][+ ESAC +][+
2049 ENDFOR dependencies +]@endif gcc-bootstrap
2051 @unless gcc-bootstrap
2052 [+ FOR dependencies +][+ CASE (dep-kind) +]
2053 [+ == "postbootstrap" +][+ (make-dep "" "") +]
2054 [+ ESAC +][+ ENDFOR dependencies +]@endunless gcc-bootstrap
2061 (define lang-dep (lambda (lang)
2062 (hash-ref lang-env-deps (string-append (get "module") "-" lang))))
2065 (define lang-env-deps (make-hash-table 7))
2068 (hash-create-handle! lang-env-deps
2069 (string-append (get "module") "-" "cxx") #t))
2072 (hash-create-handle! lang-env-deps
2073 (string-append (get "module") "-" "no_c") #t))
2076 (hash-create-handle! lang-env-deps
2077 (string-append (get "module") "-" "no_gcc") #t))
2080 @if gcc-bootstrap[+ FOR target_modules +][+ IF (not (lang-dep "no_gcc"))
2082 configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-target-libgcc[+
2084 @endif gcc-bootstrap
2086 @if gcc-no-bootstrap[+ FOR target_modules +][+ IF (not (lang-dep "no_gcc")) +]
2087 configure-target-[+module+]: maybe-all-target-libgcc[+
2089 @endif gcc-no-bootstrap
2091 [+ FOR target_modules +][+ IF (not (lang-dep "no_c")) +]
2092 configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss[+
2093 ENDIF +][+ IF (lang-dep "cxx") +]
2094 configure-target-[+module+]: maybe-all-target-libstdc++-v3[+
2101 configure-gdb: $(CONFIGURE_GDB_TK)
2102 all-gdb: $(gdbnlmrequirements) $(GDB_TK)
2103 install-gdb: $(INSTALL_GDB_TK)
2110 # --------------------------------
2112 # --------------------------------
2124 CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck
2131 $(srcdir)/config/gcc-plugin.m4 \
2136 # ------------------------------
2138 # ------------------------------
2140 # Don't pass command-line variables to submakes.