diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2014-12-28 16:02:47 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2014-12-28 16:02:47 -0800 |
commit | 1eb883d11064b3ef87128cb5a58f015b839b27e3 (patch) | |
tree | f3fc0bb0346b51d4508fc569fa41a0ec3fd73bde | |
parent | 2991201a5263ee9e88ca380d53383cf67e3eae59 (diff) | |
download | riscv-tools-1eb883d11064b3ef87128cb5a58f015b839b27e3.zip riscv-tools-1eb883d11064b3ef87128cb5a58f015b839b27e3.tar.gz riscv-tools-1eb883d11064b3ef87128cb5a58f015b839b27e3.tar.bz2 |
Make build.common BSD friendly
-rw-r--r-- | build.common | 19 |
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 } |