Browse Source

Fix compilation on BSD (use GNU make) (patch by Joachim Jona).

git-svn-id: file:///var/svn/tigccpp/trunk@492 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 18 years ago
parent
commit
db7fb32a81

+ 2 - 1
tigcc-linux/CHANGELOG

@@ -1,9 +1,10 @@
 Changelog for TIGCC For Linux
 
-- 2005-12-18, CVS HEAD (Kevin Kofler)
+- 2006-03-22, CVS HEAD (Kevin Kofler)
         * Updated import scripts to use a separate CVS checkout.
         * Removed empty "ide" directory, KTIGCC will be distributed separately.
         * TIGCC/*nix is now in CVS too.
+        * Fixed compilation on BSD (use GNU make) (patch by Joachim Jona).
 
 - 2005-10-02, version 0.96 beta 6 r1 (Kevin Kofler)
         * Synced Win32 TIGCC 0.96 Beta 6 source tree.

+ 11 - 2
tigcc-linux/scripts/launch.a68k

@@ -2,9 +2,18 @@
 #
 # Compile and install the A68K assembler
 #
+
+isbsd=`uname | grep "BSD"`
+if [ $isbsd = "" ]; then
+	#Assume GNU make
+        make=make
+else
+        make=gmake
+fi
+
 echo Installing a68k assembler...
 cd ../sources/a68k/
-make -e
+${make} -e
 cp A68k $TIGCC/bin/a68k
-make clean
+${make} clean
 echo Done.

+ 14 - 5
tigcc-linux/scripts/launch.binutils

@@ -3,6 +3,15 @@
 # This script launch configure with the right arguments
 # The tree must have been patched before doing this.
 #
+
+isbsd=`uname | grep "BSD"`
+if [ $isbsd = "" ]; then
+	#Assume GNU make
+        make=make
+else
+        make=gmake
+fi
+
 echo TIGCC script: Configuring, compiling and installing binutils...
 mkdir ../build; mkdir ../build/binutils;
 cd ../build/binutils; ../../download/binutils.ti/configure --disable-serial-configure --prefix=$TIGCC --target=m68k-coff --disable-shared --enable-static --disable-multilib --disable-nls --disable-win32-registry
@@ -16,7 +25,7 @@ fi
 #This keeps us from patching the generated makefile in advance.
 #So we have to call make 5 times to get it to work with our removed directories.
 
-make
+${make}
 
 echo You should have seen an error. This is normal. TIGCC installation continues.
 
@@ -24,7 +33,7 @@ echo You should have seen an error. This is normal. TIGCC installation continues
 rm -f libiberty/testsuite/Makefile
 echo all: >libiberty/testsuite/Makefile
 
-make
+${make}
 
 echo You should have seen an error. This is normal. TIGCC installation continues.
 
@@ -36,7 +45,7 @@ mkdir bfd/po
 rm -f bfd/po/Makefile
 echo all: >bfd/po/Makefile
 
-make
+${make}
 
 echo You should have seen an error. This is normal. TIGCC installation continues.
 
@@ -44,7 +53,7 @@ echo You should have seen an error. This is normal. TIGCC installation continues
 rm -f opcodes/po/Makefile
 echo all: >opcodes/po/Makefile
 
-make
+${make}
 
 echo You should have seen an error. This is normal. TIGCC installation continues.
 
@@ -58,7 +67,7 @@ rm -f gas/po/Makefile
 echo all: >gas/po/Makefile
 
 #Now this one should really work...
-make
+${make}
 if [ $? -ne 0 ]
     then echo "TIGCC script: Error while making"
     exit 2

+ 11 - 2
tigcc-linux/scripts/launch.envreg

@@ -2,9 +2,18 @@
 #
 # Compile and install the TIGCC environment registrator
 #
+
+isbsd=`uname | grep "BSD"`
+if [ $isbsd = "" ]; then
+	#Assume GNU make
+        make=make
+else
+        make=gmake
+fi
+
 echo Installing tigcc environment registrator...
 cd ../sources/envreg/src/
-make -e
+${make} -e
 cp envreg $TIGCC/bin
-make clean
+${make} clean
 echo Done.

+ 12 - 3
tigcc-linux/scripts/launch.gcc

@@ -3,6 +3,15 @@
 # This script launches configure with the right arguments
 # The tree must have been patched before doing this.
 #
+
+isbsd=`uname | grep "BSD"`
+if [ $isbsd = "" ]; then
+	#Assume GNU make
+        make=make
+else
+        make=gmake
+fi
+
 echo TIGCC script: Configuring, compiling and installing gcc...
 
 CFLAGS_FOR_BUILD="$CFLAGS"
@@ -22,21 +31,21 @@ fi
 #This keeps us from patching the generated makefile in advance.
 #So we have to call make 3 times to get it to work with our removed directories.
 
-make
+${make}
 echo You should have seen an error. This is normal. TIGCC installation continues.
 
 # Create dummy libiberty testsuite makefile
 rm -f libiberty/testsuite/Makefile
 echo all: >libiberty/testsuite/Makefile
 
-make
+${make}
 echo You should have seen an error. This is normal. TIGCC installation continues.
 
 # Create dummy build-libiberty testsuite makefile
 rm -f `ls -d build-*`/libiberty/testsuite/Makefile
 echo all: >`ls -d build-*`/libiberty/testsuite/Makefile
 
-make
+${make}
 echo You should have seen an error. This is normal. TIGCC installation continues.
 
 cd ../../scripts

+ 11 - 2
tigcc-linux/scripts/launch.ld-tigcc

@@ -2,10 +2,19 @@
 #
 # Compile and install the TIGCC linker
 #
+
+isbsd=`uname | grep "BSD"`
+if [ $isbsd = "" ]; then
+	#Assume GNU make
+        make=make
+else
+        make=gmake
+fi
+
 echo Installing TIGCC linker...
 cd ../sources/ld-tigcc
-make -e
+${make} -e
 cp ld-tigcc $TIGCC/bin
 cp ar-tigcc $TIGCC/bin
-make clean
+${make} clean
 echo Done.

+ 11 - 2
tigcc-linux/scripts/launch.patcher

@@ -2,9 +2,18 @@
 #
 # Compile and install the TIGCC patcher
 #
+
+isbsd=`uname | grep "BSD"`
+if [ $isbsd = "" ]; then
+	#Assume GNU make
+        make=make
+else
+        make=gmake
+fi
+
 echo Installing tigcc patcher...
 cd ../sources/patcher/src/
-make -e
+${make} -e
 cp patcher $TIGCC/bin
-make clean
+${make} clean
 echo Done.

+ 11 - 2
tigcc-linux/scripts/launch.tigcc

@@ -2,9 +2,18 @@
 #
 # Compile and install the TIGCC front-end
 #
+
+isbsd=`uname | grep "BSD"`
+if [ $isbsd = "" ]; then
+	#Assume GNU make
+        make=make
+else
+        make=gmake
+fi
+
 echo Installing tigcc front-end...
 cd ../sources/tigcc/src/
-make -e
+${make} -e
 cp tigcc $TIGCC/bin
-make clean
+${make} clean
 echo Done.

+ 11 - 2
tigcc-linux/scripts/launch.tprbuilder

@@ -2,9 +2,18 @@
 #
 # Compile and install the TIGCC project builder
 #
+
+isbsd=`uname | grep "BSD"`
+if [ $isbsd = "" ]; then
+	#Assume GNU make
+        make=make
+else
+        make=gmake
+fi
+
 echo Installing tigcc project builder...
 cd ../sources/tprbuilder/src/
-make -e
+${make} -e
 cp tprbuilder $TIGCC/bin
-make clean
+${make} clean
 echo Done.