]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* lib/am/texinfos.am (install-info-am, uninstall-info-am): Strip
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 5 Dec 2002 15:26:58 +0000 (15:26 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 5 Dec 2002 15:26:58 +0000 (15:26 +0000)
directories from info filenames.
* tests/texinfo13.test: Make sure main.info gets installed
as $(infodir)/main.info.

ChangeLog
lib/am/texinfos.am
tests/texinfo13.test

index 35a0c12d4750a6781758b61139832044f49cc196..702272874706b1700cc2a4ab3e3a8ef2fddef30f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2002-12-05  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * 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'.
index fd9380cede2005d3c299e238dee7193f727f6a14..72927d56c864ff2d1cbe9c9439b209ef7f69562f 100644 (file)
@@ -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%
index 51d1ae26b5054efb2f4188620f3a7d566f7df0d8..077f63543050557d02163e7eeb0f5ecf361fe04f 100755 (executable)
@@ -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