Commit 9446c789 authored by Emeric Grange's avatar Emeric Grange Committed by Felix Paul Kühne

macosx: add a 'rebuild' option to MacOSX build.sh script, triggering a rebuild...

macosx: add a 'rebuild' option to MacOSX build.sh script, triggering a rebuild for tools, contribs, and VLC
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent b6eddb78
...@@ -24,6 +24,7 @@ Build vlc in the current directory ...@@ -24,6 +24,7 @@ Build vlc in the current directory
OPTIONS: OPTIONS:
-h Show some help -h Show some help
-q Be quiet -q Be quiet
-r Rebuild everything (tools, contribs, vlc)
-k <sdk> Use the specified sdk (default: $SDKROOT) -k <sdk> Use the specified sdk (default: $SDKROOT)
-a <arch> Use the specified arch (default: $ARCH) -a <arch> Use the specified arch (default: $ARCH)
EOF EOF
...@@ -40,7 +41,7 @@ spopd() ...@@ -40,7 +41,7 @@ spopd()
popd > /dev/null popd > /dev/null
} }
while getopts "hvk:a:" OPTION while getopts "hvrk:a:" OPTION
do do
case $OPTION in case $OPTION in
h) h)
...@@ -51,6 +52,9 @@ do ...@@ -51,6 +52,9 @@ do
set +x set +x
QUIET="yes" QUIET="yes"
;; ;;
r)
REBUILD="yes"
;;
a) a)
ARCH=$OPTARG ARCH=$OPTARG
;; ;;
...@@ -101,6 +105,9 @@ export PATH="${vlcroot}/extras/tools/build/bin:/bin:/sbin:/usr/bin:/usr/sbin:/us ...@@ -101,6 +105,9 @@ export PATH="${vlcroot}/extras/tools/build/bin:/bin:/sbin:/usr/bin:/usr/sbin:/us
info "Building building tools" info "Building building tools"
spushd "${vlcroot}/extras/tools" spushd "${vlcroot}/extras/tools"
./bootstrap > $out ./bootstrap > $out
if [ "$REBUILD" = "yes" ]; then
make clean
fi
make > $out make > $out
spopd spopd
...@@ -113,6 +120,9 @@ info "Building contribs" ...@@ -113,6 +120,9 @@ info "Building contribs"
spushd "${vlcroot}/contrib" spushd "${vlcroot}/contrib"
mkdir -p build && cd build mkdir -p build && cd build
../bootstrap --build=$TRIPLET --host=$TRIPLET > $out ../bootstrap --build=$TRIPLET --host=$TRIPLET > $out
if [ "$REBUILD" = "yes" ]; then
make clean
fi
if [ ! -e "../$TRIPLET" ]; then if [ ! -e "../$TRIPLET" ]; then
make prebuilt > $out make prebuilt > $out
fi fi
...@@ -152,5 +162,10 @@ fi ...@@ -152,5 +162,10 @@ fi
core_count=`sysctl -n machdep.cpu.core_count` core_count=`sysctl -n machdep.cpu.core_count`
let jobs=$core_count+1 let jobs=$core_count+1
if [ "$REBUILD" = "yes" ]; then
info "Running make clean"
make clean
fi
info "Running make -j$jobs" info "Running make -j$jobs"
make -j$jobs make -j$jobs
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment