automake-patches
[Top][All Lists]
Advanced

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

Re: FYI: ignore missing 'sinclude'd files (PR/450).


From: Alexandre Duret-Lutz
Subject: Re: FYI: ignore missing 'sinclude'd files (PR/450).
Date: Fri, 04 Mar 2005 21:35:25 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

>>> "Peter" == Peter Breitenlohner <address@hidden> writes:

[...]

 Peter> There remains however a problem:

Please DO keep any discussion about Automake on the lists.
http://www-src.lip6.fr/homepages/Alexandre.Duret-Lutz/automail.html

 Peter> when running "make check", the test "acloca13.test" now FAILs.

Thanks.  I can't reproduce this here, but this test was a bit
erroneous anyway.  I'm installing the following on branch-1-9,
and its equivalent on HEAD.

2005-03-04  Alexandre Duret-Lutz  <address@hidden>

        * aclocal.in (scan_configure_dep, scan_file): Include file names
        are relative to the directory of configure.ac, not to the
        directory of the file doing the include.  Remove code for this
        later case.
        (rel2abs): Remove, unused.
        * tests/acloca13.test: Run distcheck and make sure all macros are
        actually distributed.

Index: aclocal.in
===================================================================
RCS file: /cvs/automake/automake/aclocal.in,v
retrieving revision 1.104.2.7
diff -u -r1.104.2.7 aclocal.in
--- aclocal.in  3 Mar 2005 21:36:00 -0000       1.104.2.7
+++ aclocal.in  4 Mar 2005 20:22:46 -0000
@@ -201,25 +201,6 @@
     &add_file ($map{$macro});
 }
 
-# rel2abs ($file, $directory)
-# ---------------------------
-# Similar to File::Spec->rel2abs ($file, $directory), but
-# work with Perl 5.005.  (File::Spec->rel2abs is available
-# only in Perl 5.6.)
-# Remove this once we require 5.6.
-sub rel2abs ($$)
-{
-  my ($file, $dir) = @_;
-  if (! File::Spec->file_name_is_absolute ($file))
-    {
-      $dir = cwd () . "/$dir"
-       unless File::Spec->file_name_is_absolute ($dir);
-      $file = "$dir/$file";
-    }
-  $file = File::Spec->canonpath ($file);
-  return $file;
-}
-
 # scan_configure_dep ($file)
 # --------------------------
 # Scan a configure dependency (configure.ac, or separate m4 files)
@@ -278,8 +259,7 @@
     }
 
   add_macro ($_) foreach (@rlist);
-  my $dirname = dirname $file;
-  &scan_configure_dep (rel2abs ($_, $dirname)) foreach (@ilist);
+  &scan_configure_dep ($_) foreach (@ilist);
 }
 
 # Add a file to output.
@@ -306,7 +286,6 @@
 sub scan_file ($$)
 {
   my ($file, $where) = @_;
-  my $base = dirname $file;
 
   # Do not scan the same file twice.
   return @$file_includes{$file} if exists $file_includes{$file};
@@ -367,15 +346,6 @@
          my $ifile = $2 || $3;
          # Skip missing `sinclude'd files.
          next if $1 eq 's' && ! -f $ifile;
-         # m4_include is relative to the directory of the file which
-         # perform the include, but we want paths relative to the
-         # directory where aclocal is run.  Do not use
-         # File::Spec->rel2abs, because we want to store relative
-         # paths (they might be used later of aclocal outputs an
-         # m4_include for this file, or if the user itself includes
-         # this file).
-         $ifile = "$base/$ifile"
-           unless $base eq '.' || File::Spec->file_name_is_absolute ($ifile);
          push (@inc_files, $ifile);
          $inc_lines{$ifile} = $.;
        }
Index: tests/acloca13.test
===================================================================
RCS file: /cvs/automake/automake/tests/acloca13.test,v
retrieving revision 1.1
diff -u -r1.1 acloca13.test
--- tests/acloca13.test 7 Sep 2003 13:26:44 -0000       1.1
+++ tests/acloca13.test 4 Mar 2005 20:22:46 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -26,17 +26,25 @@
 
 cat >> configure.in << 'END'
 m4_include([somefile.m4])
+AC_OUTPUT
 END
 
+cat >Makefile.am <<'EOF'
+check-local:
+       test -f "$(srcdir)/somefile.m4"
+       test -f "$(srcdir)/m4/version1.m4"
+       test -f "$(srcdir)/m4/otherfile.m4"
+EOF
+
 mkdir m4
 
 echo MACRO1 >somefile.m4
-echo HELLO >m4/otherfile.m4
+echo 'AC_PREREQ([2.58])' >m4/otherfile.m4
 
 cat >m4/version1.m4 <<EOF
 AC_DEFUN([MACRO1])
 AC_DEFUN([MACRO2])
-m4_sinclude(otherfile.m4)
+m4_sinclude(m4/otherfile.m4)
 EOF
 
 cat >m4/version2.m4 <<EOF
@@ -60,3 +68,8 @@
 $sleep
 $ACLOCAL -I m4
 test `ls -1t aclocal.m4 m4/otherfile.m4 | sed 1q` = aclocal.m4
+
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE distcheck

-- 
Alexandre Duret-Lutz





reply via email to

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