summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-06-06 19:39:40 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-06-07 12:35:53 +0100
commitbcfda0a1fe10bbe35a8c798a3e05b9fdc8802c70 (patch)
treee1964438435c114f3d772d0bddb8a43c567c928c
parent998e503592d13f1268df4e7ca1dd4da57e2d738f (diff)
mesa: automake: distclean git_sha1.h when building OOT
In the case of out-of-tree (OOT) builds, in particular when building from tarball, we'll end up with the file in both srcdir and builddir. We want the former to remain intact (since we need it on rebuild) while the latter should be removed otherwise `make distclean' gets angry at us. Ideally there'll be a solution that feels a bit less of a hack. Until then this does the job exactly as expected. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit b7f7ec78435771ab02f7d9a61bb1d4a11df720b8)
-rw-r--r--src/Makefile.am6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index a5c54ffc03b..0527a315955 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -46,6 +46,12 @@ git_sha1.h: git_sha1.h.tmp
BUILT_SOURCES = git_sha1.h
+# We want to keep the srcdir file since we need it on rebuild from tarball.
+# At the same time `make distclean' gets angry at us if we don't cleanup the
+# builddir one.
+distclean-local:
+ test $(top_srcdir) != $(top_builddir) && rm $(builddir)/git_sha1.h
+
SUBDIRS = . gtest util mapi/glapi/gen mapi
# include only conditionally ?