summaryrefslogtreecommitdiff
path: root/Makefile.am
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 /Makefile.am
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>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am7
1 files changed, 4 insertions, 3 deletions
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: