aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-03-22 14:46:11 -0700
committerBrian Behlendorf <[email protected]>2013-03-22 14:52:01 -0700
commitf6fb7651a0d05b357dc179cc4853263ce15da6ed (patch)
tree7777405089f73437ec3e5790b63620ff67b6e2d5 /Makefile.am
parent09fb1ec48a38ad3ade722a1ad39f9ac73ea2b308 (diff)
Use 'git describe' for working builds
When building from an arbitrary commit in the git tree it's useful for the resulting packages to be uniquely identifiable. Therefore, the build system has been updated to detect if your compiling in git tree. If you are building in a git tree, and there are commits after the last annotated tag. Then the <id>-<hash> component of 'git describe' will be used to overwrite the 'Release:' field in the META file. The only tricky part is that to ensure the 'make dist' tarball is built using the correct release. A dist-hook was added to the top level make file to rewrite the META file using the correct release. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 6bf013ec9..18ad36d2b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,6 +33,10 @@ distclean-local::
-o -name '*.order' -o -name '*.markers' \) \
-type f -print | xargs $(RM)
+dist-hook:
+ sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \
+ $(distdir)/META
+
ctags:
$(RM) $(top_srcdir)/tags
find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags