aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2014-12-28 16:02:47 -0800
committerAndrew Waterman <waterman@cs.berkeley.edu>2014-12-28 16:03:41 -0800
commitccd6cb6c961ea4da53e62e6dc86ccb744a8c426e (patch)
tree7c6023352506ea054b860313a66ba47d23a0e7c8
parentad32fec5d6b2c732257d3221c6da09f4cfa7b9ab (diff)
downloadriscv-tools-ccd6cb6c961ea4da53e62e6dc86ccb744a8c426e.zip
riscv-tools-ccd6cb6c961ea4da53e62e6dc86ccb744a8c426e.tar.gz
riscv-tools-ccd6cb6c961ea4da53e62e6dc86ccb744a8c426e.tar.bz2
Make build.common BSD friendly
-rw-r--r--build.common19
1 files changed, 13 insertions, 6 deletions
diff --git a/build.common b/build.common
index cb46121..23cf589 100644
--- a/build.common
+++ b/build.common
@@ -9,6 +9,13 @@ then
exit 1
fi
+if [ ! -f gmake ]
+then
+ MAKE=gmake
+else
+ MAKE=make
+fi
+
PATH="$RISCV/bin:$PATH"
#GCC_VERSION=`gcc -v 2>&1 | tail -1 | awk '{print $3}'`
@@ -26,9 +33,9 @@ function build_project {
echo "Configuring project $1"
../configure $2 $3 $4 $5 $6 > build.log
echo "Building project $1"
- make -j$JOBS >> build.log
+ $MAKE -j$JOBS >> build.log
echo "Installing project $1"
- make -j$JOBS install >> build.log
+ $MAKE -j$JOBS install >> build.log
cd - > /dev/null
}
@@ -36,12 +43,12 @@ function build_tests {
echo
cd riscv-tests/isa > /dev/null
echo "Building project riscv-tests/isa"
- make -j$JOBS clean > /dev/null
- make -j$JOBS > /dev/null
+ $MAKE -j$JOBS clean > /dev/null
+ $MAKE -j$JOBS > /dev/null
cd - > /dev/null
cd riscv-tests/benchmarks > /dev/null
echo "Building project riscv-tests/benchmarks"
- make -j$JOBS clean > /dev/null
- make -j$JOBS > /dev/null
+ $MAKE -j$JOBS clean > /dev/null
+ $MAKE -j$JOBS > /dev/null
cd - > /dev/null
}