aboutsummaryrefslogtreecommitdiff
path: root/build.common
diff options
context:
space:
mode:
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
}