[vlc-commits] package/win32: build.sh: allow building out of the source tree

Steve Lhomme git at videolan.org
Fri Oct 25 10:08:36 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Oct 24 15:01:15 2019 +0200| [08d0b96bc301de33a322568c325f25acb1c4593f] | committer: Steve Lhomme

package/win32: build.sh: allow building out of the source tree

Just call build.sh from the folder you want to build into.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08d0b96bc301de33a322568c325f25acb1c4593f
---

 extras/package/win32/build.sh | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/extras/package/win32/build.sh b/extras/package/win32/build.sh
index dd8f8a82ba..29f39a70f6 100755
--- a/extras/package/win32/build.sh
+++ b/extras/package/win32/build.sh
@@ -93,6 +93,8 @@ esac
 
 #####
 
+SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
+
 : ${JOBS:=$(getconf _NPROCESSORS_ONLN 2>&1)}
 TRIPLET=$ARCH-w64-mingw32
 
@@ -103,6 +105,7 @@ if ! printf "#ifdef __clang__\n#error CLANG\n#endif" | $CC -E -; then
 fi
 
 info "Building extra tools"
+mkdir -p extras/tools
 cd extras/tools
 
 export PATH="$PWD/build/bin":"$PATH"
@@ -112,7 +115,7 @@ if [ "$COMPILING_WITH_CLANG" -gt 0 ] && [ ! -d "libtool" ]; then
 fi
 # bootstrap only if needed in interactive mode
 if [ "$INTERACTIVE" != "yes" ] || [ ! -f ./Makefile ]; then
-    NEEDED="$FORCED_TOOLS" ./bootstrap
+    NEEDED="$FORCED_TOOLS" ${SCRIPT_PATH}/../../tools/bootstrap
 fi
 make -j$JOBS
 cd ../../
@@ -142,7 +145,7 @@ fi
 if [ "$RELEASE" != "yes" ]; then
      CONTRIBFLAGS="$CONTRIBFLAGS --disable-optim"
 fi
-../bootstrap --host=$TRIPLET $CONTRIBFLAGS
+${SCRIPT_PATH}/../../../contrib/bootstrap --host=$TRIPLET $CONTRIBFLAGS
 
 # Rebuild the contribs or use the prebuilt ones
 if [ "$PREBUILT" != "yes" ]; then
@@ -163,7 +166,7 @@ cd ../..
 
 info "Bootstrapping"
 
-./bootstrap
+${SCRIPT_PATH}/../../../bootstrap
 
 info "Configuring VLC"
 mkdir -p $SHORTARCH
@@ -185,7 +188,7 @@ if [ ! -z "$WITH_PDB" ]; then
     CONFIGFLAGS="$CONFIGFLAGS --enable-pdb"
 fi
 
-../extras/package/win32/configure.sh --host=$TRIPLET $CONFIGFLAGS
+${SCRIPT_PATH}/configure.sh --host=$TRIPLET --with-contrib=../contrib/$TRIPLET $CONFIGFLAGS
 
 info "Compiling"
 make -j$JOBS



More information about the vlc-commits mailing list