[FFmpeg-devel] [PATCH] Also retrieve and print SwScale revision information.

Diego Biurrun diego
Fri Jan 8 00:38:08 CET 2010


On Thu, Jan 07, 2010 at 05:18:27PM -0200, Ramiro Polla wrote:
> $subj

> +++ b/common.mak
> @@ -38,8 +38,11 @@ ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES))
>  
> +# Update version.h only on revision changes to avoid spurious rebuilds
>  $(BUILD_ROOT_REL)/version.h: $(SRC_PATH_BARE)/version.sh config.mak
> -	$< $(SRC_PATH) $@ $(EXTRA_VERSION)
> +	echo "#define FFMPEG_VERSION  \"$$($< $(SRC_PATH)            $(EXTRA_VERSION))\""  > $@.tmp
> +	echo "#define SWSCALE_VERSION \"$$($< $(SRC_PATH)/libswscale $(EXTRA_VERSION))\"" >> $@.tmp
> +	cmp -s $@ $@.tmp || mv $@.tmp $@
>  
> --- a/version.sh
> +++ b/version.sh
> @@ -29,12 +29,6 @@ test $revision || revision=UNKNOWN
>  version=$(cat VERSION 2> /dev/null)
>  test $version || version=$revision
>  
> -test -n "$3" && version=$version-$3
> +test -n "$2" && version=$version-$2
>  
> -NEW_REVISION="#define FFMPEG_VERSION \"$version\""
> -OLD_REVISION=$(cat version.h 2> /dev/null)
> -
> -# Update version.h only on revision changes to avoid spurious rebuilds
> -if test "$NEW_REVISION" != "$OLD_REVISION"; then
> -    echo "$NEW_REVISION" > "$2"
> -fi
> +echo $version

Does this help avoid version.sh being rerun all the time?

Diego



More information about the ffmpeg-devel mailing list