summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-05-04 21:54:13 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-04 23:51:45 +0200
commite6860b5e7f8ded96c1769dcff27dffb97587e3e2 (patch)
tree41614d3cfbd0b03e542fac022b441ff6d87b2467 /Makefile.am
parent1d1ddf26d5c11aa732ccad4808d4c2d3424ff944 (diff)
downloadpatches-e6860b5e7f8ded96c1769dcff27dffb97587e3e2.tar
patches-e6860b5e7f8ded96c1769dcff27dffb97587e3e2.tar.gz
build: Use Gnulib's 'git-version-gen'.
* Makefile.am (EXTRA_DIST, BUILT_SOURCES): Add $(top_srcdir)/.version. ($(top_srcdir)/.version, gen-tarball-version): New targets. (dist-hook): Depend on 'gen-tarball-version'. (.PHONY): Add 'gen-tarball-version'. * build-aux/git-version-gen: New file, from Gnulib v0.1-1312-ga87d5e5c6. * configure.ac: Use it in 'AC_INIT'. Use 'https' for the URL.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 64d8d31cfe..8fe9e350cc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -510,11 +510,19 @@ guix-binary.%.tar.xz:
cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"
-dist-hook: gen-ChangeLog gen-AUTHORS
+dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version
dist-hook: assert-no-store-file-names
distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
+EXTRA_DIST += $(top_srcdir)/.version
+BUILT_SOURCES += $(top_srcdir)/.version
+$(top_srcdir)/.version:
+ echo $(VERSION) > "$@-t" && mv "$@-t" "$@"
+
+gen-tarball-version:
+ echo $(VERSION) > "$(distdir)/.tarball-version"
+
gen-ChangeLog:
$(AM_V_GEN)if test -d .git; then \
$(top_srcdir)/build-aux/gitlog-to-changelog \
@@ -562,9 +570,10 @@ hydra-jobs.scm: $(GOBJECTS)
"$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
$(AM_V_at)mv "$@.tmp" "$@"
-.PHONY: gen-ChangeLog gen-AUTHORS clean-go make-go
+.PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version
.PHONY: assert-no-store-file-names assert-binaries-available
.PHONY: assert-final-inputs-self-contained
+.PHONY: clean-go make-go
## -------------- ##
## Silent rules. ##