diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-09 12:36:32 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-09 15:26:04 +0100 |
commit | 2e1bf7e1b44db16d0c322f17535fc6a6fa07353b (patch) | |
tree | 70efbdf147b8ba55d18535e2adf94d6ca03a2624 /src/sna/Makefile.am | |
parent | f73cd955e760064f57f414dce5f39e43022e4ea6 (diff) |
sna: Record git-tree used for compilation
Hopefully, I have all the dependencies correct for auto-updating and
should continue to work with tarballs...
The next step is to perhaps include it in the usual version number,
perhaps as patch level?
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/Makefile.am')
-rw-r--r-- | src/sna/Makefile.am | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sna/Makefile.am b/src/sna/Makefile.am index daf4e98c..bacb98fa 100644 --- a/src/sna/Makefile.am +++ b/src/sna/Makefile.am @@ -99,3 +99,10 @@ libsna_la_SOURCES += \ kgem_debug_gen6.c \ $(NULL) endif + +if HAVE_DOT_GIT +git_version.h: $(top_builddir)/.git/HEAD $(shell sed -e '/ref:/!d' -e 's#ref: *#$(top_builddir)/.git/#' < $(top_builddir)/.git/HEAD) + @echo "Recording git-tree used for compilation: `git describe`" + @V=`git describe`; echo "static const char git_version[] = \"$$V\";" > git_version.h +sna_driver.c: git_version.h +endif |