added -I option to aclocal
authorTom Tromey <tromey@redhat.com>
Wed, 8 Jan 1997 01:58:42 +0000 (01:58 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 8 Jan 1997 01:58:42 +0000 (01:58 +0000)
ChangeLog
aclocal.in
automake.in
automake.texi
m4/header.m4
version.texi

index 48aa76c..9be62ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Tue Jan  7 18:35:10 1997  Tom Tromey  <tromey@cygnus.com>
+
+       * aclocal.in (parse_arguments): Handle -I.
+       (usage): Ditto.
+       (scan_m4_files): Ditto.
+
+       * automake.in (handle_single_transform_list): Don't give error
+       message if extension unrecognized.
+
+Tue Dec 17 11:18:20 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * m4/header.m4 (AM_CONFIG_HEADER): Check for $CONFIG_HEADERS, not
+       $CONFIG_HEADER.
+
 Tue Jan  7 17:59:26 1997  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (scan_one_configure_file): AM_INIT_GUILE_MODULE runs
index ffbbbe2..5827612 100644 (file)
@@ -99,8 +99,8 @@ $ac_require_rx = "AC_REQUIRE\\(\\[?([^])]*)\\]?\\)";
 
 \f
 
-&parse_arguments (@ARGV);
-&scan_m4_files ($acdir);
+local (@dirlist) = &parse_arguments (@ARGV);
+&scan_m4_files ($acdir, @dirlist);
 &scan_configure;
 if (! $exit_status)
 {
@@ -121,6 +121,7 @@ sub usage
     print "\
   --acdir=DIR           directory holding config files
   --help                print this help, then exit
+  -I DIR                add directory to search list for .m4 files
   --output=FILE         put output in FILE (default aclocal.m4)
   --verbose             don't be silent
   --version             print version number, then exit
@@ -134,6 +135,7 @@ Report bugs to <bug-gnu-utils\@prep.ai.mit.edu>\n";
 sub parse_arguments
 {
     local (@arglist) = @_;
+    local (@dirlist);
 
     while (@arglist)
     {
@@ -145,6 +147,11 @@ sub parse_arguments
        {
            $output_file = $1;
        }
+       elsif ($arglist[0] eq '-I')
+       {
+           shift (@arglist);
+           push (@dirlist, $arglist[0]);
+       }
        elsif ($arglist[0] eq '--verbose')
        {
            ++$verbosity;
@@ -170,6 +177,8 @@ sub parse_arguments
 
        shift (@arglist);
     }
+
+    return @dirlist;
 }
 
 ################################################################
@@ -229,7 +238,7 @@ sub check_acinclude
 # Scan all the installed m4 files and construct a map.
 sub scan_m4_files
 {
-    local ($m4dir) = @_;
+    local (@dirlist) = @_;
 
     # First, scan acinclude.m4 if it exists.
     if (-f 'acinclude.m4')
@@ -237,21 +246,25 @@ sub scan_m4_files
        $file_contents{'acinclude.m4'} = &scan_file ('acinclude.m4');
     }
 
-    opendir (DIR, $m4dir)
-       || die "aclocal: couldn't open directory \`$m4dir': $!\n";
-    local ($file, $fullfile, $expr);
-    foreach $file (sort grep (! /^\./, readdir (DIR)))
+    local ($m4dir);
+    foreach $m4dir (@dirlist)
     {
-       # Only examine .m4 files.
-       next unless $file =~ /\.m4$/;
+       opendir (DIR, $m4dir)
+           || die "aclocal: couldn't open directory \`$m4dir': $!\n";
+       local ($file, $fullfile, $expr);
+       foreach $file (sort grep (! /^\./, readdir (DIR)))
+       {
+           # Only examine .m4 files.
+           next unless $file =~ /\.m4$/;
 
-       # Skip some files when running out of srcdir.
-       next if $file eq 'aclocal.m4';
+           # Skip some files when running out of srcdir.
+           next if $file eq 'aclocal.m4';
 
-       $fullfile = $m4dir . '/' . $file;
-       $file_contents{$fullfile} = &scan_file ($fullfile);
+           $fullfile = $m4dir . '/' . $file;
+           $file_contents{$fullfile} = &scan_file ($fullfile);
+       }
+       closedir (DIR);
     }
-    closedir (DIR);
 
     # Construct a new function that does the searching.  We use a
     # function (instead of just evalling $search in the loop) so that
index c4f83f3..6646a54 100755 (executable)
@@ -974,8 +974,9 @@ sub handle_single_transform_list
            }
            else
            {
-               # FIXME include line number in error.
-               &am_error ("file \`$_' has unrecognized extension");
+               # No error message here.  Used to have one, but it was
+               # very unpopular.
+               next;
            }
 
            push (@result, $_);
index 322edb4..51af59b 100644 (file)
@@ -741,6 +741,10 @@ directory.  This is typically used for debugging.
 @item --help
 Print a summary of the command line options and exit.
 
+@item -I @var{dir}
+Add the directory @var{dir} to the list of directories searched for
+@samp{.m4} files.
+
 @item --output=@var{file}
 Cause the output to be put into @var{file} instead of @file{aclocal.m4}.
 
index c259223..3a408e1 100644 (file)
@@ -8,5 +8,5 @@ dnl This file resides in the same directory as the config header
 dnl that is generated.  We must strip everything past the first ":",
 dnl and everything past the last "/".
 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-test -z "<<$>>CONFIG_HEADER" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl
+test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl
 changequote([,]))])
index 1cf2d6d..497e41a 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 8 December 1996
+@set UPDATED 7 January 1997
 @set EDITION 1.1l
 @set VERSION 1.1l