automake-patches
[Top][All Lists]
Advanced

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

Re: Patch: PR 348


From: Tom Tromey
Subject: Re: Patch: PR 348
Date: 19 Aug 2002 16:47:27 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "adl" == Alexandre Duret-Lutz <address@hidden> writes:

adl> I was suggesting we always distribute the file.  

Thanks.  I'm checking in the appended.

Tom

Index: ChangeLog
from  Tom Tromey  <address@hidden>

        For PR automake/348:
        * tests/Makefile.am (TESTS): Added include2.test.
        * tests/include2.test: New file.
        * tests/include.test: Check to make sure include file is
        distributed.
        * automake.in (read_am_file): Distribute included files.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1337
diff -u -r1.1337 automake.in
--- automake.in 18 Aug 2002 22:26:36 -0000 1.1337
+++ automake.in 19 Aug 2002 22:46:09 -0000
@@ -7517,15 +7517,20 @@
             my $path = $1;
 
             if ($path =~ s/^\$\(top_srcdir\)\///)
-            {
+             {
                 push (@include_stack, "\$\(top_srcdir\)/$path");
-            }
+               # Distribute any included file.
+               my $distname = backname ($relative_dir) . '/' . $path;
+               push_dist_common ($distname);
+             }
             else
-            {
+             {
                 $path =~ s/\$\(srcdir\)\///;
                 push (@include_stack, "\$\(srcdir\)/$path");
-                $path = $relative_dir . "/" . $path;
-            }
+               push_dist_common (($relative_dir eq '.')
+                                 ? $path : ($relative_dir . '/' . $path));
+               $path = $relative_dir . "/" . $path;
+             }
             &read_am_file ($path);
         }
        else
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.428
diff -u -r1.428 Makefile.am
--- tests/Makefile.am 18 Aug 2002 22:26:37 -0000 1.428
+++ tests/Makefile.am 19 Aug 2002 22:46:09 -0000
@@ -184,6 +184,7 @@
 header.test \
 implicit.test \
 include.test \
+include2.test \
 info.test \
 insh.test \
 insh2.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.550
diff -u -r1.550 Makefile.in
--- tests/Makefile.in 18 Aug 2002 22:26:37 -0000 1.550
+++ tests/Makefile.in 19 Aug 2002 22:46:09 -0000
@@ -271,6 +271,7 @@
 header.test \
 implicit.test \
 include.test \
+include2.test \
 info.test \
 insh.test \
 insh2.test \
Index: tests/include.test
===================================================================
RCS file: /cvs/automake/automake/tests/include.test,v
retrieving revision 1.2
diff -u -r1.2 include.test
--- tests/include.test 20 Oct 2001 11:17:17 -0000 1.2
+++ tests/include.test 19 Aug 2002 22:46:09 -0000
@@ -15,4 +15,14 @@
 $AUTOMAKE || exit 1
 len="`grep '^srcdir' Makefile.in | wc -l`"
 echo "len = $len"
-test $len -eq 1
+test $len -eq 1 || 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' Makefile.in | grep foo)
Index: tests/include2.test
===================================================================
RCS file: tests/include2.test
diff -N tests/include2.test
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/include2.test 19 Aug 2002 22:46:09 -0000
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+# Make sure header in parent directory is included.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+END
+
+: > foo
+
+mkdir sub
+cat > sub/Makefile.am << 'END'
+include $(top_srcdir)/foo
+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)




reply via email to

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