Sat Dec 7 11:34:39 1996 Tom Tromey <tromey@cygnus.com>
+ * automake.in (scan_one_configure_file): New sub.
+ (scan_configure): Scan aclocal.m4 as well as configure.in.
+ (handle_configure): Makefile.in now depends on $(ACLOCAL), because
+ automake scans it.
+
* automake.in (handle_configure): Put full path to file onto
@rewritten_inputs. Test output4.test.
* must split $obj into two parts: one for libtool and one for
deansification. Otherwise .S files will be deansified!
-* automake must scan aclocal.m4
- this means Makefile.in must depend on aclocal.m4 as well
-
-* for new autoconf:
- * completely handle multi-":" mode for AC_CONFIG_HEADER
- * Scan multiple input files when Makefile is generated?
- This would provide flexibility for large projects; subsumes
- the "Makefile.tmpl" idea
-
- [ can't do this. must explain why in manual.
- basically, solving all the problems is too hard
- like: how to remove redundancies between generated .in files
- instead should implement `include' directive for Makefile.am ]
-
- * figure out what to pass as CONFIG_HEADER to config.status
-
- * for multi-":" mode and AC_OUTPUT, it would be good to pick the
- first input file that has a corresponding .am file.
- There are other bugs here too.
-
* look @ jim's $(t:=foo) problem
* should install-foo target for a new dir (eg fooexecdir) be run via
================================================================
+* CONFIG_HEADER is passed incorrectly in ":" mode.
+
* put parser.h into distribution if "yacc -d" is used
* only remove libtool at top level?
Avoid loops when installing; instead unroll them in automake
+* for new autoconf:
+ * completely handle multi-":" mode for AC_CONFIG_HEADER
+ * Scan multiple input files when Makefile is generated?
+ This would provide flexibility for large projects; subsumes
+ the "Makefile.tmpl" idea
+
+ [ can't do this. must explain why in manual.
+ basically, solving all the problems is too hard
+ like: how to remove redundancies between generated .in files
+ instead should implement `include' directive for Makefile.am ]
+* for multi-":" mode and AC_OUTPUT, it might be good to pick the
+ first input file that has a corresponding .am file.
+
Some long-term projects:
* if $(FOO) is used somewhere, ensure FOO is defined, either by
user or by automake if possible
# This rule remakes the Makefile.in. Note use of @MAINT@ forces
# us to abandon pretty-printing. Sigh.
$output_rules .= ($infile . ': ' . ($seen_maint_mode ? '@MAINT@ ' : '')
- . $amfile . ' ' . '$(top_srcdir)/configure.in '
+ . $amfile . ' '
+ . '$(top_srcdir)/configure.in $(ACLOCAL) '
. join (' ', @rewritten) . "\n"
. "\tcd \$(top_srcdir) && automake "
. ($cygnus_mode ? '--cygnus' : ('--' . $strictness_name))
################################################################
-# Scan configure.in for interesting things.
-sub scan_configure
+# Scan one file for interesting things. Subroutine of scan_configure.
+sub scan_one_configure_file
{
- open (CONFIGURE, 'configure.in')
- || die "automake: couldn't open \`configure.in': $!\n";
- print "automake: reading configure.in\n" if $verbose;
+ local ($filename) = @_;
- # Reinitialize libsources here. This isn't really necessary,
- # since we currently assume there is only one configure.in. But
- # that won't always be the case.
- %libsources = ();
+ open (CONFIGURE, $filename)
+ || die "automake: couldn't open \`$filename': $!\n";
+ print "automake: reading $filename\n" if $verbose;
- local ($in_ac_output, $in_ac_replace) = (0, 0);
- local (%make_list, @make_input_list);
- local ($libobj_iter);
while (<CONFIGURE>)
{
# Remove comments from current line.
}
}
+ close (CONFIGURE);
+}
+
+# Scan configure.in and aclocal.m4 for interesting things. We must
+# scan aclocal.m4 because there might be AC_SUBSTs and such there.
+sub scan_configure
+{
+ # Reinitialize libsources here. This isn't really necessary,
+ # since we currently assume there is only one configure.in. But
+ # that won't always be the case.
+ %libsources = ();
+
+ local ($in_ac_output, $in_ac_replace) = (0, 0);
+ local (%make_list, @make_input_list);
+ local ($libobj_iter);
+
+ &scan_one_configure_file ('configure.in');
+ &scan_one_configure_file ('aclocal.m4')
+ if -f 'aclocal.m4';
+
# Set input and output files if not specified by user.
if (! @input_files)
{
%output_files = %make_list;
}
- close (CONFIGURE);
-
&am_conf_error ("\`PACKAGE' not defined in configure.in")
if ! $seen_package;
&am_conf_error ("\`VERSION' not defined in configure.in")