OSDN Git Service

PR ada/60703
[pf3gnuchains/gcc-fork.git] / Makefile.tpl
index 2944d60..371c3b6 100644 (file)
@@ -209,6 +209,7 @@ HOST_EXPORTS = \
        WINDMC="$(WINDMC)"; export WINDMC; \
        OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
        OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+       READELF="$(READELF)"; export READELF; \
        AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
        AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
        GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \
@@ -216,6 +217,7 @@ HOST_EXPORTS = \
        NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
        OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
        RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
+       READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
        TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
        HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
        GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
@@ -288,6 +290,7 @@ BASE_TARGET_EXPORTS = \
        NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
        OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
        RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+       READELF="$(READELF_FOR_TARGET)"; export READELF; \
        STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
        WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
        WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
@@ -400,6 +403,7 @@ LIPO = @LIPO@
 NM = @NM@
 OBJDUMP = @OBJDUMP@
 RANLIB = @RANLIB@
+READELF = @READELF@
 STRIP = @STRIP@
 WINDRES = @WINDRES@
 WINDMC = @WINDMC@
@@ -493,6 +497,7 @@ LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
 NM_FOR_TARGET=@NM_FOR_TARGET@
 OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
 RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+READELF_FOR_TARGET=@READELF_FOR_TARGET@
 STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
 WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
 WINDMC_FOR_TARGET=@WINDMC_FOR_TARGET@
@@ -612,6 +617,7 @@ EXTRA_HOST_FLAGS = \
        'NM=$(NM)' \
        'OBJDUMP=$(OBJDUMP)' \
        'RANLIB=$(RANLIB)' \
+       'READELF=$(READELF)' \
        'STRIP=$(STRIP)' \
        'WINDRES=$(WINDRES)' \
        'WINDMC=$(WINDMC)'
@@ -652,6 +658,7 @@ EXTRA_TARGET_FLAGS = \
        'NM=$(COMPILER_NM_FOR_TARGET)' \
        'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
        'RANLIB=$$(RANLIB_FOR_TARGET)' \
+       'READELF=$$(READELF_FOR_TARGET)' \
        'WINDRES=$$(WINDRES_FOR_TARGET)' \
        'WINDMC=$$(WINDMC_FOR_TARGET)' \
        'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
@@ -899,11 +906,12 @@ install.all: install-no-fixedincludes
                true ; \
        fi
 
-# install-no-fixedincludes is used because Cygnus can not distribute
-# the fixed header files.
+# install-no-fixedincludes is used to allow the elaboration of binary packages
+# suitable for distribution, where we cannot include the fixed system header
+# files.
 .PHONY: install-no-fixedincludes
 install-no-fixedincludes: installdirs install-host-nogcc \
-       install-target gcc-no-fixedincludes
+       install-target gcc-install-no-fixedincludes
 
 .PHONY: install-strip
 install-strip:
@@ -1436,25 +1444,16 @@ check-gcc-[+language+]:
 check-[+language+]: check-gcc-[+language+][+ FOR lib-check-target +] [+ lib-check-target +][+ ENDFOR lib-check-target +]
 [+ ENDFOR languages +]
 
-# 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:
+# The gcc part of install-no-fixedincludes, which relies on an intimate
+# knowledge of how a number of gcc internal targets (inter)operate.  Delegate.
+.PHONY: gcc-install-no-fixedincludes
+gcc-install-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; \
+         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; \
+         (cd ./gcc \
+          && $(MAKE) $(GCC_FLAGS_TO_PASS) install-no-fixedincludes); \
        else true; fi
 @endif gcc