summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-01-28 15:16:17 +0100
committerJim Meyering <meyering@redhat.com>2008-01-29 09:40:31 +0100
commita7f5e64909fa24ecf2ef72a8cc3070cf38332842 (patch)
tree3f973f5ca4f7e65706c2d1ffcf09231c3e024e71
parent533391a2a75f49da27adc71214caeeb4ef07d81c (diff)
downloadcoreutils-a7f5e64909fa24ecf2ef72a8cc3070cf38332842.tar.xz
Avoid "make distcheck" failure: newly-created man/*.1 files not removed
* Makefile.am (EXTRA_DIST): Add .version. (.version): New rule. (dist-hook): Don't create $(distdir)/.version here, now that it's being distributed. * man/Makefile.am (common_dep): Use ../.version, not ../VERSION. (../VERSION): Remove rule. * GNUmakefile (dummy): Create .version, not VERSION. Add an extra "...:= $(shell..." statement to ensure that .version exists even when the preceding code is not run. * .gitignore: Remove both .version and VERSION. Signed-off-by: Jim Meyering <meyering@redhat.com>
-rw-r--r--.gitignore2
-rw-r--r--ChangeLog12
-rw-r--r--GNUmakefile7
-rw-r--r--Makefile.am7
-rw-r--r--man/Makefile.am7
5 files changed, 24 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index f5ba5fd63..5983d4c3b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,13 +5,11 @@
*/.deps
*~
.gdb-history
-.version
ABOUT-NLS
INSTALL
Makefile
Makefile.in
THANKS-to-translators
-VERSION
aclocal.m4
autom4te.cache
config.cache
diff --git a/ChangeLog b/ChangeLog
index ff9070d60..148b7d75a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2008-01-29 Jim Meyering <meyering@redhat.com>
+ Avoid "make distcheck" failure: newly-created man/*.1 files not removed
+ * Makefile.am (EXTRA_DIST): Add .version.
+ (.version): New rule.
+ (dist-hook): Don't create $(distdir)/.version here, now that it's
+ being distributed.
+ * man/Makefile.am (common_dep): Use ../.version, not ../VERSION.
+ (../VERSION): Remove rule.
+ * GNUmakefile (dummy): Create .version, not VERSION.
+ Add an extra "...:= $(shell..." statement to ensure that
+ .version exists even when the preceding code is not run.
+ * .gitignore: Remove both .version and VERSION.
+
ls: don't segfault on files in /proc with an old libselinux
* src/ls.c (gobble_file): Work around a bug in libselinux1-2.0.15
whereby getfilecon returns 0 yet sets the context to NULL.
diff --git a/GNUmakefile b/GNUmakefile
index 9502203f6..af73b7ee3 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -49,11 +49,16 @@ ifeq (0,$(MAKELEVEL))
ifneq ($(_curr-ver),$(VERSION))
$(info INFO: running autoreconf for new version string: $(_curr-ver))
dummy := $(shell rm -rf autom4te.cache; autoreconf)
- dummy := $(shell echo $(_curr-ver) > VERSION)
+ dummy := $(shell echo $(_curr-ver) > .version)
+ _created_version_file = 1
endif
endif
endif
+ifneq ($(_created_version_file),1)
+ dummy := $(shell test -f .version || echo $(VERSION) > .version)
+endif
+
include $(srcdir)/Makefile.cfg
include $(srcdir)/Makefile.maint
diff --git a/Makefile.am b/Makefile.am
index 56f7b8585..9965f3995 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,6 +18,7 @@
SUBDIRS = lib src doc man po tests gnulib-tests
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
.prev-version THANKS-to-translators THANKStt.in \
+ .version \
.vg-suppressions \
.x-po-check \
.x-sc_GPL_version \
@@ -65,12 +66,12 @@ check-root:
rm_subst = \
s!(rm -f (rm\b|\$$\(bin_PROGRAMS\)$$))!$$1 > /dev/null 2>&1 || /bin/$$1!
-# Arrange so that .version appears only in distribution tarballs,
-# never in a checked-out repository.
+.version:
+ echo $(VERSION) > $@-t && mv $@-t $@
+
# The perl substitution is to change some key uses of "rm" to "/bin/rm".
# See the rm_subst comment for details.
dist-hook:
- echo $(VERSION) > $(distdir)/.version
perl -pi -e '$(rm_subst)' $(distdir)/src/Makefile.in
distcheck-hook:
diff --git a/man/Makefile.am b/man/Makefile.am
index 6cad1a44e..a4351d651 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -22,8 +22,8 @@ man_aux = $(dist_man_MANS:.1=.x)
EXTRA_DIST = $(man_aux) $(NO_INSTALL_PROGS_DEFAULT:%=%.x) help2man
MAINTAINERCLEANFILES = $(dist_man_MANS)
-# Depend on ../VERSION to get version number changes.
-common_dep = ../VERSION
+# Depend on ../.version to get version number changes.
+common_dep = ../.version
# Note that arch depends on uname.c
arch.1: $(common_dep) $(srcdir)/arch.x ../src/uname.c
@@ -198,6 +198,3 @@ check-programs-vs-x:
|| { echo missing $$p.x 1>&2; status=1; }; \
done; \
exit $$status
-
-../VERSION:
- echo $(VERSION) > $@-t && mv $@-t $@