From: Jim Meyering Date: Mon, 28 Jan 2008 14:16:17 +0000 (+0100) Subject: Avoid "make distcheck" failure: newly-created man/*.1 files not removed X-Git-Tag: v6.11~185 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7f5e64909fa24ecf2ef72a8cc3070cf38332842;p=platform%2Fupstream%2Fcoreutils.git 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 --- diff --git a/.gitignore b/.gitignore index f5ba5fd..5983d4c 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 ff9070d..148b7d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2008-01-29 Jim Meyering + 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 9502203..af73b7e 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 56f7b85..9965f39 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 6cad1a4..a4351d6 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 $@