+2001-04-10 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&scan_aclocal_m4): Handle $relative_dir and special
+ variables.
+ Specify to the caller whether $regen_aclocal_m4.
+ (&handle_configure): Adjust.
+ Transform `REGEN-ACLOCAL-M4'.
+ * configure.am: Use it.
+ * tests/defs (me): New.
+ * tests/configdeps.test: New.
+
2001-04-09 Tom Tromey <tromey@redhat.com>
* m4/missing.m4 (AM_MISSING_HAS_RUN): Use `true', not `:'.
}
-# @DEPENDENCIES
+# ($REGEN, @DEPENDENCIES)
# &scan_aclocal_m4
# ----------------
# If aclocal.m4 creation is automated, return the list of its dependencies.
sub scan_aclocal_m4
{
my $regen_aclocal = 0;
+
+ return (0, ())
+ unless $relative_dir eq '.';
+
+ &examine_variable ('CONFIG_STATUS_DEPENDENCIES');
+ &examine_variable ('CONFIGURE_DEPENDENCIES');
+
if (-f 'aclocal.m4')
{
&define_variable ("ACLOCAL_M4", '$(top_srcdir)/aclocal.m4');
}
}
- my $acinclude = 0;
+ my @ac_deps = ();
+
if (-f 'acinclude.m4')
{
$regen_aclocal = 1;
- $acinclude = 1;
+ push @ac_deps, 'acinclude.m4';
}
- return ()
- unless $regen_aclocal;
-
- # Note that it might be possible that aclocal.m4 doesn't exist but
- # should be auto-generated. This case probably isn't very
- # important.
- my @ac_deps = ($acinclude ? ' acinclude.m4' : '');
-
if (&variable_defined ('ACLOCAL_M4_SOURCES'))
{
push (@ac_deps, '$(ACLOCAL_M4_SOURCES)');
}
}
}
- return @ac_deps;
+
+ # Note that it might be possible that aclocal.m4 doesn't exist but
+ # should be auto-generated. This case probably isn't very
+ # important.
+
+ return ($regen_aclocal, @ac_deps);
}
# Rewrite a list of input files into a form suitable to put on a
my @rewritten = &rewrite_inputs_into_dependencies (1, @secondary_inputs);
- my @aclocal_m4_deps;
- if ($relative_dir eq '.')
- {
- @aclocal_m4_deps = &scan_aclocal_m4 ();
- &examine_variable ('CONFIG_STATUS_DEPENDENCIES');
- &examine_variable ('CONFIGURE_DEPENDENCIES');
- }
-
+ my ($regen_aclocal_m4, @aclocal_m4_deps) = scan_aclocal_m4 ();
$output_rules .=
&file_contents ('configure',
=> $cmdline_use_dependencies ? '' : ' --ignore-deps',
'MAKEFILE-AM-SOURCES'
=> "$input$colon_infile",
+ 'REGEN-ACLOCAL-M4'
+ => $regen_aclocal_m4,
'ACLOCAL_M4_DEPS'
=> join (' ', @aclocal_m4_deps)));