From e6860b5e7f8ded96c1769dcff27dffb97587e3e2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 4 May 2017 21:54:13 +0200 Subject: 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. --- Makefile.am | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Makefile.am') 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. ## -- cgit v1.2.3