Monstro unsplitable patch.
authorAkim Demaille <akim@epita.fr>
Tue, 6 Feb 2001 09:09:36 +0000 (09:09 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 6 Feb 2001 09:09:36 +0000 (09:09 +0000)
commit8a34b58d76892209b5c19f64ea85a64704dfc036
tree20120c4682ee7d1396827faa0fc53ade38472b5f
parent279adc2a18c4f7a71204524d9fba349a15fb1be2
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.
29 files changed:
ChangeLog
Makefile.in
aclocal.m4
automake.in
clean-hdr.am
clean-kr.am
clean.am
compile.am
depend.am
kr-extra.am
lib/am/clean-hdr.am
lib/am/clean.am
lib/am/compile.am
lib/am/depend.am
lib/am/libtool.am
lib/am/multilib.am
lib/am/subdirs.am
lib/am/texi-vers.am
lib/am/texinfos.am
libtool.am
lisp-clean.am
m4/Makefile.in
multilib.am
python-clean.am
subdirs.am
tags-clean.am
tests/Makefile.in
texi-vers.am
texinfos.am