[FFmpeg-devel] [PATCH] configure: add --build-date and --build-time options

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Thu Jan 22 17:25:44 CET 2015


Hi,

On 22.01.2015 17:02, Benoit Fouet wrote:
> If this patch is accepted in the content, then, I'd decorrelate
> BUILD_DATE and BUILD_TIME a bit more than what it is in your patch (see
> below).

Do you think one would ever want to specify one, but not the other?

> [...]
>
>> @@ -5712,6 +5716,16 @@ cat > $TMPH <<EOF
>>   #define SWS_MAX_FILTER_SIZE $sws_max_filter_size
>>   EOF
>> +if [ -n "$build_date" ] || [ -n "$build_time" ]; then
>> +    echo "#define BUILD_DATE \"${build_date}\"" >> $TMPH
>> +    echo "#define BUILD_TIME \"${build_time}\"" >> $TMPH
>> +    echo "BUILD_DATE=$build_date" >> config.mak
>> +    echo "BUILD_TIME=$build_time" >> config.mak
>> +else
>> +    echo "#define BUILD_DATE __DATE__" >> $TMPH
>> +    echo "#define BUILD_TIME __TIME__" >> $TMPH
>> +fi
>> +
>
> changing this by:
> if [ -n "$build_date" ]; then
>      echo "#define BUILD_DATE \"${build_date}\"" >> $TMPH
>      echo "BUILD_DATE=$build_date" >> config.mak
> else
>      echo "#define BUILD_DATE __DATE__" >> $TMPH
> fi
>
> same for BUILD_TIME.

It would also require changes to the sed calls in doc/Makefile, making 
them more complex.

> Or at least change your patch to not assume that one is set when the
> other is.

It doesn't assume it's set, it just treats it not being set in the same 
way as if it was set to the empty string.

I would have added only one option for both date and time, but that's 
not possible, because they are used separately in ffprobe.c.

Best regards,
Andreas


More information about the ffmpeg-devel mailing list