[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-cppi] [PATCH 15/19] build: don't depend on help2man when building f

From: Jim Meyering
Subject: [bug-cppi] [PATCH 15/19] build: don't depend on help2man when building from dist tarball
Date: Wed, 25 Jan 2012 09:22:52 +0100

From: Jim Meyering <address@hidden>

* Makefile.am (do-not-require-help2man): New rule.
(dist-hook): Depend on it.
 Makefile.am |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0cb7c07..af628ec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,9 +9,22 @@ EXTRA_DIST = cfg.mk maint.mk .prev-version .version 

 # Arrange so that .tarball-version appears only in the distribution
 # tarball, and never in a checked-out repository.
-dist-hook: gen-ChangeLog
+dist-hook: gen-ChangeLog do-not-require-help2man
        echo $(VERSION) > $(distdir)/.tarball-version

+# By default (i.e., with initial timestamps), do not run help2man when
+# building from a distribution tarball.  Normally, cppi.1 must depend
+# on src/cppi, but when building from a distribution tarball, we don't
+# want that, to avoid depending on help2man then.  Here is the offending
+# dependency:
+#   man/cppi.1: $(common_dep) $(srcdir)/man/cppi.x src/cppi
+# The trick is simply to s,src/cppi,src/cppi.c/ in the $(distdir)
+# we're about to tar and compress.
+.PHONY: do-not-require-help2man
+       perl -pi -e 's,^(man/cppi\.1:.*src/cppi)$$,$$1.c,' \
+          $(distdir)/Makefile.in
 gen_start_date = 2008-01-03
 .PHONY: gen-ChangeLog

reply via email to

[Prev in Thread] Current Thread [Next in Thread]