nothing
authorTom Tromey <tromey@redhat.com>
Fri, 21 Feb 1997 23:57:17 +0000 (23:57 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 21 Feb 1997 23:57:17 +0000 (23:57 +0000)
ChangeLog
TODO
automake.in
automake.texi
version.texi

index 639bae2..5fcaa61 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 Fri Feb 21 00:39:17 1997  Tom Tromey  <tromey@cygnus.com>
 
+       * automake.in (my_glob): New sub.
+       (handle_dependencies): Use my_glob.
+       (handle_aclocal_m4): Scan ACLOCAL_AMFLAGS for dependencies.
+
        * ltlibs.am, lisp.am, libs.am, header.am, data.am, progs.am,
        scripts.am, texinfos.am: Add leading space to echo.
 
diff --git a/TODO b/TODO
index 8330f10..8589b59 100644 (file)
--- a/TODO
+++ b/TODO
@@ -2,8 +2,6 @@ Priorities for release:
 !! documentation (eg new macros)
 * copyrights on m4 files, aclocal output
 
-* must understand -Ifoo in ACLOCAL_AMFLAGS
-
 * should not put texiname_TEXINFOS into distribution
   should rename this macro anyway, to foo_texi_DEPENDENCIES
 
index 2f84a0b..ae481c2 100755 (executable)
@@ -2222,9 +2222,9 @@ sub handle_dependencies
            && -f ($build_directory . $relative_dir . "/.deps/.P"))
        {
            local ($depfile);
-           local ($gpat) = $build_directory . $relative_dir . "/.deps/*.P";
 
-           foreach $depfile (<${gpat}>)
+           foreach $depfile (&my_glob ($build_directory
+                                       . $relative_dir . "/.deps/*.P"))
            {
                &scan_dependency_file ($depfile);
            }
@@ -2312,15 +2312,35 @@ sub handle_aclocal_m4
     # important.
     if ($regen_aclocal)
     {
-       $output_rules .= ("\$(srcdir)/aclocal.m4: "
-                         . ($seen_maint_mode ? "\@MAINT\@" : "")
-                         . "configure.in"
-                         . ($acinclude ? ' acinclude.m4' : '')
-                         . "\n\t"
-                         . 'cd $(srcdir) && aclocal'
-                         . (&variable_defined ('ACLOCAL_AMFLAGS')
-                            ? ' $(ACLOCAL_AMFLAGS)' : '')
-                         . "\n");
+       local (@ac_deps) = (
+                           ($seen_maint_mode ? "\@MAINT\@" : "") ,
+                           "configure.in",
+                           ($acinclude ? ' acinclude.m4' : '')
+                           );
+
+       # Scan all -I directories for m4 files.  These are our
+       # dependencies.
+       if (&variable_defined ('ACLOCAL_AMFLAGS'))
+       {
+           local ($amdir);
+           foreach $amdir (&variable_value_as_list ('ACLOCAL_AMFLAGS'))
+           {
+               if ($amdir =~ s/^-I//
+                   && $amdir !~ /^\//
+                   && -d $amdir)
+               {
+                   push (@ac_deps, &my_glob ($am_dir . '/*.m4'));
+               }
+           }
+       }
+
+       &pretty_print_rule ("\$(srcdir)/aclocal.m4:", "\t\t", @ac_deps);
+
+       $output_rules .=  ("\t"
+                          . 'cd $(srcdir) && aclocal'
+                          . (&variable_defined ('ACLOCAL_AMFLAGS')
+                             ? ' $(ACLOCAL_AMFLAGS)' : '')
+                          . "\n");
     }
 }
 
@@ -4826,6 +4846,14 @@ sub touch
     close (TOUCH);
 }
 
+# Glob something.  Do this to avoid indentation screwups everywhere we
+# want to glob.  Gross!
+sub my_glob
+{
+    local ($pat) = @_;
+    return <${pat}>;
+}
+
 ################################################################
 
 # Print an error message and set exit status.
index c1e5139..b3a3343 100644 (file)
@@ -501,6 +501,10 @@ and some variables must be defined in @file{configure.in}.  Automake
 will also use information from @file{configure.in} to further tailor its
 output.
 
+Automake also supplies some @code{autoconf} macros to make the
+maintenance easier.  These macros can automatically be put into your
+@file{aclocal.m4} using the @code{aclocal} program.
+
 @menu
 * Requirements::                Configuration requirements
 * Optional::                    Other things Automake recognizes
index 0f08a4b..4da05c5 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 6 February 1997
+@set UPDATED 21 February 1997
 @set EDITION 1.1l
 @set VERSION 1.1l