pass canonical build name to mkfixinc.sh. Use it for choosing the fix build method
authorLaurynas Biveinis <lauras@softhome.net>
Sun, 3 Dec 2000 17:30:16 +0000 (17:30 +0000)
committerBruce Korb <korbb@gcc.gnu.org>
Sun, 3 Dec 2000 17:30:16 +0000 (17:30 +0000)
Co-Authored-By: Bruce Korb <bkorb@gnu.org>
From-SVN: r37976

gcc/ChangeLog
gcc/Makefile.in
gcc/fixinc/mkfixinc.sh

index d38b6e8bf03baf8066a4ffacfa317bc65d2ce422..88fcd550ac2f6103bc2c946b92dd24b81a9ebf2a 100644 (file)
@@ -1,3 +1,11 @@
+2000-12-03  Laurynas Biveinis  <lauras@softhome.net>
+           Bruce Korb  <bkorb@gnu.org>
+
+        * Makefile.in: pass $(build_canonical) to mkfixinc.sh.
+        * fixinc/mkfixinc.sh: accept build system name as an argument.
+        Use it for choosing the fix build method.  Use the target for
+       selecting special fix rules.
+
 2000-12-03  Bernd Schmidt  <bernds@redhat.co.uk>
 
        * Makefile.in (OBJS): Add sched-deps.o.
index 62f5ae07edec19ef8499125dd716238b518b06c7..38720a6337d9457b500871803283436187b12c04 100644 (file)
@@ -2035,8 +2035,8 @@ fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \
        $(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs.ready
        (MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc && pwd` ; \
        CC="$(CC)"; CFLAGS="$(CFLAGS)"; LDFLAGS="$(LDFLAGS)"; \
-       export MAKE srcdir CC CFLAGS LDFLAGS; \
-       cd ./fixinc && $(SHELL) $${srcdir}/mkfixinc.sh $(target))
+       export MAKE srcdir CC CFLAGS LDFLAGS; cd ./fixinc && \
+       $(SHELL) $${srcdir}/mkfixinc.sh $(canonical_build) $(target))
 
 # Build fixed copies of system files.
 stmp-fixinc: fixinc.sh gsyslimits.h
index 98821ba6ee8291d55a6afd7f64aef8327a42e628..0129157f84a3c4984baa33f5f1908135d2eaa482 100755 (executable)
@@ -1,6 +1,14 @@
 #! /bin/sh
 
-machine=$1
+build=$1
+machine=$2
+
+if [ -z "$build" ]
+then
+       echo No build system name given
+       exit 1
+fi
+
 if [ -z "$machine" ]
 then
        echo No machine name given
@@ -9,18 +17,30 @@ fi
 
 target=../fixinc.sh
 
-echo constructing ${target} for $machine
+echo constructing ${target} for $machine to run on $build
 fixincludes="${machine}"
 
-case $machine in
-       *-*-linux*)
-               :
+# Choose fix build method by build system
+case $build in
+       i?86-*-msdosdjgpp* )
+               MAKE="${MAKE} -f ${srcdir}/Makefile.DOS srcdir=${srcdir}"
                ;;
 
-       *-*-sysv4*)
-               fixincludes=fixinc.svr4
+       *-*-beos* )
+               MAKE="${MAKE} -f ${srcdir}/Makefile.BEOS srcdir=${srcdir}"
+               # Remove the following line to enable fixincludes
+               # (Makefile.BEOS is empty until Monday 12/4/00 :)
+               fixincludes=
+               ;;
+
+       * )
+               MAKE="${MAKE} -f Makefile"
                ;;
+esac
 
+# Check for special fix rules for particular targets
+case $machine in
+       *-*-sysv4* | \
        i?86-*-sysv5* | \
        i?86-*-udk*)
                fixincludes=fixinc.svr4
@@ -45,16 +65,6 @@ case $machine in
                fixincludes=fixinc.ptx
                ;;
 
-       i?86-*-msdosdjgpp* )
-               MAKE="${MAKE} -f ${srcdir}/Makefile.DOS srcdir=${srcdir}"
-               ;;
-
-       *-*-beos* )
-               MAKE="${MAKE} -f ${srcdir}/Makefile.BEOS srcdir=${srcdir}"
-               # Remove the following line to enable fixincludes
-               fixincludes=
-               ;;
-
        alpha*-dec-vms* | \
        arm-semi-aout | armel-semi-aout | \
        arm-semi-aof | armel-semi-aof | \