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