OSDN Git Service

pass canonical build name to mkfixinc.sh. Use it for choosing the fix build method
[pf3gnuchains/gcc-fork.git] / gcc / fixinc / mkfixinc.sh
index 98821ba..0129157 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 | \