automake-patches
[Top][All Lists]
Advanced

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

FYI: buglet with included files in DIST_COMMON


From: Alexandre Duret-Lutz
Subject: FYI: buglet with included files in DIST_COMMON
Date: 23 Aug 2002 00:50:03 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Working on something else I've found that if `foo/Makefile.am' 
contains `include ../bar', then `foo/Makefile.in' has 
`DIST_COMMOND = [...] foo/../bar [...]' instead of 
`DIST_COMMOND = [...] ../bar [...]'

I'm installing the following.  This also changes include2.test
so that it makes sure `distdir' is not confused by `..' in filenames.

2002-08-23  Alexandre Duret-Lutz  <address@hidden>

        * automake.in (read_am_file): File computation of path to
        included file, when $(top_srcdir) is not used.
        * tests/include2.test: Augment.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1339
diff -u -r1.1339 automake.in
--- automake.in 22 Aug 2002 17:23:03 -0000      1.1339
+++ automake.in 22 Aug 2002 22:48:43 -0000
@@ -7527,8 +7527,7 @@
              {
                 $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);
Index: tests/include2.test
===================================================================
RCS file: /cvs/automake/automake/tests/include2.test,v
retrieving revision 1.1
diff -u -r1.1 include2.test
--- tests/include2.test 19 Aug 2002 22:48:39 -0000      1.1
+++ tests/include2.test 22 Aug 2002 22:48:43 -0000
@@ -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

-- 
Alexandre Duret-Lutz





reply via email to

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