[Android] [PATCH 2/2] build: build extras/tools before pollute PATH
Zhao Zhili
quinkblack at foxmail.com
Wed Oct 31 03:02:21 CET 2018
Please review.
Don't pollute the PATH env is safe as it already made some troubles such as
# The make.exe and awk.exe from the toolchain don't work in msys
However, some parts require the cross build toolchains in the PATH,
e.g., vpx
VPX_CONF += --sdk-path=$(shell dirname $(shell which $(HOST)-clang))
On 2018年10月29日 16:45, Zhao wrote:
> From: Zhao Zhili <quinkblack at foxmail.com>
>
> Build extras/tools/protobuf failed as it tried to pick up clang under
> NDK_TOOLCHAIN_PATH.
> ---
> compile-libvlc.sh | 52 +++++++++++++++++++++++------------------------
> 1 file changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/compile-libvlc.sh b/compile-libvlc.sh
> index 85d4794a7..ec257616b 100755
> --- a/compile-libvlc.sh
> +++ b/compile-libvlc.sh
> @@ -62,6 +62,32 @@ if [ -z "$ANDROID_ABI" ]; then
> exit 1
> fi
>
> +# Make in //
> +if [ -z "$MAKEFLAGS" ]; then
> + UNAMES=$(uname -s)
> + MAKEFLAGS=
> + if which nproc >/dev/null; then
> + MAKEFLAGS=-j`nproc`
> + elif [ "$UNAMES" == "Darwin" ] && which sysctl >/dev/null; then
> + MAKEFLAGS=-j`sysctl -n machdep.cpu.thread_count`
> + fi
> +fi
> +
> +###########################
> +# Build buildsystem tools #
> +###########################
> +
> +export PATH="`pwd`/vlc/extras/tools/build/bin:$PATH"
> +echo "Building tools"
> +cd vlc/extras/tools
> +./bootstrap
> +checkfail "buildsystem tools: bootstrap failed"
> +make $MAKEFLAGS
> +checkfail "buildsystem tools: make failed"
> +make $MAKEFLAGS .buildgas
> +checkfail "buildsystem tools: make failed"
> +cd ../../..
> +
> ###########################
> # VLC BOOTSTRAP ARGUMENTS #
> ###########################
> @@ -339,17 +365,6 @@ echo "ABI: $ANDROID_ABI"
> echo "API: $ANDROID_API"
> echo "PATH: $PATH"
>
> -# Make in //
> -if [ -z "$MAKEFLAGS" ]; then
> - UNAMES=$(uname -s)
> - MAKEFLAGS=
> - if which nproc >/dev/null; then
> - MAKEFLAGS=-j`nproc`
> - elif [ "$UNAMES" == "Darwin" ] && which sysctl >/dev/null; then
> - MAKEFLAGS=-j`sysctl -n machdep.cpu.thread_count`
> - fi
> -fi
> -
> ##########
> # CFLAGS #
> ##########
> @@ -423,21 +438,6 @@ echo "VLC_CXXFLAGS: ${VLC_CXXFLAGS}"
>
> cd vlc
>
> -###########################
> -# Build buildsystem tools #
> -###########################
> -
> -export PATH="`pwd`/extras/tools/build/bin:$PATH"
> -echo "Building tools"
> -cd extras/tools
> -./bootstrap
> -checkfail "buildsystem tools: bootstrap failed"
> -make $MAKEFLAGS
> -checkfail "buildsystem tools: make failed"
> -make $MAKEFLAGS .gas
> -checkfail "buildsystem tools: make failed"
> -cd ../..
> -
> #############
> # BOOTSTRAP #
> #############
More information about the Android
mailing list