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.
!! 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
&& -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);
}
# 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");
}
}
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.
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