summaryrefslogtreecommitdiff
path: root/lib/am
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-10-23 13:19:21 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-10-23 19:13:55 +0200
commit1ec1668645acc84c2f2ae78d5a3da6f9e50ca429 (patch)
treeb84fd035ba80736e23c413a4ec89cba041b151b2 /lib/am
parent9b5ced02fd41130d408d95808855a067eb82dd68 (diff)
downloadautomake-1ec1668645acc84c2f2ae78d5a3da6f9e50ca429.tar.gz
info: allow user to inhibit creation/update of '${infodir}/dir'
With this change, we allow the user to request the install-info rules not to update the `${infodir}/dir' file, by exporting the environment variable `AM_UPDATE_INFO_DIR' to the value "no". This is especially useful to distro packagers, and is a definite improvement over our previous hack of looking whether the `install-info' program was the Debian or GNU version -- hack which had been silently broken with recent versions of debian install-info BTW (probably since dpkg 1.15.4, 2009-09-06). This change fixes automake bug#9773. See also Debian Bug#543992. * lib/am/texinfos.am: Don't look anymore at the output of `install-info --version' to decide whether to use it to update the `${infodir}/dir' or not; instead, honour the environment variable `AM_UPDATE_INFO_DIR'. * tests/install-info-dir.test: New test. * tests/Makefile.am (TESTS): Add it. * tests/defs: Also unset `AM_UPDATE_INFO_DIR', to avoid unwanted interferences from the environment. * doc/automake.texi (Texinfo): Update. * NEWS: Likewise. * THANKS: Likewise. Report by Jonathan Nieder.
Diffstat (limited to 'lib/am')
-rw-r--r--lib/am/texinfos.am22
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index c9dcd9d7b..80712cf4c 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -208,18 +208,16 @@ install-info-am: $(INFO_DEPS)
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
@$(POST_INSTALL)
-## Only run this code if install-info actually exists, and it is not
-## the Debian install-info. FIXME: once Debian install-info goes
-## away, we can remove this hack. Some versions of Debian install-info
-## print their version on stderr (e.g. 1.8.3), other do it in
-## on stdout (e.g. 1.10.15).
-##
-## Do not use
-## install-info --version 2>&1 | sed 1q | grep -v -i debian
-## as if install-info does not exist, grep -v will be happy, and
-## therefore the code will be triggered although install-info is missing.
- @if (install-info --version && \
- install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+## Only run this code if install-info actually exists, and if the user
+## doesn't request it not to be run (through the `AM_UPDATE_INFO_DIR'
+## environment variable). See automake bug#9773 and Debian Bug#543992.
+ @am__run_installinfo=yes; \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) am__run_installinfo=no;; \
+ *) (install-info --version) >/dev/null 2>&1 \
+ || am__run_installinfo=no;; \
+ esac; \
+ if test $$am__run_installinfo = yes; then \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
## Strip directory