aboutsummaryrefslogtreecommitdiff
path: root/build.common
diff options
context:
space:
mode:
authorCiro Santilli 六四事件 法轮功 包卓轩 <ciro.santilli@gmail.com>2016-06-28 23:35:29 +0200
committerAndrew Waterman <waterman@eecs.berkeley.edu>2016-06-28 14:35:29 -0700
commitca6df6287258145915065eba76618e832a4fb708 (patch)
treea08ae88df309b760139bc0fafded7f00de1df9a6 /build.common
parent419f1b5f3ed7deefdf878b308119773b01d61084 (diff)
downloadriscv-tools-ca6df6287258145915065eba76618e832a4fb708.zip
riscv-tools-ca6df6287258145915065eba76618e832a4fb708.tar.gz
riscv-tools-ca6df6287258145915065eba76618e832a4fb708.tar.bz2
Use $* instead of $2 $3 $4 $5 $6 in build.common (#31)
Diffstat (limited to 'build.common')
-rw-r--r--build.common20
1 files changed, 11 insertions, 9 deletions
diff --git a/build.common b/build.common
index ec7cf11..7a7e797 100644
--- a/build.common
+++ b/build.common
@@ -18,19 +18,21 @@ PATH="$RISCV/bin:$PATH"
set -e
function build_project {
+ PROJECT="$1"
+ shift
echo
- if [ -e "$1/build" ]
+ if [ -e "$PROJECT/build" ]
then
- echo "Removing existing $1/build directory"
- rm -rf $1/build
+ echo "Removing existing $PROJECT/build directory"
+ rm -rf "$PROJECT/build"
fi
- mkdir -p $1/build
- cd $1/build
- echo "Configuring project $1"
- ../configure $2 $3 $4 $5 $6 > build.log
- echo "Building project $1"
+ mkdir -p "$PROJECT/build"
+ cd "$PROJECT/build"
+ echo "Configuring project $PROJECT"
+ ../configure $* > build.log
+ echo "Building project $PROJECT"
$MAKE -j$JOBS >> build.log
- echo "Installing project $1"
+ echo "Installing project $PROJECT"
$MAKE -j$JOBS install >> build.log
cd - > /dev/null
}