[vlc-devel] [PATCH] macosx: add a 'rebuild' option to MacOSX build.sh script, triggering a rebuild for tools, contribs, and VLC

Emeric Grange egrange at gopro.com
Tue Oct 6 14:55:07 CEST 2015


---
 extras/package/macosx/build.sh | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/extras/package/macosx/build.sh b/extras/package/macosx/build.sh
index 4795ec5..691db16 100755
--- a/extras/package/macosx/build.sh
+++ b/extras/package/macosx/build.sh
@@ -24,6 +24,7 @@ Build vlc in the current directory
 OPTIONS:
    -h            Show some help
    -q            Be quiet
+   -r            Rebuild everything (tools, contribs, vlc)
    -k <sdk>      Use the specified sdk (default: $SDKROOT)
    -a <arch>     Use the specified arch (default: $ARCH)
 EOF
@@ -40,7 +41,7 @@ spopd()
     popd > /dev/null
 }

-while getopts "hvk:a:" OPTION
+while getopts "hvrk:a:" OPTION
 do
      case $OPTION in
          h)
@@ -51,6 +52,9 @@ do
              set +x
              QUIET="yes"
          ;;
+         r)
+             REBUILD="yes"
+         ;;
          a)
              ARCH=$OPTARG
          ;;
@@ -101,6 +105,9 @@ export PATH="${vlcroot}/extras/tools/build/bin:/bin:/sbin:/usr/bin:/usr/sbin:/us
 info "Building building tools"
 spushd "${vlcroot}/extras/tools"
 ./bootstrap > $out
+if [ "$REBUILD" = "yes" ]; then
+    make clean
+fi
 make > $out
 spopd

@@ -113,6 +120,9 @@ info "Building contribs"
 spushd "${vlcroot}/contrib"
 mkdir -p build && cd build
 ../bootstrap --build=$TRIPLET --host=$TRIPLET > $out
+if [ "$REBUILD" = "yes" ]; then
+    make clean
+fi
 if [ ! -e "../$TRIPLET" ]; then
     make prebuilt > $out
 fi
@@ -152,5 +162,10 @@ fi
 core_count=`sysctl -n machdep.cpu.core_count`
 let jobs=$core_count+1

+if [ "$REBUILD" = "yes" ]; then
+    info "Running make clean"
+    make clean
+fi
+
 info "Running make -j$jobs"
 make -j$jobs
--
2.3.8 (Apple Git-58)


More information about the vlc-devel mailing list