This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

25-clean-targets.patch


I'm sorry about the size of the patch, I couldn't do any smaller, I
attacked something which was really one big piece.

I have left below the diff of the Makefile.ins, but frankly it's way
too unreadble.  I wrote a helper tool to diff Makefiles, and I will
make a second message to give this tool, it can be useful, and the
result of the diffs, it's much more readble.

The test suite shows one regression: pr87.  I will fix this, but
please, let's check it in first.  I need a step before going too wild.

There is one big new feature brought by this patch: the *.am can have
several

----------
clean-am:
	do this

clean-am:
	do that
----------

which will result in

----------
clean-am:
	do this
	do that
----------

so naturally the question is: do we really want to keep this zillions
of pseudo targets?  The current automake, indeed, does this instead:

----------
clean-am: clean-this-am
clean-this-am:
	do this

clean-am: clean-that-am
clean-that-am:
	do that
----------

which will result in

----------
clean-am: clean-this-am clean-that-am

clean-this-am:
	do this

clean-that-am:
	do that
----------


Finally, given the extent of this patch, I'd really like to have an
rather quick approval, before there are too many differences with CVS
Automake.


I agree there are places where more factorization would be welcome.
It's just that this patch is already monstruous, and more work woudn't
be welcome at this point, IMHO.  I need a checkin before proceeding.
And opinions about the targetism of Automake.


Index: ChangeLog
from  Akim Demaille  <akim@epita.fr>
	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.

Index: automake.in
--- automake.in Sun, 04 Feb 2001 01:14:10 +0100 akim (am/f/39_automake.i 1.31 755)
+++ automake.in Sun, 04 Feb 2001 14:31:14 +0100 akim (am/f/39_automake.i 1.31 755)
@@ -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.
@@ -3040,8 +3021,6 @@ sub handle_dependencies
 	    }

 	    $output_rules .= &file_contents ('depend');
-	    &depend ('clean', 'depend');
-	    &push_phony_cleaners ('depend');
 	}
     }
     else
@@ -3087,7 +3066,6 @@ sub handle_subdirs
 		       : '')
 		      . '/;');
     $output_rules .= &file_contents ('subdirs', $xform);
-    &push_phony_cleaners ('recursive');

     $recursive_install = 1;
 }
@@ -3420,8 +3398,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.
@@ -3884,8 +3860,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')
@@ -3922,68 +3898,33 @@ sub handle_clean
     }

     $output_rules .= &file_contents ('clean', $xform);
-
-    &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");
+    &depend ('clean-am', 'mostlyclean-am');
+    &depend ('distclean-am', 'clean-am');
+    &depend ('maintainer-clean-am', 'distclean-am');
+
+    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) = @_;
@@ -3993,22 +3934,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";
     }
 }
@@ -4136,8 +4086,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)');

@@ -4169,7 +4117,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');
@@ -6848,16 +6795,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 = ();
@@ -6956,6 +6913,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])
@@ -7006,6 +6979,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
@@ -7040,24 +7019,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))
-	    {
-	        if (defined $dependencies{$_})
-		{
-		    &depend ($_, split (/\s/, $dependees));
-		}
-		else
-		{
-		    # Free lance dependency.
-		    $result_rules .= "$comment$separator$1: $2\n"
-		      unless defined $contents{$1};
-		    $comment = $separator = '';
+	  # 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{$_})
+		{
+		  &depend ($_, @deps);
+		  $actions{$_} .= $actions;
+		}
+	      else
+		{
+		  # 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;
 		}
 	    }
  	}
@@ -7391,8 +7393,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')
@@ -7756,16 +7764,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
Index: aclocal.m4
--- aclocal.m4 Wed, 31 Jan 2001 00:08:51 +0100 akim (am/f/40_aclocal.m4 1.2 644)
+++ aclocal.m4 Sun, 04 Feb 2001 13:23:24 +0100 akim (am/f/40_aclocal.m4 1.2 644)
@@ -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 @@ AC_DEFUN([AM_MISSING_HAS_RUN],

 # 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...

Index: texinfos.am
--- texinfos.am Sun, 04 Feb 2001 00:49:46 +0100 akim (am/g/10_texinfos.a 1.3 644)
+++ texinfos.am Sun, 04 Feb 2001 13:29:47 +0100 akim (am/g/10_texinfos.a 1.3 644)
@@ -215,10 +215,12 @@
 ## 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) && \
Index: texi-vers.am
--- texi-vers.am Sun, 14 Jan 2001 23:58:53 +0100 akim (am/g/11_texi-vers. 1.2 644)
+++ texi-vers.am Sun, 04 Feb 2001 01:14:16 +0100 akim (am/g/11_texi-vers. 1.2 644)
@@ -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 @@
 	-@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@
Index: tags-clean.am
--- tags-clean.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/13_tags-clean 1.1 644)
+++ tags-clean.am Sun, 04 Feb 2001 01:14:16 +0100 akim (am/g/13_tags-clean 1.1 644)
@@ -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 @@
 ## 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
Index: subdirs.am
--- subdirs.am Wed, 31 Jan 2001 02:47:38 +0100 akim (am/g/14_subdirs.am 1.3 644)
+++ subdirs.am Sun, 04 Feb 2001 01:14:16 +0100 akim (am/g/14_subdirs.am 1.3 644)
@@ -51,6 +51,15 @@
 	  $(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
Index: python-clean.am
--- python-clean.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/18_python-cle 1.1 644)
+++ python-clean.am Sun, 04 Feb 2001 14:16:28 +0100 akim (am/g/18_python-cle 1.1 644)
@@ -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:
Index: multilib.am
--- multilib.am Sun, 28 Jan 2001 15:51:12 +0100 akim (am/g/23_multilib.a 1.2 644)
+++ multilib.am Sun, 04 Feb 2001 01:14:16 +0100 akim (am/g/23_multilib.a 1.2 644)
@@ -27,6 +27,15 @@
 	$(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 @@
 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 @@
 clean-recursive: clean-multi
 distclean-recursive: distclean-multi
 maintainer-clean-recursive: maintainer-clean-multi
-.PHONY: all-multi install-multi
Index: lisp-clean.am
--- lisp-clean.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/30_lisp-clean 1.1 644)
+++ lisp-clean.am Sun, 04 Feb 2001 01:14:16 +0100 akim (am/g/30_lisp-clean 1.1 644)
@@ -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:
Index: libtool.am
--- libtool.am Sun, 04 Feb 2001 01:14:10 +0100 akim (am/g/31_libtool.am 1.2 644)
+++ libtool.am Sun, 04 Feb 2001 14:17:03 +0100 akim (am/g/31_libtool.am 1.2 644)
@@ -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:
Index: kr-extra.am
--- kr-extra.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/35_kr-extra.a 1.1 644)
+++ kr-extra.am Sun, 04 Feb 2001 01:14:16 +0100 akim (am/g/35_kr-extra.a 1.1 644)
@@ -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 @@
 ## should remove it (and if the maintainer built it, then
 ## maintainer-clean should remove it).
 	-rm -f ansi2knr
-
-distclean-krextra:
-
-maintainer-clean-krextra:
Index: depend.am
--- depend.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/44_depend.am 1.1 644)
+++ depend.am Sun, 04 Feb 2001 02:24:13 +0100 akim (am/g/44_depend.am 1.1 644)
@@ -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
Index: compile.am
--- compile.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/48_compile.am 1.1 644)
+++ compile.am Sun, 04 Feb 2001 01:14:16 +0100 akim (am/g/48_compile.am 1.1 644)
@@ -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
Index: clean.am
--- clean.am Sun, 04 Feb 2001 01:14:10 +0100 akim (am/g/50_clean.am 1.2 644)
+++ clean.am Sun, 04 Feb 2001 01:15:14 +0100 akim (am/g/50_clean.am 1.2 644)
@@ -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 @@
 	@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
Index: clean-kr.am
--- clean-kr.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/51_clean-kr.a 1.1 644)
+++ clean-kr.am Sun, 04 Feb 2001 01:14:22 +0100 akim (am/g/51_clean-kr.a 1.1 644)
@@ -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
Index: clean-hdr.am
--- clean-hdr.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/h/0_clean-hdr. 1.1 644)
+++ clean-hdr.am Sun, 04 Feb 2001 01:14:22 +0100 akim (am/h/0_clean-hdr. 1.1 644)
@@ -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:
Index: tests/Makefile.in
--- tests/Makefile.in Sun, 04 Feb 2001 01:14:10 +0100 akim (am/h/14_Makefile.i 1.6 644)
+++ tests/Makefile.in Sun, 04 Feb 2001 14:31:29 +0100 akim (am/h/14_Makefile.i 1.6 644)
@@ -462,8 +462,10 @@

 mostlyclean-generic:

+
 clean-generic:

+
 distclean-generic:
 	-rm -f Makefile $(CONFIG_CLEAN_FILES)
 	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
@@ -472,28 +474,29 @@
 	@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:
@@ -502,3 +505,4 @@
 # 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:
+
Index: m4/Makefile.in
--- m4/Makefile.in Sun, 04 Feb 2001 01:14:10 +0100 akim (am/h/15_Makefile.i 1.6 644)
+++ m4/Makefile.in Sun, 04 Feb 2001 14:31:29 +0100 akim (am/h/15_Makefile.i 1.6 644)
@@ -167,8 +167,10 @@

 mostlyclean-generic:

+
 clean-generic:

+
 distclean-generic:
 	-rm -f Makefile $(CONFIG_CLEAN_FILES)
 	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
@@ -177,30 +179,32 @@
 	@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:
+
Index: Makefile.in
--- Makefile.in Sun, 04 Feb 2001 01:14:10 +0100 akim (am/h/16_Makefile.i 1.6 644)
+++ Makefile.in Sun, 04 Feb 2001 14:31:28 +0100 akim (am/h/16_Makefile.i 1.6 644)
@@ -192,10 +192,6 @@
 mostlyclean-vti:
 	-rm -f vti.tmp

-clean-vti:
-
-distclean-vti:
-
 maintainer-clean-vti:
 	-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi

@@ -410,6 +406,7 @@

 tags: TAGS

+
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -442,15 +439,9 @@
 	  && 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)

@@ -567,8 +558,10 @@

 mostlyclean-generic:

+
 clean-generic:

+
 distclean-generic:
 	-rm -f Makefile $(CONFIG_CLEAN_FILES)
 	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
@@ -577,47 +570,45 @@
 	@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:
@@ -703,3 +694,4 @@
 # 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:
+


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]