[Mesa-dev] [PATCH 2/2] mesa: Include GIT SHA1 in GL version string

Brian Paul brianp at vmware.com
Mon Apr 4 13:20:24 PDT 2011


Getting rid of DRIVER_DATE sounds good.

One comment below...

On 03/31/2011 02:30 PM, Ian Romanick wrote:
> From: Ian Romanick<ian.d.romanick at intel.com>
>
> ---
>   Makefile                |    8 ++++++++
>   src/mesa/main/version.c |    7 ++++++-
>   2 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index a1ab65e..c85b903 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -5,7 +5,15 @@ TOP = .
>   SUBDIRS = src
>
>
> +# The git command below generates an empty string when we're not
> +# building in a GIT tree (i.e., building from a release tarball).
>   default: $(TOP)/configs/current
> +	@touch src/mesa/main/git_sha1.h
> +	@if which git>  /dev/null; then \
> +	    git log -n 1 --oneline |\
> +		sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "\1"/' \
> +		>  src/mesa/main/git_sha1.h; \
> +	fi

Perhaps this little bit of shell script could be put into a utility 
script in the bin/ directory so that it can be easily re-used by the 
scons build.

-Brian



More information about the mesa-dev mailing list