Fixes from (or inspired by) Bob Chassell editing pass for last
[deliverable/binutils-gdb.git] / Makefile.in
index 198620ca223fecf60b8f5f66944fd9b6a4a4d12b..d9ff33f70e93df4b75415e672f1253b85d95a4d6 100644 (file)
@@ -53,10 +53,13 @@ AS = as
 AR = ar
 AR_FLAGS = rc
 CC = cc
+$(start-sanitize-chill)
 CFLAGS = -g
+CHILLFLAGS = $(CFLAGS)
+CHILL_LIB = -lchill
+$(end-sanitize-chill)
 CXX = gcc
 CXXFLAGS = -g -O
-GCC_FOR_TARGET = ./gcc -B./
 RANLIB = ranlib
 NM = nm
 
@@ -78,11 +81,7 @@ MAKEINFO = `if [ -f $${rootme}/texinfo/C/makeinfo ] ; \
 CC_FOR_BUILD = $(CC)
 CXX_FOR_BUILD = $(CXX)
 
-SUBDIRS = libiberty mmalloc glob readline opcodes bfd h8300sim z8ksim \
-       $(start-sanitize-chill) \
-          chillrt \
-       $(end-sanitize-chill) \
-         gdb binutils ld gas tgas gcc libg++ newlib deja-gnu
+SUBDIRS = "this is set via configure, don't edit this"
 OTHERS = 
 
 ALL = all.normal
@@ -93,7 +92,7 @@ INSTALL_TARGET = install.all
 
 CC_FOR_TARGET = ` \
   if [ -f $${rootme}/gcc/Makefile ] ; then \
-    echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
+    echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
   else \
     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
       echo $(CC); \
@@ -102,9 +101,33 @@ CC_FOR_TARGET = ` \
     fi; \
   fi`
 
+GCC_FOR_TARGET = ` \
+  if [ -f $${rootme}/gcc/Makefile ] ; then \
+    echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
+  else \
+    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+      echo $(CC); \
+    else \
+      t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
+    fi; \
+  fi`
+
+$(start-sanitize-chill)
+CHILL_FOR_TARGET = ` \
+  if [ -f $${rootme}/gcc/Makefile ] ; then \
+    echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
+  else \
+    if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+      echo $(CC); \
+    else \
+      t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
+    fi; \
+  fi`
+$(end-sanitize-chill)
+
 CXX_FOR_TARGET = ` \
   if [ -f $${rootme}/gcc/Makefile ] ; then \
-    echo $${rootme}/gcc/gcc -B$${rootme}/gcc/; \
+    echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
   else \
     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
       echo $(CXX); \
@@ -183,6 +206,11 @@ FLAGS_TO_PASS = \
        "CC=$(CC)" \
        "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
        "CFLAGS=$(CFLAGS)" \
+$(start-sanitize-chill)\
+       "CHILLFLAGS=$(CHILLFLAGS)" \
+       "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
+       "CHILL_LIB=$(CHILL_LIB)" \
+$(end-sanitize-chill)\
        "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
        "INSTALL=$(INSTALL)" \
        "INSTALL_DATA=$(INSTALL_DATA)" \
@@ -230,6 +258,36 @@ TARGET_FLAGS_TO_PASS = \
        "prefix=$(prefix)" \
        "tooldir=$(tooldir)" 
 
+# Flags to pass down to gcc.  gcc builds a library, libgcc.a, so it
+# unfortunately needs the native compiler and the target ar and
+# ranlib.  Keep these in alphabetical order, please.
+GCC_FLAGS_TO_PASS = \
+       "AR=$(AR_FOR_TARGET)" \
+       "AR_FLAGS=$(AR_FLAGS)" \
+       "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
+       "AS=$(AS)" \
+       "BISON=$(BISON)" \
+       "CXX=$(CXX)" \
+       "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
+       "CXXFLAGS=$(CXXFLAGS)" \
+       "CC=$(CC)" \
+       "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+       "CFLAGS=$(CFLAGS)" \
+       "INSTALL=$(INSTALL)" \
+       "INSTALL_DATA=$(INSTALL_DATA)" \
+       "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+       "LDFLAGS=$(LDFLAGS)" \
+       "LEX=$(LEX)" \
+       "LOADLIBES=$(LOADLIBES)" \
+       "MAKEINFO=$(MAKEINFO)" \
+       "NM=$(NM)" \
+       "RANLIB=$(RANLIB_FOR_TARGET)" \
+       "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
+       "XTRAFLAGS=$(XTRAFLAGS)" \
+       "exec_prefix=$(exec_prefix)" \
+       "prefix=$(prefix)" \
+       "tooldir=$(tooldir)" 
+
 # The first rule in the file had better be this one.  Don't put any above it.
 all:   $(ALL)
 
@@ -348,15 +406,25 @@ install-no-fixedincludes: install-dirs gcc-no-fixedincludes \
        install-fileutils install-find install-gawk install-m4 install-sed install-shellutils \
        install-textutils install-time install-wdiff
 
+#
+# Install the gcc headers files, but not the fixed include files,
+# which we are not allowed to distribute.  This rule is very dependent
+# on the workings of the gcc Makefile.in.
+#
 gcc-no-fixedincludes:
-       @if [ -f ./gcc/Makefile ] ; then \
-               rootme=`pwd` ; export rootme ; \
-               (cd ./gcc; \
-               $(MAKE) $(FLAGS_TO_PASS) install install-man \
-                       "INSTALL_HEADERS=install-common-headers install-float-h install-limits-h") ; \
-       else \
-               true ; \
-       fi
+       @if [ -f ./gcc/Makefile ]; then \
+         rm -rf gcc/tmp-include; \
+         mv gcc/include gcc/tmp-include 2>/dev/null; \
+         mkdir gcc/include; \
+         touch gcc/stmp-fixincludes; \
+         rm -f gcc/stmp-headers; \
+         rootme=`pwd`; export rootme; \
+         srcroot=`cd $(srcdir); pwd` ; export srcroot; \
+         (cd ./gcc; \
+          $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
+         rm -rf gcc/include; \
+         mv gcc/tmp-include gcc/include 2>/dev/null; \
+       else true; fi
 
 install.cross: install-dirs install-libiberty install-mmalloc \
         install-binutils install-opcodes install-byacc install-flex \
@@ -578,7 +646,7 @@ install-newlib: force
 
 ### start-sanitize-chill
 ### chillrt
-all-chillrt: all-binutils all-ld all-gas all-gcc
+all-chillrt: all-binutils all-ld all-gas all-gcc all-newlib
        @if [ -f ./chillrt/Makefile ] ; then \
                rootme=`pwd` ; export rootme ; \
                srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
@@ -659,8 +727,9 @@ install-flex: force
 all-gcc: all-libiberty all-byacc all-binutils
        @if [ -f ./gcc/Makefile ] ; then \
                rootme=`pwd` ; export rootme ; \
+               srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
                (cd ./gcc; \
-               $(MAKE) $(FLAGS_TO_PASS) all) ; \
+               $(MAKE) $(GCC_FLAGS_TO_PASS) all) ; \
        else \
                true ; \
        fi
@@ -668,8 +737,9 @@ all-gcc: all-libiberty all-byacc all-binutils
 install-gcc: force
        @if [ -f ./gcc/Makefile ] ; then \
                rootme=`pwd` ; export rootme ; \
+               srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
                (cd ./gcc; \
-               $(MAKE) $(FLAGS_TO_PASS) install) ; \
+               $(MAKE) $(GCC_FLAGS_TO_PASS) install) ; \
        else \
                true ; \
        fi
@@ -1254,6 +1324,14 @@ install-textutils: force
 ### other supporting targets
 
 subdir_do:
+### start-sanitize-chill
+### 
+### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
+###
+### if you change the code for libg++ et al, also change the
+### code for chillrt
+###
+### end-sanitize-chill
        @for i in $(DODIRS); do \
          if [ -f ./$$i/localenv ] || [ -f ./$$i/Makefile ] ; then \
            case $$i in \
@@ -1264,13 +1342,7 @@ subdir_do:
                  $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
              else exit 1 ; fi \
              ;; \
-### start-sanitize-chill
-### 
-### WARNING: THIS IS VERY UGLY AND I DID NOT DO THIS WILLINGLY
-###
-### if you change the above code for libg++ et al, also change the
-### code down here
-###
+       $(start-sanitize-chill) \
            chillrt) \
              if (rootme=`pwd` ; export rootme ; \
                  srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
@@ -1278,7 +1350,14 @@ subdir_do:
                  $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
              else exit 1 ; fi \
              ;; \
-### end-sanitize-chill
+       $(end-sanitize-chill) \
+           gcc) \
+             if (rootme=`pwd` ; export rootme ; \
+                 srcroot=`cd $(srcdir); pwd` ; export srcroot ; \
+                 cd ./$$i ; \
+                 $(MAKE) $(GCC_FLAGS_TO_PASS) $(DO)) ; then true ; \
+             else exit 1 ; fi \
+             ;; \
            *) \
              if (rootme=`pwd` ; export rootme ; \
                  cd ./$$i ; \
@@ -1369,11 +1448,11 @@ Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
 #
 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
 
-DEVO_SUPPORT= README cfg-paper.texi Makefile.in configure configure.in \
-       config.sub config configure.man configure.texi move-if-change \
+DEVO_SUPPORT= README Makefile.in configure configure.in \
+       config.guess config.sub config etc move-if-change \
        COPYING.LIB
 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob
-GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
+GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
 
 setup-dirs: force
        ./configure sun4
This page took 0.025734 seconds and 4 git commands to generate.