<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 30, 2016 at 5:46 AM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
<br>
As we'll need the file in the release tarball, rework the rule so that<br>
the file is regenerated _only_ if we're in a git repository.<br>
<br>
With this in place we can build vulkan (anv) from a release tarball.<br></blockquote><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cc: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br>
Cc: Kristian Høgsberg Kristensen <<a href="mailto:krh@bitplanet.net">krh@bitplanet.net</a>><br>
Signed-off-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
---<br>
Not 100% sure if we want the file in any of the clean targets. I'm<br>
leaning towards "no", yet I'm open to input.<br></blockquote><div><br></div><div>I think it'd be nice if it were in one but I don't know enough about the implications of doing so to have a very trustworthy opinion.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
.gitignore | 1 -<br>
src/Makefile.am | 20 +++-----------------<br>
2 files changed, 3 insertions(+), 18 deletions(-)<br>
<br>
diff --git a/.gitignore b/.gitignore<br>
index f42ca7f..90abe10 100644<br>
--- a/.gitignore<br>
+++ b/.gitignore<br>
@@ -49,4 +49,3 @@ Makefile.in<br>
.install-mesa-links<br>
.install-gallium-links<br>
/src/git_sha1.h<br>
-/src/git_sha1.h.tmp<br>
diff --git a/src/Makefile.am b/src/Makefile.am<br>
index d142aea..f5c0773 100644<br>
--- a/src/Makefile.am<br>
+++ b/src/Makefile.am<br>
@@ -19,30 +19,16 @@<br>
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS<br>
# IN THE SOFTWARE.<br>
<br>
-.PHONY: git_sha1.h.tmp<br>
-git_sha1.h.tmp:<br>
- @# Don't assume that $(top_srcdir)/.git is a directory. It may be<br>
- @# a gitlink file if $(top_srcdir) is a submodule checkout or a linked<br>
- @# worktree.<br>
- @touch git_sha1.h.tmp<br>
+git_sha1.h:<br>
@if test -e $(top_srcdir)/.git; then \<br>
if which git > /dev/null; then \<br>
git --git-dir=$(top_srcdir)/.git log -n 1 --oneline | \<br>
sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \<br>
- > git_sha1.h.tmp ; \<br>
+ > git_sha1.h ; \<br>
fi \<br>
fi<br>
<br>
-git_sha1.h: git_sha1.h.tmp<br>
- @echo "updating git_sha1.h"<br>
- @if ! cmp -s git_sha1.h.tmp git_sha1.h; then \<br>
- mv git_sha1.h.tmp git_sha1.h ;\<br>
- else \<br>
- rm git_sha1.h.tmp ;\<br>
- fi<br>
-<br>
BUILT_SOURCES = git_sha1.h<br>
-CLEANFILES = $(BUILT_SOURCES)<br>
<br>
SUBDIRS = . gtest util mapi/glapi/gen mapi<br>
<br>
@@ -92,7 +78,7 @@ SUBDIRS += gallium<br>
endif<br>
<br>
EXTRA_DIST = \<br>
- getopt hgl SConscript<br>
+ getopt hgl SConscript git_sha1.h<br>
<br>
AM_CFLAGS = $(VISIBILITY_CFLAGS)<br>
AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.8.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>