From dc7e03f3bd177cdc7f2c8a2a48256dcd00eba003 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 5 Dec 2002 15:26:57 +0000 Subject: [PATCH] * lib/am/texinfos.am (install-info-am, uninstall-info-am): Strip directories from info filenames. * tests/texinfo13.test: Make sure main.info gets installed as $(infodir)/main.info. --- ChangeLog | 5 +++++ lib/am/texinfos.am | 22 +++++++++++++--------- tests/texinfo13.test | 3 +++ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35a0c12d..70227287 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2002-12-05 Alexandre Duret-Lutz + * lib/am/texinfos.am (install-info-am, uninstall-info-am): Strip + directories from info filenames. + * tests/texinfo13.test: Make sure main.info gets installed + as $(infodir)/main.info. + * automake.in (handle_dist): Do not define %GETTEXT% if the user is using $seen_gettext_external, this distcheck won't run `./configure' with a meaningless `--with-included-gettext'. diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index fd9380ce..72927d56 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -121,10 +121,10 @@ install-info-am: $(INFO_DEPS) @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 \ + for ifile in $$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/\(.*\)"`; \ +## Strip directory + relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ else : ; fi; \ @@ -144,15 +144,17 @@ install-info-am: $(INFO_DEPS) install-info --version | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ +## Strip directory + relfile=`echo "$$file" | sed 's|^.*/||'`; \ ## 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";\ + echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\ ## 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 || :;\ + install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\ done; \ else : ; fi else ! %?LOCAL-TEXIS% @@ -180,18 +182,20 @@ uninstall-info-am: install-info --version | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ ## 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; \ + echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \ + install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ (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]; \ + echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9])"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9]; \ else :; fi); \ done else ! %?LOCAL-TEXIS% diff --git a/tests/texinfo13.test b/tests/texinfo13.test index 51d1ae26..077f6354 100755 --- a/tests/texinfo13.test +++ b/tests/texinfo13.test @@ -31,6 +31,9 @@ echo AC_OUTPUT >> configure.in cat > Makefile.am << 'END' info_TEXINFOS = subdir/main.texi subdir_main_TEXINFOS = subdir/inc.texi + +installcheck: + test -f $(infodir)/main.info END mkdir subdir -- 2.43.5