diff options
author | Jim Meyering <meyering@redhat.com> | 2011-06-19 17:15:26 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-06-19 17:15:26 +0200 |
commit | c8b5b09d1393139ba443e7e239cfa6a9c3e92258 (patch) | |
tree | 364f3da63ad08b4c4d3b0f213fe94decf4120543 /configure.ac | |
parent | e783a23b1944d89405342f5d6a09dba26c192005 (diff) | |
download | diffutils-c8b5b09d1393139ba443e7e239cfa6a9c3e92258.tar.gz |
build: don't require perl when building from a tarball
But do ensure -- in all other circumstances -- that the man/*.1
files are rebuilt whenever the version number changes.
* configure.ac (SRC_VERSION_C): Define.
* man/Makefile.am (dist_man1_MANS): Rename from $(man1_MANS),
so that we distribute those pesky man/*.1 files.
(EXTRA_DIST): Reflect name change.
(MAINTAINERCLEANFILES): Define this, not DISTCLEANFILES,
now that these generated files are distributed.
($(dist_man1_MANS)): Depend on $(SRC_VERSION_C), so we get the
full dependency when not building from a tarball.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 45e0fab..1afc344 100644 --- a/configure.ac +++ b/configure.ac @@ -144,6 +144,19 @@ fi AC_FUNC_CLOSEDIR_VOID AC_FUNC_FORK +# When .tarball-version exists, we're building from a tarball +# and must not make man/*.1 files depend on the generated src/version.c, +# because that would induce a requirement to run the help2man perl script. +# We are not yet prepared to make perl a build-from-tarball requirement. +# Hence, here we detect .tarball-version existence. When not present, +# we define a variable to be used in man/Makefile.am to induce the +# proper dependency (so that man/*.1 will be rebuilt upon any version change), +# but not when built from a tarball. +AC_SUBST([SRC_VERSION_C]) +test -f $srcdir/.tarball-version \ + && SRC_VERSION_C= \ + || SRC_VERSION_C=../src/version.c + AM_GNU_GETTEXT([external], [need-ngettext]) AM_GNU_GETTEXT_VERSION([0.17]) XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT" |