From 38c75b59e357c03877ccfc377c6d4400c9610c93 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Thu, 31 Mar 2011 22:10:07 +0200 Subject: build-sys: use git-version-gen to distinct git and release versions The script is copied as is from gnulib. [kzak@redhat.com: - generate .tarball-version and .version files in top level Makefile.am - delete autom4te.cache in autogen.sh] Signed-off-by: Sami Kerola Signed-off-by: Karel Zak --- Makefile.am | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index edf2dbfae..865ee091b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,6 +60,7 @@ endif ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ + .version \ autogen.sh \ README.devel \ README.licensing \ @@ -70,6 +71,10 @@ EXTRA_DIST = \ tools \ docs +# Arrange so that .tarball-version appears only in the distribution +# tarball, and never in a checked-out repository. +dist-hook: + echo $(VERSION) > $(distdir)/.tarball-version distclean-local: -find . -name \*~ -o -name \*.orig -o -name \*.rej | xargs rm -f @@ -93,3 +98,9 @@ ENABLE_ALL = --enable-static-programs \ --enable-login-utils --enable-write --enable-arch --enable-mount DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-use-tty-group $(ENABLE_ALL) + + +BUILT_SOURCES = .version +.version: + echo $(VERSION) > $@-t && mv $@-t $@ + -- cgit v1.2.3-55-g7522