vlc/vlc-3.0 | branch: master | Steve Lhomme <[email protected]> | Thu Oct 24 
15:01:15 2019 +0200| [b5f5212d58f5b5b83173ab47434e66dea575a87d] | 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.

(cherry picked from commit 08d0b96bc301de33a322568c325f25acb1c4593f) (rebased)

rebased:
- the JOBS cannot be set in the environment in this branch (missing 
0e5999d54ca6e132fae29df22455ab9f645e5d69)

Signed-off-by: Steve Lhomme <[email protected]>

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

 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 e09e1a0071..cf93070dfe 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
@@ -183,7 +186,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

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to