Fix for PR automake/408:
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 14 Nov 2003 21:12:27 +0000 (21:12 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 14 Nov 2003 21:12:27 +0000 (21:12 +0000)
* lib/am/texinfos.am (install-info-am): Strip any $(srcdir)/ prefix
from $file, as already done for dist-info.
* tests/Makefile.am (TESTS): Add txinfo26.test.
* tests/txinfo26.test: New file.
Report from Nicholas Wourms.

ChangeLog
THANKS
lib/am/texinfos.am
tests/Makefile.am
tests/Makefile.in
tests/txinfo26.test [new file with mode: 0755]

index e759a0d..69ca1a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-11-14  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       Fix for PR automake/408:
+       * lib/am/texinfos.am (install-info-am): Strip any $(srcdir)/ prefix
+       from $file, as already done for dist-info.
+       * tests/Makefile.am (TESTS): Add txinfo26.test.
+       * tests/txinfo26.test: New file.
+       Report from Nicholas Wourms.
+
 2003-11-13  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * m4/lispdir.m4 (AM_PATH_LISPDIR): If EMACS=t, empty it before
diff --git a/THANKS b/THANKS
index 89625d1..966beef 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -155,6 +155,7 @@ Mirko Streckenbach  strecken@infosun.fmi.uni-passau.de
 Morten Eriksen         mortene@sim.no
 Motoyuki Kasahara      m-kasahr@sra.co.jp
 Nelson H. F. Beebe     beebe@math.utah.edu
+Nicholas Wourms                nwourms@netscape.net
 Nicolas Joly           njoly@pasteur.fr
 Nicolas Thiery         nthiery@Icare.mines.edu
 NISHIDA Keisuke                knishida@nn.iij4u.or.jp
index 21e5a05..162dd45 100644 (file)
@@ -124,8 +124,13 @@ if %?LOCAL-TEXIS%
 install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
        $(mkdir_p) $(DESTDIR)$(infodir)
-       @list='$(INFO_DEPS)'; \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       list='$(INFO_DEPS)'; \
        for file in $$list; do \
+## Strip possible $(srcdir) prefix.
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+         esac; \
          if test -f $$file; then d=.; else d=$(srcdir); fi; \
 ## 8+3 filesystems cannot deal with foo.info-N filenames: they all
 ## conflict.  DJGPP comes with a tool, DJTAR, that will rename these
@@ -227,6 +232,7 @@ dist-info: $(INFO_DEPS)
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
        list='$(INFO_DEPS)'; \
        for base in $$list; do \
+## Strip possible $(srcdir) prefix.
          case $$base in \
            $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
          esac; \
index 66520ed..5f1037d 100644 (file)
@@ -480,6 +480,7 @@ txinfo22.test \
 txinfo23.test \
 txinfo24.test \
 txinfo25.test \
+txinfo26.test \
 transform.test \
 unused.test \
 vars.test \
index 99002f1..807271c 100644 (file)
@@ -594,6 +594,7 @@ txinfo22.test \
 txinfo23.test \
 txinfo24.test \
 txinfo25.test \
+txinfo26.test \
 transform.test \
 unused.test \
 vars.test \
diff --git a/tests/txinfo26.test b/tests/txinfo26.test
new file mode 100755 (executable)
index 0000000..873434b
--- /dev/null
@@ -0,0 +1,64 @@
+#! /bin/sh
+# Copyright (C) 2003  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with autoconf; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Make sure Texinfo installation works when absolute --srcdir is used.
+# PR/408
+
+required='makeinfo'
+. ./defs || exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = main.texi
+END
+
+
+cat > main.texi << 'END'
+\input texinfo
+@setfilename main.info
+@settitle main
+@node Top
+Hello walls.
+@include version.texi
+@bye
+END
+
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+$MAKE
+$MAKE distclean
+mkdir build
+cd build
+../configure --srcdir=`pwd`/.. --prefix=`pwd`/_inst --infodir=`pwd`/_inst/info
+$MAKE install
+test -f ../main.info
+test ! -f ./main.info
+test -f _inst/info/main.info
+
+$MAKE uninstall
+test ! -f _inst/info/main.info
+test -f ../main.info