Hi,

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.


Regards,
-- 
Iain
From 0ca08b9185f42c61c368ade92e07fdc903cd6be6 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: avoid users encountering a "make distcheck" failure.

* build-aux/git-version-gen: Improve documentation.
---
 ChangeLog                 |    6 ++++++
 build-aux/git-version-gen |    7 ++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2160e20..9cce0ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-31  Iain Nicol  <i...@thenicols.net>
+
+	git-version-gen: avoid users encountering a "make distcheck"
+	failure.
+	* build-aux/git-version-gen: Improve documentation.
+
 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.2.5

Reply via email to