[vlc-devel] [PATCH] apple: build: avoid configure if already done

Steve Lhomme robux4 at ycbcr.xyz
Thu Feb 13 17:08:03 CET 2020


On 2020-02-13 17:05, Alexandre Janniaux wrote:
> Hi,
> 
> On Thu, Feb 13, 2020 at 04:51:30PM +0100, Steve Lhomme wrote:
>> The same problem exist for all platforms. There are ways around this.
>>
>> When I know I don't want to configure (ie most of the time) I just go in my
>> build directory and run make.
> 
> It applies for builds like win64 or raspberry but android and
> iOS are using more complex build process (for now).
> I plan to simplify them and integrate in the normal build
> process using autotools/meson but in the mean time, you cannot
> build without the script or doing a lot of things manually.

What is so different ? The CC/CFLAGS/etc are stored in the 
Makefile/config. Running make from the same shell should result in the 
same build configuration.

>>
>> If configure.ac has changed then configure will be run automatically. But if
>> your environment is not set like in the build.sh you might have to run
>> build.sh manually.
>>
>> On 2020-02-13 15:43, Alexandre Janniaux wrote:
>>> 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
>>> +    ../../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
> _______________________________________________
> 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