Make changes so that this runs on FreeBSD.
authorBill Wendling <isanbard@gmail.com>
Wed, 19 Oct 2011 08:42:07 +0000 (08:42 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 19 Oct 2011 08:42:07 +0000 (08:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142482 91177308-0d34-0410-b5e6-96231b3b80d8

utils/release/test-release.sh

index 6b8edbc..642933e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #===-- test-release.sh - Test the LLVM release candidates ------------------===#
 #
 #                     The LLVM Compiler Infrastructure
 #
 #===------------------------------------------------------------------------===#
 
+if [ `uname -s` = "FreeBSD" ]; then
+    MAKE=gmake
+else
+    MAKE=make
+fi
+
 projects="llvm cfe dragonegg test-suite"
 
 # Base SVN URL for the sources.
@@ -246,13 +252,13 @@ function build_llvmCore() {
 
     cd $ObjDir
     echo "# Compiling llvm $Release-rc$RC $Flavor"
-    echo "# make -j $NumJobs VERBOSE=1 $ExtraOpts"
-    make -j $NumJobs VERBOSE=1 $ExtraOpts \
+    echo "# ${MAKE} -j $NumJobs VERBOSE=1 $ExtraOpts"
+    ${MAKE} -j $NumJobs VERBOSE=1 $ExtraOpts \
         2>&1 | tee $LogDir/llvm.make-Phase$Phase-$Flavor.log
 
     echo "# Installing llvm $Release-rc$RC $Flavor"
-    echo "# make install"
-    make install \
+    echo "# ${MAKE} install"
+    ${MAKE} install \
         2>&1 | tee $LogDir/llvm.install-Phase$Phase-$Flavor.log
     cd $BuildDir
 }
@@ -263,9 +269,9 @@ function test_llvmCore() {
     ObjDir="$3"
 
     cd $ObjDir
-    make -k check-all \
+    ${MAKE} -k check-all \
         2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log
-    make -k unittests \
+    ${MAKE} -k unittests \
         2>&1 | tee $LogDir/llvm.unittests-Phase$Phase-$Flavor.log
     cd $BuildDir
 }