automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: Fix installation and uninstallation of Info files built in subdirec


From: Alexandre Duret-Lutz
Subject: FYI: Fix installation and uninstallation of Info files built in subdirectories.
Date: Thu, 05 Dec 2002 16:26:00 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/20.7 (i386-debian-linux-gnu)

I'm checking this in (HEAD & branch-1-7)

2002-12-05  Alexandre Duret-Lutz  <address@hidden>

        * 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.

Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.198.2.16
diff -u -r1.198.2.16 NEWS
--- NEWS        5 Dec 2002 11:06:23 -0000       1.198.2.16
+++ NEWS        5 Dec 2002 15:24:20 -0000
@@ -1,4 +1,5 @@
 Bugs fixed in 1.7.1c:
+* Fix installation and uninstallation of Info files built in subdirectories.
 * Do not run `./configure --with-included-gettext' during `make distcheck'
   if AM_GNU_GETTEXT([external]) is used.
 * Correctly uninstall renamed man pages.
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.98.2.1
diff -u -r1.98.2.1 texinfos.am
--- lib/am/texinfos.am  10 Oct 2002 00:45:04 -0000      1.98.2.1
+++ lib/am/texinfos.am  5 Dec 2002 15:24:22 -0000
@@ -121,10 +121,10 @@
        @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 --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 @@
             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: tests/texinfo13.test
===================================================================
RCS file: /cvs/automake/automake/tests/texinfo13.test,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 texinfo13.test
--- tests/texinfo13.test        21 Nov 2002 13:27:43 -0000      1.4.2.1
+++ tests/texinfo13.test        5 Dec 2002 15:24:22 -0000
@@ -31,6 +31,9 @@
 cat > Makefile.am << 'END'
 info_TEXINFOS = subdir/main.texi
 subdir_main_TEXINFOS = subdir/inc.texi
+
+installcheck:
+       test -f $(infodir)/main.info
 END
 
 mkdir subdir

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]