summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--THANKS1
-rw-r--r--lib/am/texinfos.am8
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/Makefile.in1
-rwxr-xr-xtests/txinfo26.test64
6 files changed, 83 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e759a0d99..69ca1a183 100644
--- 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 89625d181..966beef50 100644
--- 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
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 21e5a055d..162dd454c 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -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; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 66520ed82..5f1037d9b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -480,6 +480,7 @@ txinfo22.test \
txinfo23.test \
txinfo24.test \
txinfo25.test \
+txinfo26.test \
transform.test \
unused.test \
vars.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 99002f1a1..807271ca3 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -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
index 000000000..873434b81
--- /dev/null
+++ b/tests/txinfo26.test
@@ -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