-install-info: $(INFO_DEPS)
- $(top_srcdir)/mkinstalldirs $(infodir)
- for file in $(INFO_DEPS); do \
-## This ${...} is in the shell, not in make.
- for ifile in $(srcdir)/$${file}*; do \
- $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
- done; \
-## We need the 'else' because in some broken versions of sh 'if' will
-## return false if the test fails. We use ':' because the GNU
-## standards prohibit us from using 'true'.
-## FIXME no one has install-info, so for now we just comment it out.
-## if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
-## install-info --infodir=$(infodir) $$d/$$file; \
-## else :; fi; \
+##
+## Funny name due to --cygnus influence; we want to reserve
+## `install-info' for the user.
+##
+## TEXINFOS primary are always installed in infodir, hence install-data
+## is hard coded.
+if %?INSTALL-INFO%
+if %?LOCAL-TEXIS%
+am__installdirs += $(DESTDIR)$(infodir)
+install-data-am: install-info-am
+endif %?LOCAL-TEXIS%
+if %?SUBDIRS%
+RECURSIVE_TARGETS += install-info-recursive
+.PHONY install-info: install-info-recursive
+else !%?SUBDIRS%
+install-info: install-info-am
+endif !%?SUBDIRS%
+endif %?INSTALL-INFO%
+
+.PHONY: install-info-am
+
+if %?LOCAL-TEXIS%
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ for ifile in echo $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \
+ if test -f $$ifile; then \
+## Strip leading '$$d/'.
+ relfile=`expr "$$ifile" : "$$d/\(.*\)"`; \
+ echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \
+ $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \
+ else : ; fi; \
+ done; \
+ 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. Debian install-info v1.8.3
+## prints version info to stderr.
+##
+## Do not use
+## install-info --version 2>&1 | sed 1q | grep -s -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 | grep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+## Run `:' after install-info in case install-info fails. We really
+## don't care about failures here, because they can be spurious. For
+## instance if you don't have a dir file, install-info will fail. I
+## think instead it should create a new dir file for you. This bug
+## causes the `make distcheck' target to fail reliably.
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+## Use `|| :' here because Sun make passes -e to sh; if install-info
+## fails then we'd fail if we used `;'.
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ done; \
+ else : ; fi
+else ! %?LOCAL-TEXIS%
+install-info-am:
+endif ! %?LOCAL-TEXIS%
+
+
+## -------------- ##
+## Uninstalling. ##
+## -------------- ##
+
+?SUBDIRS?RECURSIVE_TARGETS += uninstall-info-recursive
+?SUBDIRS?.PHONY uninstall-info: uninstall-info-recursive
+?INSTALL-INFO?uninstall-am: uninstall-info-am
+
+.PHONY: uninstall-info-am
+
+if %?LOCAL-TEXIS%
+uninstall-info-am:
+ $(PRE_UNINSTALL)
+## Run two loops here so that we can handle PRE_UNINSTALL and
+## NORMAL_UNINSTALL correctly. Debian install-info v1.8.3 prints
+## version info to stderr.
+ @if (install-info --version && \
+ install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+## install-info needs the actual info file. We use the installed one,
+## rather than relying on one still being in srcdir or builddir.
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
+ install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
+ done; \
+ else :; fi
+ @$(NORMAL_UNINSTALL)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ (if cd $(DESTDIR)$(infodir); then \
+ echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
+ rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
+ else :; fi); \