From 5f76ff1beaaf1fd1c85c43a166c289f9094a379b Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 17 Jun 2015 23:33:25 +0200 Subject: build: always include the VERSION file in 'make dist' Building a 'make dist' tarball from a non-git directory fails to include the VERSION file. This subsequently fails to set the version in the installation directories (for the xlators) and the RPM packaging can not find the correct files. This change makes sure to include a VERSION file in the 'make dist' tarball, no matter from where 'make dist' is run. It mainly addresses this use case: $ git clone ... && cd glusterfs $ ./autogen.sh $ mkdir /tmp/workdir $ cd /tmp/workdir $ $OLDPWD/configure $ make dist Change-Id: I3e87b5e16118b68d065fe99790d4b17e0cef9189 BUG: 1198849 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/11297 Reviewed-by: Kaleb KEITHLEY Tested-by: Gluster Build System Tested-by: NetBSD Build System --- Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 4dcf08c741c..900b5fe9796 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,7 +52,8 @@ gen-ChangeLog: (cd $(srcdir) && git diff && echo ===== git log ==== && git log) > $(distdir)/ChangeLog gen-VERSION: - if test -d .git; then \ - $(top_srcdir)/build-aux/pkg-version --full \ - > $(distdir)/VERSION; \ + if test -d $(top_srcdir)/.git; then \ + cd $(top_srcdir); \ + ./build-aux/pkg-version --full \ + > $(abs_top_builddir)/$(distdir)/VERSION; \ fi -- cgit