From 8a34b58d76892209b5c19f64ea85a64704dfc036 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 6 Feb 2001 09:09:36 +0000 Subject: [PATCH] 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. --- ChangeLog | 51 ++++++++++++ Makefile.in | 74 ++++++++--------- aclocal.m4 | 6 +- automake.in | 228 ++++++++++++++++++++++++++-------------------------- clean-hdr.am | 9 +-- clean-kr.am | 12 ++- clean.am | 7 ++ compile.am | 9 ++- depend.am | 10 +-- kr-extra.am | 10 +-- lib/am/clean-hdr.am | 9 +-- lib/am/clean.am | 7 ++ lib/am/compile.am | 9 ++- lib/am/depend.am | 10 +-- lib/am/libtool.am | 9 ++- lib/am/multilib.am | 13 ++- lib/am/subdirs.am | 9 +++ lib/am/texi-vers.am | 11 +-- lib/am/texinfos.am | 2 + libtool.am | 9 ++- lisp-clean.am | 9 +-- m4/Makefile.in | 30 ++++--- multilib.am | 13 ++- python-clean.am | 10 +-- subdirs.am | 9 +++ tags-clean.am | 8 +- tests/Makefile.in | 30 ++++--- texi-vers.am | 11 +-- texinfos.am | 2 + 29 files changed, 360 insertions(+), 266 deletions(-) diff --git a/ChangeLog b/ChangeLog index 556f817..1018398 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,56 @@ 2001-02-06 Akim Demaille + 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. + +2001-02-06 Akim Demaille + * automake.in (do_one_clean_target): Don't hard code knowledge about libtool, and maintainer-clean. * clean.am, libtool.am: Handle these. diff --git a/Makefile.in b/Makefile.in index b51eef7..41ae901 100644 --- a/Makefile.in +++ b/Makefile.in @@ -193,10 +193,6 @@ $(srcdir)/stamp-vti: automake.texi $(top_srcdir)/configure.in mostlyclean-vti: -rm -f vti.tmp -clean-vti: - -distclean-vti: - maintainer-clean-vti: -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi @@ -411,6 +407,7 @@ tags-recursive: tags: TAGS + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -443,15 +440,9 @@ GTAGS: && cd $(top_srcdir) \ && gtags -i $$here -mostlyclean-tags: - -clean-tags: - distclean-tags: -rm -f TAGS ID -maintainer-clean-tags: - distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -569,8 +560,10 @@ installdirs-am: mostlyclean-generic: + clean-generic: + distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* @@ -579,47 +572,45 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in -mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-tags \ - mostlyclean-generic - -mostlyclean: mostlyclean-recursive - -clean-am: clean-vti clean-aminfo clean-tags clean-generic \ - mostlyclean-am - clean: clean-recursive -distclean-am: distclean-vti distclean-aminfo distclean-tags \ - distclean-generic clean-am +clean-am: clean-generic clean-recursive mostlyclean-am distclean: distclean-recursive -rm -f config.status -maintainer-clean-am: maintainer-clean-vti maintainer-clean-aminfo \ - maintainer-clean-tags maintainer-clean-generic \ - distclean-am +distclean-am: clean-am distclean-generic distclean-recursive \ + distclean-tags maintainer-clean: maintainer-clean-recursive -rm -f config.status -.PHONY: all all-am all-recursive all-redirect check check-am \ -check-recursive clean clean-aminfo clean-generic clean-recursive \ -clean-tags clean-vti distclean distclean-aminfo distclean-generic \ -distclean-recursive distclean-tags distclean-vti distdir dvi dvi-am \ -dvi-recursive info info-am info-recursive install install-am \ -install-binSCRIPTS install-data install-data-am install-data-recursive \ -install-dist_pkgdataDATA install-dist_scriptDATA install-exec \ -install-exec-am install-exec-recursive install-info-am \ -install-recursive install-strip installcheck installcheck-am \ -installcheck-local installcheck-recursive installdirs installdirs-am \ -installdirs-recursive maintainer-clean maintainer-clean-aminfo \ -maintainer-clean-aminfo maintainer-clean-generic \ -maintainer-clean-recursive maintainer-clean-tags maintainer-clean-vti \ -mostlyclean mostlyclean-aminfo mostlyclean-aminfo mostlyclean-generic \ -mostlyclean-recursive mostlyclean-tags mostlyclean-vti tags \ -tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \ -uninstall-dist_pkgdataDATA uninstall-dist_scriptDATA uninstall-info \ -uninstall-recursive +maintainer-clean-am: distclean-am maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-recursive \ + maintainer-clean-vti + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ + mostlyclean-recursive mostlyclean-vti + +.PHONY: all all-am all-recursive all-redirect check check-am \ + check-recursive clean clean-generic clean-recursive distclean \ + distclean-generic distclean-recursive distclean-tags distdir \ + dvi dvi-am dvi-recursive info info-am info-recursive install \ + install-am install-binSCRIPTS install-data install-data-am \ + install-data-recursive install-dist_pkgdataDATA \ + install-dist_scriptDATA install-exec install-exec-am \ + install-exec-recursive install-info-am install-recursive \ + install-strip installcheck installcheck-am installcheck-local \ + installcheck-recursive installdirs installdirs-am \ + installdirs-recursive maintainer-clean maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-recursive \ + maintainer-clean-vti mostlyclean mostlyclean-aminfo \ + mostlyclean-generic mostlyclean-recursive mostlyclean-vti tags \ + tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \ + uninstall-dist_pkgdataDATA uninstall-dist_scriptDATA \ + uninstall-info uninstall-recursive install-data-hook: @@ -705,3 +696,4 @@ path-check: distdir # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + diff --git a/aclocal.m4 b/aclocal.m4 index ee128ba..94db5bf 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -15,11 +15,11 @@ # some checks are only needed if your package does certain things. # But this isn't really a big deal. -# serial 6 +# serial 5 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, -# will think it see a *use*, and therefore will trigger all it's +# will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... @@ -184,7 +184,7 @@ fi # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, -# will think it see a *use*, and therefore will trigger all it's +# will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... diff --git a/automake.in b/automake.in index 5083ffa..eedfe17 100755 --- a/automake.in +++ b/automake.in @@ -854,8 +854,6 @@ sub get_object_extension $xform = $seen_objext ? 's/^OBJEXT//;' : 's/^OBJEXT.*$//;'; $output_rules .= &file_contents ('compile', $xform); - &push_phony_cleaners ('compile'); - # If using X, include some extra variable definitions. NOTE # we don't want to force these into CFLAGS or anything, # because not all programs will necessarily use X. @@ -870,7 +868,6 @@ sub get_object_extension push (@suffixes, '.c', '.o'); push (@suffixes, '.obj') if $seen_objext; - &depend ('clean', 'compile'); $included_generic_compile = 1; } @@ -880,10 +877,7 @@ sub get_object_extension # Output the libtool compilation rules. $output_rules .= &file_contents ('libtool'); - &push_phony_cleaners ('libtool'); - push (@suffixes, '.lo'); - &depend ('clean', 'libtool'); $included_libtool_compile = 1; } @@ -910,8 +904,6 @@ sub get_object_extension &require_file_with_line ('AUTOMAKE_OPTIONS', $FOREIGN, 'ansi2knr.c', 'ansi2knr.1'); $output_rules .= &file_contents ('kr-extra'); - &depend ('clean', 'krextra'); - &push_phony_cleaners ('krextra'); } # Generate rules to build ansi2knr. If it is in some @@ -957,9 +949,6 @@ sub get_object_extension $output_rules .= &file_contents ('clean-kr'); - &depend ('clean', 'kr'); - &push_phony_cleaners ('kr'); - $included_knr_compile = 1; } } @@ -2273,7 +2262,6 @@ sub handle_texinfo ++$done; &push_dist_common ($vtexi, 'stamp-' . $vti); - &depend ('clean', $vti); &require_conf_file_with_line ('info_TEXINFOS', $FOREIGN, 'mdate-sh'); @@ -2295,8 +2283,6 @@ sub handle_texinfo 'VTEXI' => $vtexi, 'MDDIR' => $conf_dir, 'CONFIGURE_AC' => $configure_ac)); - - &push_phony_cleaners ($vti); } # If user specified file_TEXINFOS, then use that as explicit @@ -2394,7 +2380,6 @@ sub handle_texinfo $output_rules .= &file_contents ('texinfos', $xform); push (@dist_targets, 'dist-info'); - &push_phony_cleaners ('aminfo'); if ($cygnus_mode) { $output_rules .= "clean-info: mostlyclean-aminfo\n"; @@ -2413,7 +2398,6 @@ sub handle_texinfo # get run twice during "make all". unshift (@all, '$(INFO_DEPS)'); } - &depend ('clean', 'aminfo'); push (@info, '$(INFO_DEPS)'); push (@dvi, '$(DVIS)'); @@ -2571,8 +2555,6 @@ sub handle_tags $output_rules .= &file_contents ('tags', $xform); $output_rules .= &file_contents ('tags-clean'); - &depend ('clean', 'tags'); - &push_phony_cleaners ('tags'); &examine_variable ('TAGS_DEPENDENCIES'); } elsif (&variable_defined ('TAGS_DEPENDENCIES')) @@ -2595,7 +2577,6 @@ sub handle_multilib return unless $seen_multilib; $output_rules .= &file_contents ('multilib'); - &push_phony_cleaners ('multi'); } # Worker for handle_dist. @@ -3041,8 +3022,6 @@ sub handle_dependencies } $output_rules .= &file_contents ('depend'); - &depend ('clean', 'depend'); - &push_phony_cleaners ('depend'); } } else @@ -3088,7 +3067,6 @@ sub handle_subdirs : '') . '/;'); $output_rules .= &file_contents ('subdirs', $xform); - &push_phony_cleaners ('recursive'); $recursive_install = 1; } @@ -3421,8 +3399,6 @@ sub handle_configure $output_rules .= &file_contents ('clean-hdr', &transform ('FILES' => $distclean_config)); - &depend ('clean', 'hdr'); - &push_phony_cleaners ('hdr'); } # Set location of mkinstalldirs. @@ -3898,8 +3874,8 @@ sub do_check_merge_target # Handle all 'clean' targets. sub handle_clean { - local ($xform) = ''; - local ($name); + my ($xform) = ''; + my ($name); # Don't include `MAINTAINER'; it is handled specially below. foreach $name ('MOSTLY', '', 'DIST') @@ -3936,68 +3912,33 @@ sub handle_clean } $output_rules .= &file_contents ('clean', $xform); + &depend ('clean-am', 'mostlyclean-am'); + &depend ('distclean-am', 'clean-am'); + &depend ('maintainer-clean-am', 'distclean-am'); - &depend ('clean', 'generic'); - &push_phony_cleaners ('generic'); - - &do_one_clean_target ('mostly', ''); - &do_one_clean_target ('', 'mostly'); - &do_one_clean_target ('dist', ''); - &do_one_clean_target ('maintainer-', 'dist'); - - &depend ('.PHONY', - 'clean', 'mostlyclean', 'distclean', 'maintainer-clean'); -} - - -# &do_one_clean_target ($NAME, $LAST_NAME) -# ---------------------------------------- -# Helper for handle_clean. -sub do_one_clean_target -{ - my ($name, $last_name) = @_; - my (@deps) = @{$dependencies{'clean'}}; - - # Change each dependency `BLARG' into `clean-BLARG'. - grep (($_ = $name . 'clean-' . $_) && 0, @deps); - - # Push the previous clean target. There is no previous clean - # target if we're doing mostlyclean. - push (@deps, $last_name . 'clean-am') - unless $name eq 'mostly'; - - # If a -local version of the rule is given, add it to the list. - if (&target_defined ($name . 'clean-local')) - { - push (@deps, $name . 'clean-local'); - } - - # Print the target and the dependencies. - &pretty_print_rule ($name . 'clean-am: ', "\t\t", @deps); - - $output_rules .= "\n"; - - # Now generate the actual clean target. - $output_rules .= ($name . 'clean' . ": " . $name . 'clean' - . ($recursive_install ? '-recursive' : '-am') - . "\n"); + foreach ('clean', 'distclean', 'mostlyclean', 'maintainer-clean') + { + &depend ($_, $_ . '-local') + if &target_defined ($_ . '-local'); + &depend ($_, + $_ . ($recursive_install ? '-recursive' : '-am')); + } # We special-case config.status here. If we do it as part of the # normal clean processing for this directory, then it might be # removed before some subdir is cleaned. However, that subdir's # Makefile depends on config.status. - if (($name eq 'maintainer-' - || $name eq 'dist') - && $relative_dir eq '.') + if ($relative_dir eq '.') { - $output_rules .= "\t-rm -f config.status\n"; + $actions{'distclean'} .= "\t-rm -f config.status\n"; + $actions{'maintainer-clean'} .= "\t-rm -f config.status\n"; } - $output_rules .= "\n"; } # &depend ($CATEGORY, @DEPENDENDEES) # ---------------------------------- +# The target $CATEGORY depends on @DEPENDENDEES. sub depend { my ($category, @dependendees) = @_; @@ -4007,22 +3948,31 @@ sub depend } +# &target_cmp ($A, $B) +# -------------------- +# Subroutine for &handle_factored_dependencies to let `.PHONY' be last. +sub target_cmp +{ + return + if $a eq $b; + return -1 + if $b eq '.PHONY'; + return 1 + if $a eq '.PHONY'; + return $a cmp $b; +} + # &handle_factored_dependencies () # -------------------------------- # Handle .PHONY target. sub handle_factored_dependencies { - my $category; - foreach $category (sort keys %dependencies) + foreach (sort target_cmp keys %dependencies) { - # FIXME: For the time being, there are targets which we - # handle specifically. When all the clean targets stick to - # this scheme, it should be possible to avoid these special cases. - next - if $category =~ /^(clean)$/; - &pretty_print_rule ("$category:", "", - sort @{$dependencies{$category}}); + &pretty_print_rule ("$_:", "\t", + sort @{$dependencies{$_}}); + $output_rules .= $actions{$_}; $output_rules .= "\n"; } } @@ -4150,8 +4100,6 @@ sub handle_emacs_lisp &define_pretty_variable ('ELCFILES', '', @elfiles); $output_rules .= &file_contents ('lisp-clean'); - &depend ('clean', 'lisp'); - &push_phony_cleaners ('lisp'); push (@all, '$(ELCFILES)'); @@ -4183,7 +4131,6 @@ sub handle_python &define_configure_variable ('PYTHON'); $output_rules .= &file_contents ('python-clean'); - &depend ('clean', 'python'); &am_error ("\`python_PYTHON' defined but \`AM_CHECK_PYTHON' not in \`$configure_ac'") if ! $seen_pythondir && &variable_defined ('python_PYTHON'); @@ -6873,16 +6820,26 @@ sub initialize_per_input @check_tests = (); @installcheck = (); - # Holds the dependencies of target which dependencies are factored. + # Holds the dependencies of targets which dependencies are factored. # Typically, `.PHONY' will appear in plenty of *.am files, but must # be output once. Arguably all pure dependencies could be subject # to this factorization, but it is not unpleasant to have paragraphs # in Makefile: keeping related stuff altogether. %dependencies = ( - 'clean' => [], - '.PHONY' => [] + 'clean-am' => [], + 'mostlyclean-am' => [], + 'maintainer-clean-am' => [], + 'distclean-am' => [], + 'clean' => [], + 'mostlyclean' => [], + 'maintainer-clean' => [], + 'distclean' => [], + '.PHONY' => [] ); + # Holds the factored actions. Tied to %DEPENDENCIES, i.e., filled + # only when keys exists in %DEPENDENCIES. + %actions = (); # A list of files deleted by `maintainer-clean'. @maintainer_clean_files = (); @@ -6981,6 +6938,22 @@ sub initialize_per_input ################################################################ +# $FLATTENED +# &flatten ($STRING) +# ------------------ +# Flatten the $STRING and return the result. +sub flatten +{ + $_ = shift; + + s/\\\n//somg; + s/\s+/ /g; + s/^ //; + s/ $//; + + return $_; +} + # $CONTENTS # &file_contents ($BASENAME, [$COMMAND]) @@ -7031,6 +7004,12 @@ sub file_contents # We don't need more than two consecutive new-lines. $contents =~ s/\n{3,}/\n\n/g; + # A rule has three parts: a list of targets, a list of dependencies, + # and optionally actions. + my $RULE_PATTERN = + "^($TARGET_PATTERN(?:(?:\\\\\n|\\s)+$TARGET_PATTERN)*) *:([^=].*|)\$"; + + # Process each Make `paragraph'. # # A Make `paragraph' is delimited by a new line which is not @@ -7065,24 +7044,47 @@ sub file_contents # Stick comments before the incoming macro or rule. $comment = $_; } - elsif (/$RULE_PATTERN/mso && !/\t/ && /^([^:]+): ([^:]+)$/som) + elsif (/$RULE_PATTERN/mso) { - # Pure dependencies: take some Dude, it's good stuff! - my ($dependers, $dependees) = ($1, $2); - $dependers =~ s/\\\n//somg; - $dependees =~ s/\\\n//somg; - foreach (split (/\s/ , $dependers)) + # Separate relationship from optional actions: the first + # `new-line tab" not preceded by backslash (continuation + # line). + # I'm quite shoked! It seems that (\\\n|[^\n]) is not the + # same as `([^\n]|\\\n)!!! Don't swap it, it breaks. + my ($relationship, $actions) = + /^((?:\\\n|[^\n])*)(?:\n(\t.*))?$/som; + + # Separate targets from dependencies: the first colon. + $relationship =~ /^([^:]+\S+) *: *(.*)$/som; + my ($targets, $dependencies) = ($1, $2); + # Remove the escaped new lines. + # I don't know why, but I have to use a tmp $flat_deps. + my $flat_deps = &flatten ($dependencies); + my @deps = split (' ', $flat_deps); + + foreach (split (' ' , $targets)) { - if (defined $dependencies{$_}) + if (defined $dependencies{$_}) { - &depend ($_, split (/\s/, $dependees)); + &depend ($_, @deps); + $actions{$_} .= $actions; } - else + else { - # Free lance dependency. - $result_rules .= "$comment$separator$1: $2\n" - unless defined $contents{$1}; - $comment = $separator = ''; + # Free lance dependency. Output the rule for all the + # targets instead of one by one. + unless (defined $contents{$targets}) + { + # Some hair to avoid spurious trailing blank + # when there are no dependencies. + $result_rules .= "$comment$separator"; + $result_rules .= "$targets:"; + $result_rules .= " $dependencies" + if $dependencies; + $result_rules .= "\n$actions\n"; + } + $comment = $separator = ''; + last; } } } @@ -7414,8 +7416,14 @@ sub am_install_var &transform ('DIR' => $X) . $cygxform); - &depend ('clean', $X . $primary); - &push_phony_cleaners ($X . $primary); + &depend ('mostlyclean-am', 'mostlyclean-' . $X . $primary); + &depend ('.PHONY', 'mostlyclean-' . $X . $primary); + &depend ('clean-am', 'clean-' . $X . $primary); + &depend ('.PHONY', 'clean-' . $X . $primary); + &depend ('distclean-am', 'distclean-' . $X . $primary); + &depend ('.PHONY', 'distclean-' . $X . $primary); + &depend ('maintainer-clean-am', 'maintainer-clean-' . $X . $primary); + &depend ('.PHONY', 'maintainer-clean-' . $X . $primary); } if ($X eq 'check') @@ -7779,16 +7787,6 @@ sub push_dist_common } } -# Push a list of clean targets onto phony. -sub push_phony_cleaners -{ - local ($base) = @_; - local ($target); - foreach $target ('mostly', 'dist', '', 'maintainer-') - { - &depend ('.PHONY', $target . 'clean-' . $base); - } -} # Set strictness. sub set_strictness diff --git a/clean-hdr.am b/clean-hdr.am index 722305c..973ff86 100644 --- a/clean-hdr.am +++ b/clean-hdr.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 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 @@ -15,11 +15,8 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -mostlyclean-hdr: - -clean-hdr: +.PHONY: distclean-hdr +distclean-am: distclean-hdr distclean-hdr: -rm -f @FILES@ - -maintainer-clean-hdr: diff --git a/clean-kr.am b/clean-kr.am index 57b4992..50c04ae 100644 --- a/clean-kr.am +++ b/clean-kr.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 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 @@ -15,11 +15,9 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -mostlyclean-kr: - -rm -f *_.c - -clean-kr: -distclean-kr: +.PHONY: mostlyclean-kr -maintainer-clean-kr: +mostlyclean-am: mostlyclean-kr +mostlyclean-kr: + -rm -f *_.c diff --git a/clean.am b/clean.am index cfaa1d2..fcdd10c 100644 --- a/clean.am +++ b/clean.am @@ -19,17 +19,21 @@ ## We must test each macro because it might be empty, and an empty "rm ## -rf" command looks disturbing. Also, the Solaris 2.4 "rm" will ## return an error if there are no arguments other than "-f". +mostlyclean-am: mostlyclean-generic mostlyclean-generic: MOSTLYCLEAN -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) +clean-am: clean-generic clean-generic: CLEAN -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) +distclean-am: distclean-generic distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* DISTCLEAN -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) +maintainer-clean-am: maintainer-clean-generic maintainer-clean-generic: ## FIXME: shouldn't we really print these messages before running ## the dependencies? @@ -37,3 +41,6 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in MAINTAINERCLEAN -test -z "@MCFILES@" || rm -f @MFILES@ + +.PHONY: clean mostlyclean distclean maintainer-clean \ +clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic diff --git a/compile.am b/compile.am index 1e32f2d..e00f7f2 100644 --- a/compile.am +++ b/compile.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 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 @@ -15,15 +16,15 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +mostlyclean-am: mostlyclean-compile mostlyclean-compile: ## Don't remove 'core.*' because some distributions have eg "core.c". ## 4.4BSD systems use `PROG.core'. -rm -f *.o core *.core OBJEXT -rm -f *.$(OBJEXT) -clean-compile: - +distclean-am: distclean-compile distclean-compile: -rm -f *.tab.c -maintainer-clean-compile: +.PHONY: mostlyclean-compile distclean-compile diff --git a/depend.am b/depend.am index 018e0f4..d2c1186 100644 --- a/depend.am +++ b/depend.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 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 @@ -16,11 +17,8 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -mostlyclean-depend: - -clean-depend: - +distclean-am: distclean-depend distclean-depend: -rm -rf $(DEPDIR) -maintainer-clean-depend: +.PHONY: distclean-depend diff --git a/kr-extra.am b/kr-extra.am index e16b413..40db02e 100644 --- a/kr-extra.am +++ b/kr-extra.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 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 @@ -15,8 +15,10 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -mostlyclean-krextra: +.PHONY: clean-krextra + +clean-am: clean-krextra clean-krextra: ## Why `clean' and not somewhere else? Not `mostlyclean' because ## people usually don't want to recompile this file. And not @@ -25,7 +27,3 @@ clean-krextra: ## should remove it (and if the maintainer built it, then ## maintainer-clean should remove it). -rm -f ansi2knr - -distclean-krextra: - -maintainer-clean-krextra: diff --git a/lib/am/clean-hdr.am b/lib/am/clean-hdr.am index 722305c..973ff86 100644 --- a/lib/am/clean-hdr.am +++ b/lib/am/clean-hdr.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 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 @@ -15,11 +15,8 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -mostlyclean-hdr: - -clean-hdr: +.PHONY: distclean-hdr +distclean-am: distclean-hdr distclean-hdr: -rm -f @FILES@ - -maintainer-clean-hdr: diff --git a/lib/am/clean.am b/lib/am/clean.am index cfaa1d2..fcdd10c 100644 --- a/lib/am/clean.am +++ b/lib/am/clean.am @@ -19,17 +19,21 @@ ## We must test each macro because it might be empty, and an empty "rm ## -rf" command looks disturbing. Also, the Solaris 2.4 "rm" will ## return an error if there are no arguments other than "-f". +mostlyclean-am: mostlyclean-generic mostlyclean-generic: MOSTLYCLEAN -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) +clean-am: clean-generic clean-generic: CLEAN -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) +distclean-am: distclean-generic distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* DISTCLEAN -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) +maintainer-clean-am: maintainer-clean-generic maintainer-clean-generic: ## FIXME: shouldn't we really print these messages before running ## the dependencies? @@ -37,3 +41,6 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in MAINTAINERCLEAN -test -z "@MCFILES@" || rm -f @MFILES@ + +.PHONY: clean mostlyclean distclean maintainer-clean \ +clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic diff --git a/lib/am/compile.am b/lib/am/compile.am index 1e32f2d..e00f7f2 100644 --- a/lib/am/compile.am +++ b/lib/am/compile.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 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 @@ -15,15 +16,15 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +mostlyclean-am: mostlyclean-compile mostlyclean-compile: ## Don't remove 'core.*' because some distributions have eg "core.c". ## 4.4BSD systems use `PROG.core'. -rm -f *.o core *.core OBJEXT -rm -f *.$(OBJEXT) -clean-compile: - +distclean-am: distclean-compile distclean-compile: -rm -f *.tab.c -maintainer-clean-compile: +.PHONY: mostlyclean-compile distclean-compile diff --git a/lib/am/depend.am b/lib/am/depend.am index 018e0f4..d2c1186 100644 --- a/lib/am/depend.am +++ b/lib/am/depend.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 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 @@ -16,11 +17,8 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -mostlyclean-depend: - -clean-depend: - +distclean-am: distclean-depend distclean-depend: -rm -rf $(DEPDIR) -maintainer-clean-depend: +.PHONY: distclean-depend diff --git a/lib/am/libtool.am b/lib/am/libtool.am index 1a2f834..e65e644 100644 --- a/lib/am/libtool.am +++ b/lib/am/libtool.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 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 @@ -15,14 +16,16 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +.PHONY: mostlyclean-libtool clean-libtool distclean-libtool +mostlyclean-am: mostlyclean-libtool mostlyclean-libtool: -rm -f *.lo +clean-am: clean-libtool clean-libtool: ## .libs is for Unix, _libs for DOS. -rm -rf .libs _libs +distclean-am: distclean-libtool distclean-libtool: -rm -f libtool - -maintainer-clean-libtool: diff --git a/lib/am/multilib.am b/lib/am/multilib.am index f89fbc5..9ff16eb 100644 --- a/lib/am/multilib.am +++ b/lib/am/multilib.am @@ -27,6 +27,15 @@ all-multi: $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do install-multi: $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do + +.PHONY: all-multi install-multi + + +mostlyclean-am: mostlyclean-multi +clean-am: clean-multi +distclean-am: distclean-multi +maintainer-clean-am: maintainer-clean-multi + mostlyclean-multi: $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean clean-multi: @@ -36,6 +45,9 @@ distclean-multi: maintainer-clean-multi: $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean +.PHONY: mostlyclean-multi clean-multi distclean-multi maintainer-clean-multi + + ## FIXME: this is probably broken. all-recursive: all-multi install-recursive: install-multi @@ -43,4 +55,3 @@ mostlyclean-recursive: mostlyclean-multi clean-recursive: clean-multi distclean-recursive: distclean-multi maintainer-clean-recursive: maintainer-clean-multi -.PHONY: all-multi install-multi diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am index 1204146..da1dcba 100644 --- a/lib/am/subdirs.am +++ b/lib/am/subdirs.am @@ -51,6 +51,15 @@ check-recursive installcheck-recursive info-recursive dvi-recursive: $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" + +mostlyclean-am: mostlyclean-recursive +clean-am: clean-recursive +distclean-am: distclean-recursive +maintainer-clean-am: maintainer-clean-recursive + +.PHONY: mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive + ## We run all `clean' targets in reverse order. Why? It's an attempt ## to alleviate a problem that can happen when dependencies are ## enabled. In this case, the .P file in one directory can depend on diff --git a/lib/am/texi-vers.am b/lib/am/texi-vers.am index 5956ecd..0d6f966 100644 --- a/lib/am/texi-vers.am +++ b/lib/am/texi-vers.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. +## 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 @@ -35,12 +36,12 @@ $(srcdir)/stamp-@VTI@: @TEXI@ $(top_srcdir)/@CONFIGURE_AC@ -@rm -f @VTI@.tmp @cp $(srcdir)/@VTEXI@ $@ +mostlyclean-am: mostlyclean-@VTI@ mostlyclean-@VTI@: -rm -f @VTI@.tmp -clean-@VTI@: - -distclean-@VTI@: - +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@ diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 583b3b5..013fb30 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -215,10 +215,12 @@ CYGNUS if test -f $$base; then d=.; else d=$(srcdir); fi; \ ## Cygnus mode, `clean-info' is a target that users can use. .PHONY: mostlyclean-aminfo +mostlyclean-am: mostlyclean-aminfo mostlyclean-aminfo: @TEXICLEAN@ .PHONY: maintainer-clean-aminfo +maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-aminfo: ## Eww. But how else can we find all the output files from makeinfo? NOTCYGNUS cd $(srcdir) && \ diff --git a/libtool.am b/libtool.am index 1a2f834..e65e644 100644 --- a/libtool.am +++ b/libtool.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 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 @@ -15,14 +16,16 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +.PHONY: mostlyclean-libtool clean-libtool distclean-libtool +mostlyclean-am: mostlyclean-libtool mostlyclean-libtool: -rm -f *.lo +clean-am: clean-libtool clean-libtool: ## .libs is for Unix, _libs for DOS. -rm -rf .libs _libs +distclean-am: distclean-libtool distclean-libtool: -rm -f libtool - -maintainer-clean-libtool: diff --git a/lisp-clean.am b/lisp-clean.am index 70ccfeb..3ac28e3 100644 --- a/lisp-clean.am +++ b/lisp-clean.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1996 Free Software Foundation, Inc. +## Copyright 1996, 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 @@ -15,11 +15,8 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -mostlyclean-lisp: +.PHONY: clean-lisp +clean-am: clean-lisp clean-lisp: -test -z "$(ELCFILES)" || rm -f $(ELCFILES) - -distclean-lisp: - -maintainer-clean-lisp: diff --git a/m4/Makefile.in b/m4/Makefile.in index 4be2fdc..55d1c31 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -168,8 +168,10 @@ installdirs: mostlyclean-generic: + clean-generic: + distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* @@ -178,30 +180,32 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in -mostlyclean-am: mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-generic mostlyclean-am - clean: clean-am -distclean-am: distclean-generic clean-am +clean-am: clean-generic mostlyclean-am distclean: distclean-am -maintainer-clean-am: maintainer-clean-generic distclean-am +distclean-am: clean-am distclean-generic maintainer-clean: maintainer-clean-am +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + .PHONY: all all-am all-redirect check check-am clean clean-generic \ -distclean distclean-generic distdir dvi dvi-am info info-am install \ -install-am install-data install-data-am install-exec install-exec-am \ -install-m4dataDATA install-strip installcheck installcheck-am \ -installdirs maintainer-clean maintainer-clean-generic mostlyclean \ -mostlyclean-generic uninstall uninstall-am uninstall-m4dataDATA + distclean distclean-generic distdir dvi dvi-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-m4dataDATA install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + uninstall uninstall-am uninstall-m4dataDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + diff --git a/multilib.am b/multilib.am index f89fbc5..9ff16eb 100644 --- a/multilib.am +++ b/multilib.am @@ -27,6 +27,15 @@ all-multi: $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do install-multi: $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do + +.PHONY: all-multi install-multi + + +mostlyclean-am: mostlyclean-multi +clean-am: clean-multi +distclean-am: distclean-multi +maintainer-clean-am: maintainer-clean-multi + mostlyclean-multi: $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean clean-multi: @@ -36,6 +45,9 @@ distclean-multi: maintainer-clean-multi: $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean +.PHONY: mostlyclean-multi clean-multi distclean-multi maintainer-clean-multi + + ## FIXME: this is probably broken. all-recursive: all-multi install-recursive: install-multi @@ -43,4 +55,3 @@ mostlyclean-recursive: mostlyclean-multi clean-recursive: clean-multi distclean-recursive: distclean-multi maintainer-clean-recursive: maintainer-clean-multi -.PHONY: all-multi install-multi diff --git a/python-clean.am b/python-clean.am index e023aa5..cc37b0d 100644 --- a/python-clean.am +++ b/python-clean.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1999 Free Software Foundation, Inc. +## Copyright 1999, 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 @@ -15,12 +15,8 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -mostlyclean-python: - +.PHONY: clean-python +clean-am: clean-python clean-python: -test -z "$(PYCFILES)" || rm -f $(PYCFILES) -test -z "$(PYOFILES)" || rm -f $(PYOFILES) - -distclean-python: - -maintainer-clean-python: diff --git a/subdirs.am b/subdirs.am index 1204146..da1dcba 100644 --- a/subdirs.am +++ b/subdirs.am @@ -51,6 +51,15 @@ check-recursive installcheck-recursive info-recursive dvi-recursive: $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" + +mostlyclean-am: mostlyclean-recursive +clean-am: clean-recursive +distclean-am: distclean-recursive +maintainer-clean-am: maintainer-clean-recursive + +.PHONY: mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive + ## We run all `clean' targets in reverse order. Why? It's an attempt ## to alleviate a problem that can happen when dependencies are ## enabled. In this case, the .P file in one directory can depend on diff --git a/tags-clean.am b/tags-clean.am index f907419..cdac6a6 100644 --- a/tags-clean.am +++ b/tags-clean.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996 Free Software Foundation, Inc. +## Copyright 1994, 1995, 1996, 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 @@ -15,9 +15,6 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -mostlyclean-tags: - -clean-tags: ## The GNU Standards mandates that tags files be removed by ## maintainer-clean. But I'm told (by François Pinard) that this is @@ -25,7 +22,8 @@ clean-tags: ## distributions. Since we do not, we instead have "distclean" remove ## them. The rule is: if the user built it, "distclean" removes it. ## If it is shipped, "maintainer-clean" removes it. +distclean-am: distclean-tags distclean-tags: -rm -f TAGS ID -maintainer-clean-tags: +.PHONY: distclean-tags diff --git a/tests/Makefile.in b/tests/Makefile.in index 0e8d3bb..91ea1e4 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -463,8 +463,10 @@ installdirs: mostlyclean-generic: + clean-generic: + distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* @@ -473,28 +475,29 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in -mostlyclean-am: mostlyclean-generic +clean: clean-am -mostlyclean: mostlyclean-am +clean-am: clean-generic mostlyclean-am -clean-am: clean-generic mostlyclean-am +distclean: distclean-am distclean-local -clean: clean-am +distclean-am: clean-am distclean-generic -distclean-am: distclean-generic clean-am distclean-local +maintainer-clean: maintainer-clean-am -distclean: distclean-am +maintainer-clean-am: distclean-am maintainer-clean-generic -maintainer-clean-am: maintainer-clean-generic distclean-am +mostlyclean: mostlyclean-am -maintainer-clean: maintainer-clean-am +mostlyclean-am: mostlyclean-generic .PHONY: all all-am all-redirect check check-TESTS check-am clean \ -clean-generic distclean distclean-generic distdir dvi dvi-am info \ -info-am install install-am install-data install-data-am install-exec \ -install-exec-am install-strip installcheck installcheck-am installdirs \ -maintainer-clean maintainer-clean-generic mostlyclean \ -mostlyclean-generic uninstall uninstall-am + clean-generic distclean distclean-generic distdir dvi dvi-am \ + info info-am install install-am install-data install-data-am \ + install-exec install-exec-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + uninstall uninstall-am distclean-local: @@ -503,3 +506,4 @@ distclean-local: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + diff --git a/texi-vers.am b/texi-vers.am index 5956ecd..0d6f966 100644 --- a/texi-vers.am +++ b/texi-vers.am @@ -1,5 +1,6 @@ ## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. +## 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 @@ -35,12 +36,12 @@ $(srcdir)/stamp-@VTI@: @TEXI@ $(top_srcdir)/@CONFIGURE_AC@ -@rm -f @VTI@.tmp @cp $(srcdir)/@VTEXI@ $@ +mostlyclean-am: mostlyclean-@VTI@ mostlyclean-@VTI@: -rm -f @VTI@.tmp -clean-@VTI@: - -distclean-@VTI@: - +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@ diff --git a/texinfos.am b/texinfos.am index 583b3b5..013fb30 100644 --- a/texinfos.am +++ b/texinfos.am @@ -215,10 +215,12 @@ CYGNUS if test -f $$base; then d=.; else d=$(srcdir); fi; \ ## Cygnus mode, `clean-info' is a target that users can use. .PHONY: mostlyclean-aminfo +mostlyclean-am: mostlyclean-aminfo mostlyclean-aminfo: @TEXICLEAN@ .PHONY: maintainer-clean-aminfo +maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-aminfo: ## Eww. But how else can we find all the output files from makeinfo? NOTCYGNUS cd $(srcdir) && \ -- 2.7.4