<p>Ah, yeah, I can see how that might be a problem.</p>
<p>Sending from a mobile, pardon the brevity. ~ C.</p>
<div class="gmail_quote">On Mar 31, 2011 3:41 PM, "Eric Anholt" <<a href="mailto:eric@anholt.net">eric@anholt.net</a>> wrote:<br type="attribution">> On Thu, 31 Mar 2011 13:56:56 -0700, Corbin Simpson <<a href="mailto:mostawesomedude@gmail.com">mostawesomedude@gmail.com</a>> wrote:<br>
>> On Thu, Mar 31, 2011 at 1:30 PM, Ian Romanick <<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>> wrote:<br>>> > From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
>> ><br>>> > ---<br>>> > Makefile | 8 ++++++++<br>>> > src/mesa/main/version.c | 7 ++++++-<br>>> > 2 files changed, 14 insertions(+), 1 deletions(-)<br>
>> ><br>>> > diff --git a/Makefile b/Makefile<br>>> > index a1ab65e..c85b903 100644<br>>> > --- a/Makefile<br>>> > +++ b/Makefile<br>>> > @@ -5,7 +5,15 @@ TOP = .<br>>> > SUBDIRS = src<br>
>> ><br>>> ><br>>> > +# The git command below generates an empty string when we're not<br>>> > +# building in a GIT tree (i.e., building from a release tarball).<br>>> > default: $(TOP)/configs/current<br>
>> > + @touch src/mesa/main/git_sha1.h<br>>> > + @if which git > /dev/null; then \<br>>> > + git log -n 1 --oneline |\<br>>> > + sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "\1"/' \<br>
>> > + > src/mesa/main/git_sha1.h; \<br>>> > + fi<br>>> > @for dir in $(SUBDIRS) ; do \<br>>> > if [ -d $$dir ] ; then \<br>>> > (cd $$dir && $(MAKE)) || exit 1 ; \<br>
>> > diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c<br>>> > index c7a0d69..80fa0c2 100644<br>>> > --- a/src/mesa/main/version.c<br>>> > +++ b/src/mesa/main/version.c<br>
>> > @@ -25,6 +25,7 @@<br>>> > #include "imports.h"<br>>> > #include "mtypes.h"<br>>> > #include "version.h"<br>>> > +#include "git_sha1.h"<br>
>> ><br>>> ><br>>> ><br>>> > @@ -185,7 +186,11 @@ compute_version(struct gl_context *ctx)<br>>> > ctx->VersionString = (char *) malloc(max);<br>>> > if (ctx->VersionString) {<br>
>> > _mesa_snprintf(ctx->VersionString, max,<br>>> > - "%u.%u Mesa " MESA_VERSION_STRING,<br>>> > + "%u.%u Mesa " MESA_VERSION_STRING<br>
>> > +#ifdef MESA_GIT_SHA1<br>>> > + " (" MESA_GIT_SHA1 ")"<br>>> > +#endif<br>>> > + ,<br>>> > ctx->VersionMajor, ctx->VersionMinor);<br>
>> > }<br>>> > }<br>>> > --<br>>> > 1.7.4<br>>> <br>>> Hmm, wouldn't the output of "git describe" be more useful?<br>> <br>> That's what we talked about initially, but since we tag releases of the<br>
> stable branches, "git describe" of master says:<br>> <br>> snb-magic-2692-gb3d1c77<br>> <br>> which is some tag off master that we pushed last year.<br></div>