* size.c (berkeley_sum): Rewrite. Skip sections which are not
[deliverable/binutils-gdb.git] / Makefile.in
index 06d6de26428d25734285b41e81a493a2d928d016..a5a01154a117a56dfee2d29e2e4da39677584083 100644 (file)
@@ -45,7 +45,7 @@ GDB_NLM_DEPS =
 
 SHELL = /bin/sh
 
-INSTALL = $${srcroot}/install.sh -c
+INSTALL = $$s/install.sh -c
 INSTALL_PROGRAM = $(INSTALL)
 INSTALL_DATA = $(INSTALL) -m 644
 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
@@ -123,8 +123,8 @@ EXPECT = `if [ -f $$r/expect/expect ] ; \
        then echo $$r/expect/expect ; \
        else echo expect ; fi`
 
-RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \
-       then echo $${srcroot}/dejagnu/runtest ; \
+RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
+       then echo $$s/dejagnu/runtest ; \
        else echo runtest ; fi`
 
 
@@ -170,9 +170,13 @@ INSTALL_TARGET = install-dirs \
 
 
 CC_FOR_TARGET = ` \
-  if [ -f $$r/gcc/Makefile ] ; then \
+  if [ -f $$r/gcc/xgcc ] ; then \
     if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
-      echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
+      if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
+        echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
+      else \
+        echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
+      fi; \
     else \
       echo $$r/gcc/xgcc -B$$r/gcc/; \
     fi; \
@@ -184,9 +188,15 @@ CC_FOR_TARGET = ` \
     fi; \
   fi`
 
+# If CC_FOR_TARGET is not overriden on the command line, then this
+# variable is passed down to the gcc Makefile, where it is used to
+# build libgcc2.a.  We define it here so that it can itself be
+# overridden on the command line.
+GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
+
 # start-sanitize-chill
 CHILL_FOR_TARGET = ` \
-  if [ -f $$r/gcc/Makefile ] ; then \
+  if [ -f $$r/gcc/xgcc ] ; then \
     echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
   else \
     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
@@ -199,9 +209,13 @@ CHILL_FOR_TARGET = ` \
 # end-sanitize-chill
 
 CXX_FOR_TARGET = ` \
-  if [ -f $$r/gcc/Makefile ] ; then \
+  if [ -f $$r/gcc/xgcc ] ; then \
     if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
-      echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
+      if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
+        echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
+      else \
+        echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
+      fi; \
     else \
       echo $$r/gcc/xgcc -B$$r/gcc/; \
     fi; \
@@ -303,7 +317,6 @@ BASE_FLAGS_TO_PASS = \
        "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
        "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
        "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
-       "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
        "INSTALL=$(INSTALL)" \
        "INSTALL_DATA=$(INSTALL_DATA)" \
        "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
@@ -344,7 +357,7 @@ EXTRA_HOST_FLAGS = \
        'RANLIB=$(RANLIB)' 
 
 
-FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
+FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(HOST_FLAGS)
 
 # Flags that are concerned with the location of the X11 include files
 # and library files
@@ -385,6 +398,15 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
 # If any variables are added here, they must be added to do-*, below.
 # The HOST_* variables are a special case, which are used for the gcc
 # cross-building scheme.
+# The condition for setting GCC_FOR_TARGET is so that if CC_FOR_TARGET
+# is overridden on the command line we use that value for
+# GCC_FOR_TARGET, and, if it is not, we use the value of
+# GCC_FOR_TARGET.  We do this because the default value of
+# CC_FOR_TARGET depends on gcc/xgcc, which won't exist when we first
+# go into the gcc directory.  FIXME: The test won't work correctly for
+# older non-Posix make programs that do not set MAKEFLAGS; in that
+# case, overriding CC_FOR_TARGET on the command line will not affect
+# GCC_FOR_TARGET.
 EXTRA_GCC_FLAGS = \
        'AR=$$(AR_FOR_TARGET)' \
        'AS=$(AS)' \
@@ -396,6 +418,7 @@ EXTRA_GCC_FLAGS = \
        'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
        'NM=$(NM)' \
        'RANLIB=$$(RANLIB_FOR_TARGET)' \
+       'GCC_FOR_TARGET=$(GCC_FOR_TARGET)' \
        `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
        `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
        `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
@@ -760,7 +783,7 @@ DO_X = \
 $(DO_X):
        @target=`echo $@ | sed -e 's/^do-//'`; \
        r=`pwd`; export r; \
-       srcroot=`cd $(srcdir); pwd`; export srcroot; \
+       s=`cd $(srcdir); pwd`; export s; \
        $(SET_LIB_PATH) \
        for i in $(SUBDIRS) -dummy-; do \
          if [ -f ./$$i/Makefile ]; then \
@@ -788,7 +811,7 @@ $(DO_X):
        done
        @target=`echo $@ | sed -e 's/^do-//'`; \
        r=`pwd`; export r; \
-       srcroot=`cd $(srcdir); pwd`; export srcroot; \
+       s=`cd $(srcdir); pwd`; export s; \
        $(SET_LIB_PATH) \
        for i in $(TARGET_CONFIGDIRS) -dummy-; do \
          if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
@@ -816,7 +839,7 @@ installcheck: do-installcheck
 dvi: do-dvi
 
 install-info: do-install-info dir.info
-       srcroot=`cd $(srcdir); pwd`; export srcroot; \
+       s=`cd $(srcdir); pwd`; export s; \
        if [ -f dir.info ] ; then \
          $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
        else true ; fi
@@ -847,7 +870,7 @@ $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
        @dir=`echo $@ | sed -e 's/clean-//'`; \
        if [ -f ./$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
        else \
@@ -860,7 +883,7 @@ $(CLEAN_TARGET_MODULES):
        rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
        if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
        else \
@@ -939,7 +962,7 @@ gcc-no-fixedincludes:
          touch gcc/stmp-fixinc gcc/include/fixed; \
          rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd` ; export srcroot; \
+         s=`cd $(srcdir); pwd` ; export s; \
          $(SET_LIB_PATH) \
          (cd ./gcc; \
           $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
@@ -958,7 +981,7 @@ $(ALL_MODULES) all-gui all-libproc:
        @dir=`echo $@ | sed -e 's/all-//'`; \
        if [ -f ./$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
        else \
@@ -975,7 +998,7 @@ $(NATIVE_CHECK_MODULES):
          dir=`echo $@ | sed -e 's/check-//'`; \
          if [ -f ./$${dir}/Makefile ] ; then \
            r=`pwd`; export r; \
-           srcroot=`cd $(srcdir); pwd`; export srcroot; \
+           s=`cd $(srcdir); pwd`; export s; \
            $(SET_LIB_PATH) \
            (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
          else \
@@ -987,7 +1010,7 @@ $(CROSS_CHECK_MODULES):
        @dir=`echo $@ | sed -e 's/check-//'`; \
        if [ -f ./$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
        else \
@@ -1001,7 +1024,7 @@ $(INSTALL_MODULES): install-dirs
        @dir=`echo $@ | sed -e 's/install-//'`; \
        if [ -f ./$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
        else \
@@ -1031,13 +1054,15 @@ $(CONFIGURE_TARGET_MODULES):
          fi; \
        fi; exit 0      # break command into two pieces
        @dir=`echo $@ | sed -e 's/configure-target-//'`; \
-       if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
+       if [ ! -d $(TARGET_SUBDIR) ]; then \
+         true; \
+       elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
          true; \
        elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
          if [ -d $(srcdir)/$${dir} ]; then \
            [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
            r=`pwd`; export r; \
-           srcroot=`cd $(srcdir); pwd`; export srcroot; \
+           s=`cd $(srcdir); pwd`; export s; \
            $(SET_LIB_PATH) \
            AR="$(AR_FOR_TARGET)"; export AR; \
            AS="$(AS_FOR_TARGET)"; export AS; \
@@ -1062,7 +1087,7 @@ $(CONFIGURE_TARGET_MODULES):
            esac; \
            if [ "$(srcdir)" = "." ] ; then \
              if [ "$(TARGET_SUBDIR)" != "." ] ; then \
-               if $(SHELL) $${srcroot}/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
+               if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
                  if [ -f Makefile ]; then \
                    if $(MAKE) distclean; then \
                      true; \
@@ -1082,14 +1107,14 @@ $(CONFIGURE_TARGET_MODULES):
              libsrcdir="."; \
            else \
              srcdiroption="--srcdir=$${topdir}/$${dir}"; \
-             libsrcdir="$${srcroot}/$${dir}"; \
+             libsrcdir="$$s/$${dir}"; \
            fi; \
            if [ -f $${libsrcdir}/configure ] ; then \
              $(SHELL) $${libsrcdir}/configure \
                $(CONFIG_ARGUMENTS) $${srcdiroption} \
                --with-target-subdir="$(TARGET_SUBDIR)"; \
            else \
-             $(SHELL) $${srcroot}/configure \
+             $(SHELL) $$s/configure \
                $(CONFIG_ARGUMENTS) $${srcdiroption} \
                --with-target-subdir="$(TARGET_SUBDIR)"; \
            fi; \
@@ -1107,7 +1132,7 @@ $(ALL_TARGET_MODULES):
        @dir=`echo $@ | sed -e 's/all-target-//'`; \
        if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
        else \
@@ -1121,7 +1146,7 @@ $(CHECK_TARGET_MODULES):
        @dir=`echo $@ | sed -e 's/check-target-//'`; \
        if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
        else \
@@ -1136,7 +1161,7 @@ $(INSTALL_TARGET_MODULES): install-dirs
        @dir=`echo $@ | sed -e 's/install-target-//'`; \
        if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $(TARGET_SUBDIR)/$${dir}; \
            $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
@@ -1151,7 +1176,7 @@ $(ALL_X11_MODULES):
        @dir=`echo $@ | sed -e 's/all-//'`; \
        if [ -f ./$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $${dir}; \
           $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
@@ -1166,7 +1191,7 @@ $(CHECK_X11_MODULES):
        @dir=`echo $@ | sed -e 's/check-//'`; \
        if [ -f ./$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $${dir}; \
           $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
@@ -1181,7 +1206,7 @@ $(INSTALL_X11_MODULES):
        @dir=`echo $@ | sed -e 's/install-//'`; \
        if [ -f ./$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $${dir}; \
           $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
@@ -1194,7 +1219,7 @@ $(INSTALL_X11_MODULES):
 all-gcc:
        @if [ -f ./gcc/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
        else \
@@ -1205,7 +1230,7 @@ all-gcc:
 all-bootstrap:
        @if [ -f ./gcc/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
        else \
@@ -1216,7 +1241,7 @@ all-bootstrap:
 check-gcc:
        @if [ -f ./gcc/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
        else \
@@ -1227,7 +1252,7 @@ check-gcc:
 install-gcc:
        @if [ -f ./gcc/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
        else \
@@ -1243,7 +1268,7 @@ install-dosrel: install-dirs info
        @dir=`echo $@ | sed -e 's/install-//'`; \
        if [ -f ./$${dir}/Makefile ] ; then \
          r=`pwd`; export r; \
-         srcroot=`cd $(srcdir); pwd`; export srcroot; \
+         s=`cd $(srcdir); pwd`; export s; \
          $(SET_LIB_PATH) \
          (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
        else \
This page took 0.028248 seconds and 4 git commands to generate.