Tag
Hash :
8a34b58d
Author :
Date :
2001-02-06T09:09:36
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
## automake - create Makefile.in from Makefile.am
## Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
$(srcdir)/@VTEXI@: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-@VTI@
@:
## Depend on @CONFIGURE_AC@ so that version number updates cause a
## rebuild.
$(srcdir)/stamp-@VTI@: @TEXI@ $(top_srcdir)/@CONFIGURE_AC@
@(set `$(SHELL) @MDDIR@mdate-sh $(srcdir)/@TEXI@`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
echo "@set VERSION $(VERSION)") > @VTI@.tmp
## Use cp and rm here because some older "mv"s can't move across
## filesystems. Furthermore, GNU "mv" in the AmigaDOS environment
## can't handle this.
@cmp -s @VTI@.tmp $(srcdir)/@VTEXI@ \
|| (echo "Updating $(srcdir)/@VTEXI@"; \
cp @VTI@.tmp $(srcdir)/@VTEXI@)
-@rm -f @VTI@.tmp
@cp $(srcdir)/@VTEXI@ $@
mostlyclean-am: mostlyclean-@VTI@
mostlyclean-@VTI@:
-rm -f @VTI@.tmp
maintainer-clean-am: maintainer-clean-@VTI@
maintainer-clean-@VTI@:
-@MAINTAINER_MODE_TRUE@rm -f $(srcdir)/stamp-@VTI@ $(srcdir)/@VTEXI@
.PHONY: mostlyclean-@VTI@ maintainer-clean-@VTI@