[vlc-devel] [PATCH] apple: build: avoid configure if already done
Steve Lhomme
robux4 at ycbcr.xyz
Fri Feb 14 08:17:10 CET 2020
On 2020-02-13 19:46, David Fuhrmann wrote:
>
>
>> Am 13.02.2020 um 15:43 schrieb Alexandre Janniaux <ajanni at videolabs.io>:
>>
>> The configure step takes a long time. Avoid redoing it everytime
>> the script is launched helps reduce developer friction.
>>
>> To trigger a new configuration, either delete the whole build
>> directory or just the config.h in the build directory.
>> ---
>> extras/package/apple/build.sh | 16 ++++++++++------
>> 1 file changed, 10 insertions(+), 6 deletions(-)
>>
>> diff --git a/extras/package/apple/build.sh b/extras/package/apple/build.sh
>> index 978871a6db..3cfb280ae0 100755
>> --- a/extras/package/apple/build.sh
>> +++ b/extras/package/apple/build.sh
>> @@ -630,12 +630,16 @@ cd "${VLC_BUILD_DIR}/build" || abort_err "Failed cd to VLC build dir"
>> # Create VLC install dir if it does not already exist
>> mkdir -p "$VLC_INSTALL_DIR"
>>
>> -../../configure \
>> - --with-contrib="$VLC_CONTRIB_INSTALL_DIR" \
>> - --host="$VLC_HOST_TRIPLET" \
>> - --prefix="$VLC_INSTALL_DIR" \
>> - "${VLC_CONFIG_OPTIONS[@]}" \
>> - || abort_err "Configuring VLC failed"
>> +if ! [ -e config.h ]; then
>
>
> Hi,
>
> in macosx/build.sh we use the following check for the same purpose:
> if [ "${vlcroot}/configure" -nt Makefile ]; then
>
> Sure we can discuss what is actually better, just mentioning it hereā¦.
That's probably good enough. If configure.ac changes the configure will
still be run, with the environment of the build.sh which was run the
first time.
It doesn't work in the case you change build.sh and don't run configure.
This could happen when testing different branches or older versions of
the tree which enable/disable stuff or changes the compiler environment.
You'd have to manually remove the Makefile when doing so.
> BR. David
>
>> + ../../configure \
>> + --with-contrib="$VLC_CONTRIB_INSTALL_DIR" \
>> + --host="$VLC_HOST_TRIPLET" \
>> + --prefix="$VLC_INSTALL_DIR" \
>> + "${VLC_CONFIG_OPTIONS[@]}" \
>> + || abort_err "Configuring VLC failed"
>> +else
>> + echo "Configuration of VLC skipped as config.h already exists"
>> +fi
>>
>> $MAKE -j$VLC_USE_NUMBER_OF_CORES || abort_err "Building VLC failed"
>>
>> --
>> 2.25.0
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list