Iain Nicol wrote: > Gnulib's file <build-aux/git-version-gen> contains copy-pastable usage > instructions. It seems to me that these instructions are missing a > line. As a result, for example, ``make distcheck'' in a clone of GNU > Patch's repo fails with the following: > > echo 2.6.1.143-5862 > ../.version-t && mv ../.version-t ../.version > /bin/bash: ../.version-t: Permission denied > > I notice that a few GNU projects (gcal, Guile, M4) explicitly add the > file ``.version'' to EXTRA_DIST. This prevents the above distcheck > failure. > > At first I wasn't sure if this was the right solution, but then I > noticed git-version-gen explicitly says: > > # .version - present in a checked-out repository and in a distribution > # tarball. > > Adding .version to EXTRA_DIST, unsurprisingly, seems to be required for > the latter half of that sentence to be true. > > For lazy people like me who want copy pasted code to Just Work, please > consider making the need for this explicit in the instructions, like in > the attached patch. Assuming you agree this is the right solution, that > is. ...
Thanks for the patch. I've adjusted the log and will push the following later today. The only change I considered was to use "+=" in place of "=". But that would have to affect BUILT_SOURCES, too, and would then require prior definition of those two variables. Not sure it's worth it. It's only a suggestion, after all. >From 835a226d823da6dacd67b77165d5009f5382daad Mon Sep 17 00:00:00 2001 From: Iain Nicol <i...@iainnicol.com> Date: Sun, 31 Jul 2011 13:30:59 +0100 Subject: [PATCH] git-version-gen: document that EXTRA_DIST must include .version * build-aux/git-version-gen: In the how-to-use comment, document that EXTRA_DIST must include .version. Otherwise, "make distcheck" will fail when run from an unpacked distribution tarball. --- ChangeLog | 7 +++++++ build-aux/git-version-gen | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2160e20..55577f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-07-31 Iain Nicol <i...@thenicols.net> + + git-version-gen: document that EXTRA_DIST must include .version + * build-aux/git-version-gen: In the how-to-use comment, document + that EXTRA_DIST must include .version. Otherwise, "make distcheck" + will fail when run from an unpacked distribution tarball. + 2011-07-25 Jim Meyering <meyer...@redhat.com> tests: test-update-copyright.sh: remove unnecessary "rm" commands diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index 686f703..6d71446 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -1,6 +1,6 @@ #!/bin/sh # Print a version string. -scriptversion=2011-02-19.19; # UTC +scriptversion=2011-07-31.12; # UTC # Copyright (C) 2007-2011 Free Software Foundation, Inc. # @@ -57,9 +57,10 @@ scriptversion=2011-02-19.19; # UTC # [bug-project@example]) # # Then use the following lines in your Makefile.am, so that .version -# will be present for dependencies, and so that .tarball-version will -# exist in distribution tarballs. +# will be present for dependencies, and so that .version and +# .tarball-version will exist in distribution tarballs. # +# EXTRA_DIST = $(top_srcdir)/.version # BUILT_SOURCES = $(top_srcdir)/.version # $(top_srcdir)/.version: # echo $(VERSION) > $@-t && mv $@-t $@ -- 1.7.6.347.g4db0d