X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=Makefile.in;h=ed3ab75548bbd43b5881045d61f16bb94d847a91;hb=1854bb21902472ab7df44ef2eb095bde62f7208e;hp=ac58f974133d446e8ffb1f7bb722e8367ddbafe7;hpb=c559bb17c9419db713ea2e2dddd7bbbb3a465195;p=deliverable%2Fbinutils-gdb.git diff --git a/Makefile.in b/Makefile.in index ac58f97413..ed3ab75548 100644 --- a/Makefile.in +++ b/Makefile.in @@ -220,6 +220,7 @@ FLAGS_FOR_TARGET = CC_FOR_TARGET = CHILL_FOR_TARGET = CXX_FOR_TARGET = +CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = # If GCC_FOR_TARGET is not overriden on the command line, then this # variable is passed down to the gcc Makefile, where it is used to @@ -230,6 +231,8 @@ GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) AS_FOR_TARGET = ` \ if [ -f $$r/gas/as-new ] ; then \ echo $$r/gas/as-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=as ; \ else \ if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ echo $(AS); \ @@ -241,6 +244,8 @@ AS_FOR_TARGET = ` \ LD_FOR_TARGET = ` \ if [ -f $$r/ld/ld-new ] ; then \ echo $$r/ld/ld-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=ld ; \ else \ if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ echo $(LD); \ @@ -296,6 +301,8 @@ RANLIB_FOR_TARGET = ` \ NM_FOR_TARGET = ` \ if [ -f $$r/binutils/nm-new ] ; then \ echo $$r/binutils/nm-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=nm ; \ else \ if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ echo $(NM); \ @@ -385,6 +392,14 @@ BASE_FLAGS_TO_PASS = \ "target_alias=$(target_alias)" \ "libsubdir=$(libsubdir)" +# For any flags above that may contain shell code that varies from one +# target library to another. When doing recursive invocations of the +# top-level Makefile, we don't want the outer make to evaluate them, +# so we pass these variables down unchanged. They must not contain +# single nor double quotes. +RECURSE_FLAGS = \ + CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' + # Flags to pass down to most sub-makes, in which we're building with # the host environment. # If any variables are added here, they must be added to do-*, below. @@ -1349,7 +1364,8 @@ $(ALL_TARGET_MODULES): r=`pwd`; export r; \ s=`cd $(srcdir); pwd`; export s; \ $(SET_LIB_PATH) \ - (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ + (cd $(TARGET_SUBDIR)/$${dir}; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ else \ true; \ fi @@ -1363,7 +1379,8 @@ $(CHECK_TARGET_MODULES): r=`pwd`; export r; \ s=`cd $(srcdir); pwd`; export s; \ $(SET_LIB_PATH) \ - (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\ + (cd $(TARGET_SUBDIR)/$${dir}; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\ else \ true; \ fi @@ -1478,7 +1495,7 @@ bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean b s=`cd $(srcdir); pwd` ; export s; \ $(SET_LIB_PATH) \ echo "Building runtime libraries"; \ - $(MAKE) $(BASE_FLAGS_TO_PASS) all + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all .PHONY: cross cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld @@ -1491,7 +1508,8 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld s=`cd $(srcdir); pwd` ; export s; \ $(SET_LIB_PATH) \ echo "Building runtime libraries"; \ - $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++" + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ + LANGUAGES="c c++" all .PHONY: check-gcc check-gcc: @@ -1630,7 +1648,7 @@ configure-target-libchill: $(ALL_GCC_C) all-target-libchill: configure-target-libchill all-target-libiberty configure-target-libobjc: $(ALL_GCC_C) all-target-libobjc: configure-target-libobjc all-target-libiberty -all-m4: all-libiberty +all-m4: all-libiberty all-texinfo all-make: all-libiberty all-mmalloc: configure-target-newlib: $(ALL_GCC) @@ -1739,10 +1757,16 @@ SUPPORT_FILES = list-of-support-files-for-tool-in-question # NOTE: No double quotes in the below. It is used within shell script # as VER="$(VER)" -VER = ` if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ +VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \ + sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ + elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ - else \ + elif test -f $(TOOL)/version.in; then \ + head -1 $(TOOL)/version.in; \ + elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \ sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ + else \ + echo VERSION; \ fi` PACKAGE = $(TOOL)