* 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>
*/.deps
*~
.gdb-history
-.version
ABOUT-NLS
INSTALL
Makefile
Makefile.in
THANKS-to-translators
-VERSION
aclocal.m4
autom4te.cache
config.cache
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.
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
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 \
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:
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
|| { echo missing $$p.x 1>&2; status=1; }; \
done; \
exit $$status
-
-../VERSION:
- echo $(VERSION) > $@-t && mv $@-t $@