[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
avoid "make distcheck" failure: newly-created man/*.1 files not removed
From: |
Jim Meyering |
Subject: |
avoid "make distcheck" failure: newly-created man/*.1 files not removed |
Date: |
Tue, 29 Jan 2008 09:51:10 +0100 |
FYI, "make distcheck" was failing when it noticed
that all of the man/*.1 files were left behind.
They shouldn't even have been built, from a just-unpacked tarball.
Including the new .version file in the distribution tarball,
_with its time stamp_ keeps "make" from regenerating those files
in the first place.
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.
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/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) > address@hidden && mv address@hidden $@
+
# 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) > address@hidden && mv address@hidden $@
--
1.5.4.rc5.1.ge6bfe
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- avoid "make distcheck" failure: newly-created man/*.1 files not removed,
Jim Meyering <=