Akim Demaille [Tue, 6 Feb 2001 10:17:56 +0000 (10:17 +0000)]
* subdirs.am: This file is the exception: clean recursive targets
are called by the clean targets, not the clean-am targets.
Otherwise we have a circular dependency: clean -> clean-am ->
clean-recursive -> clean.
* automake.in (handle_clean): Bind `-local' targets to `-am'
targets, not top targets.
Don't declare -recursive dependencies of the clean targets:
`subdirs.am' did it. Less hard coded knowledge, transfered
into...
* clean.am: here.
Akim Demaille [Tue, 6 Feb 2001 09:09:36 +0000 (09:09 +0000)]
Monstro unsplitable patch.
The aim is to remove hard coded knowledge about clean targets from
automake.in, leaving them in the *.am files.
In addition to the mechanic needed to factor some dependencies, it
appears some rules (most notably distclean and maintainer-clean)
need factored actions. So first, be ready to catch factored
rules.
* automake.in (&file_contents): For the time being, use an extended
$RULE_PATTERN which is able to match any kind of rules, with or
without dependency, with or without actions.
Handle all the rules uniformly, storing in %actions the factored
actions.
(&flatten, &target_cmp): New.
(&handle_factored_dependencies): Output the %actions.
No longer special case `clean'.
Output the rules in alphabetical order, but keeping `.PHONY' last.
Now we must not use &push_phony_cleaners, which is doing all sort
of magic to push a bit of everything in all the clean targets.
The biggest problem being that, making a Cartesian product, it
requires many useless targets. The `*.am' file know better.
But first, register the new factored rules.
* automake.in (&initialize_per_input): Include clean, mostlyclean,
maintainer-clean, distclean and their `*-am' counterpart in
%dependencies.
Initialize %actions.
(get_object_extension, handle_texinfo, handle_tags, handle_multilib)
handle_dependencies, handle_subdirs, handle_configure, handle_clean)
(handle_emacs_lisp, handle_python): Don't play with
&push_phony_cleaners nor &depend and `clean'.
* texinfos.am, texi-vers.am, tags-clean.am:
* subdirs.am,python-clean.am, multilib.am, lisp-clean.am:
* libtool.am, kr-extra.am, depend.am, compile.am, clean.am:
* clean-kr.am, clean-hdr.am: Do it.
Whenever a target is empty, just remove it, it will no longer be
called.
There is still some magic about clean to hard code. But really,
that's the end of &do_one_clean_target.
* automake.in (&do_one_clean_target): Kaboom out.
(&handle_clean): Rewrite the magic code.
(&am_install_var): No longer use &push_phony_cleaners, nor depend
on `clean'.
(&push_phony_cleaners): Kaboom too.
Akim Demaille [Mon, 5 Feb 2001 09:09:16 +0000 (09:09 +0000)]
* Makefile.am (perl4-check): Remove, we now require Perl 5.
(maintainer-check): Don't be silent when you find a problem, and
actually, even specify the locations.
Also check that @_ is assigned to arrays.
Akim Demaille [Sun, 4 Feb 2001 14:43:00 +0000 (14:43 +0000)]
* automake.in (@clean): Remove, replaced by...
($dependencies{'clean'}): this.
Use `&depend' instead of push'ing into @clean.
(handle_factored_dependencies): For the time being, skip 'clean'.
(do_one_clean_target): Don't ask for argument 1 and 4 as they are
always `clean', and `@clean'.
Akim Demaille [Sun, 4 Feb 2001 14:42:36 +0000 (14:42 +0000)]
* automake.in (%dependencies): Don't be initialize globally for
all the files, but in...
(&initialize_per_input): here.
(&depend): New.
(@phony): Replace all occurrences with the corresponding &depend
invocation.
Tom Tromey [Sun, 4 Feb 2001 03:51:18 +0000 (03:51 +0000)]
2001-02-03 Ville Laurikari <vlaurika@hutcs.cs.hut.fi>
* depcomp (aix): New side-effect dependency tracking mode, for
the C for AIX compiler.
* m4/depend.m4 (AM_DEPENDENCIES): Recreate `conftest.c' and
`conftest.h' for each test.
Tom Tromey [Sun, 4 Feb 2001 03:44:00 +0000 (03:44 +0000)]
* automake.texi (Dist): Updated to mention caveat of putting
directory in EXTRA_DIST and also providing a nice example of
removing the CVS dir.
From Ganesan Rajagopal.
Tom Tromey [Sun, 4 Feb 2001 03:27:52 +0000 (03:27 +0000)]
* automake.in (handle_configure): Don't modify variable which
aliases list element. Don't push @inputs onto the dist list.
Fixes colon7.test.
(initialize_per_input) [dist_dirs]: New variable.
(handle_dist_worker): Use global dist_dirs.
(handle_configure): Set dist_dirs entries at toplevel.
Akim Demaille [Wed, 31 Jan 2001 16:50:01 +0000 (16:50 +0000)]
* depend2.am: Instead of replacing @PFX@ in $(@PFX@COMPILE), and
then replacing `$(@PFX@COMPILE)' for the files that need some
special flags, use only @COMPILE@. Similarly for @LTCOMPILE@.
Try to document this file.
* automake.in (add_depend2): Adjust to these changes.
Akim Demaille [Wed, 31 Jan 2001 14:36:21 +0000 (14:36 +0000)]
* automake.in (%factored_dependencies): New.
(file_contents): Use it.
(handle_phony): Rename as...
(handle_factored_dependencies): this.
* subdirs.am: No need for convolved syntax to declare .PHONY.
Akim Demaille [Wed, 31 Jan 2001 14:16:17 +0000 (14:16 +0000)]
* automake.in (file_contents): Rewrite: instead of trying to parse
it line by line, first swallow it completely into $CONTENTS,
*then*, parse it *paragraph* by paragraph.
Akim Demaille [Wed, 31 Jan 2001 13:39:22 +0000 (13:39 +0000)]
* automake.in (file_contents): Remove.
(file_contents_with_transform): Swap the order of the arguments,
and rename as...
(file_contents): this.
Adjust all uses.
Akim Demaille [Mon, 29 Jan 2001 17:37:22 +0000 (17:37 +0000)]
* automake.in (&scan_autoconf_config_files): Extract from
&scan_one_autoconf_file.
(&scan_one_autoconf_file): Use it.
(&scan_autoconf_traces): New.
($scan_autoconf_files): Use it.
Akim Demaille [Mon, 29 Jan 2001 09:41:41 +0000 (09:41 +0000)]
* automake.in (handle_phony): Sort.
(file_contents_with_transform): Catch `.PHONY:'.
(handle_tests): Instead dumping the hard coded target check-TESTS
and registering its .PHONYsm, get them from...
* check.am: here, new file.
Akim Demaille [Mon, 29 Jan 2001 09:27:18 +0000 (09:27 +0000)]
* automake.in (handle_tags): Use &transform.
(am_error, am_line_error, am_conf_error, read_am_file): Use
directly arrays in strings, no need for &join.
Require Perl 5.
* Makefile.am (maintainer-check): Use grep -w when looking for
words.
Akim Demaille [Fri, 26 Jan 2001 15:07:45 +0000 (15:07 +0000)]
* automake.in (handle_texinfo): Don't use $conf_pat, just
$conf_dir to transform MDDIR since now &transform handles the
escaping of RE special characters by itself.
Akim Demaille [Tue, 16 Jan 2001 11:15:20 +0000 (11:15 +0000)]
Let Automake support `configure.ac'.
* automake.in: In the comments, prefer `configure.ac' to
`configure.in'.
When using &am_conf_error, don't repeat `in configure.in', since
the function already reports it.
When referring to `configure.in' use `$configure_ac' instead.
(configure_ac): New global variable.
(scan_configure, scan_one_configure_file): Rename as...
(scan_autoconf_files, scan_one_autoconf_file): this.
(scan_autoconf_files): Compute $configure_ac.
(transform): New function.
(handle_configure): Use it to transform CONFIGURE_AC in
`remake.am' and in `remake-hdr.am'.
(common_files): Also consider `configure.ac'.
Use consistently single quotes.
* aclocal.in (configure_ac): New variable.
Use it.
* texi-vers.am: Depend on CONFIGURE_AC not configure.in.
* remake.am: Likewise.
* remake-hdr.am: Likewise.