From 911f765a859f2be424fc769f7e5977969e1af520 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 22 Aug 2002 22:57:51 +0000 Subject: [PATCH] * automake.in (read_am_file): File computation of path to included file, when $(top_srcdir) is not used. * tests/include2.test: Augment. --- ChangeLog | 6 ++++++ automake.in | 3 +-- tests/include2.test | 27 ++++++++++++++------------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a91a853..5b20c721 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-08-23 Alexandre Duret-Lutz + + * automake.in (read_am_file): File computation of path to + included file, when $(top_srcdir) is not used. + * tests/include2.test: Augment. + 2002-08-22 Alexandre Duret-Lutz * automake.in (set_strictness): Never enable 'portability' diff --git a/automake.in b/automake.in index b1497528..757898a4 100755 --- a/automake.in +++ b/automake.in @@ -7527,8 +7527,7 @@ sub read_am_file ($) { $path =~ s/\$\(srcdir\)\///; push (@include_stack, "\$\(srcdir\)/$path"); - push_dist_common (($relative_dir eq '.') - ? $path : ($relative_dir . '/' . $path)); + push_dist_common ($path); $path = $relative_dir . "/" . $path; } &read_am_file ($path); diff --git a/tests/include2.test b/tests/include2.test index b04306e3..3d311278 100755 --- a/tests/include2.test +++ b/tests/include2.test @@ -1,33 +1,34 @@ #! /bin/sh -# Make sure header in parent directory is included. +# Make sure included files in parent directory are distributed. . $srcdir/defs || exit 1 +set -e + cat >> configure.in << 'END' AC_CONFIG_FILES([sub/Makefile]) +AC_OUTPUT END cat > Makefile.am << 'END' SUBDIRS = sub +test: distdir + test -f $(distdir)/foo + test -f $(distdir)/bar END : > foo +: > bar mkdir sub cat > sub/Makefile.am << 'END' include $(top_srcdir)/foo +include ../bar END -$ACLOCAL || exit 1 -$AUTOMAKE || exit 1 - -# Also make sure include file is distributed. -(sed -n -e '/^DIST_COMMON =.*\\$/ { - :loop - p - n - /\\$/ b loop - p - n - }' -e '/^DIST_COMMON =/ p' sub/Makefile.in | fgrep ../foo) +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure +$MAKE test -- 2.43.5