+2001-02-06 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.
+
2001-02-06 Akim Demaille <akim@epita.fr>
* automake.in (do_one_clean_target): Don't hard code knowledge
mostlyclean-vti:
-rm -f vti.tmp
-clean-vti:
-
-distclean-vti:
-
maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
tags: TAGS
+
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
&& 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)
mostlyclean-generic:
+
clean-generic:
+
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
@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:
# 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:
+
# 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...
# 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...
$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.
push (@suffixes, '.c', '.o');
push (@suffixes, '.obj') if $seen_objext;
- &depend ('clean', 'compile');
$included_generic_compile = 1;
}
# Output the libtool compilation rules.
$output_rules .= &file_contents ('libtool');
- &push_phony_cleaners ('libtool');
-
push (@suffixes, '.lo');
- &depend ('clean', 'libtool');
$included_libtool_compile = 1;
}
&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
$output_rules .= &file_contents ('clean-kr');
- &depend ('clean', 'kr');
- &push_phony_cleaners ('kr');
-
$included_knr_compile = 1;
}
}
++$done;
&push_dist_common ($vtexi, 'stamp-' . $vti);
- &depend ('clean', $vti);
&require_conf_file_with_line ('info_TEXINFOS', $FOREIGN,
'mdate-sh');
'VTEXI' => $vtexi,
'MDDIR' => $conf_dir,
'CONFIGURE_AC' => $configure_ac));
-
- &push_phony_cleaners ($vti);
}
# If user specified file_TEXINFOS, then use that as explicit
$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";
# get run twice during "make all".
unshift (@all, '$(INFO_DEPS)');
}
- &depend ('clean', 'aminfo');
push (@info, '$(INFO_DEPS)');
push (@dvi, '$(DVIS)');
$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'))
return unless $seen_multilib;
$output_rules .= &file_contents ('multilib');
- &push_phony_cleaners ('multi');
}
# Worker for handle_dist.
}
$output_rules .= &file_contents ('depend');
- &depend ('clean', 'depend');
- &push_phony_cleaners ('depend');
}
}
else
: '')
. '/;');
$output_rules .= &file_contents ('subdirs', $xform);
- &push_phony_cleaners ('recursive');
$recursive_install = 1;
}
$output_rules .=
&file_contents ('clean-hdr',
&transform ('FILES' => $distclean_config));
- &depend ('clean', 'hdr');
- &push_phony_cleaners ('hdr');
}
# Set location of mkinstalldirs.
# 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')
}
$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) = @_;
}
+# &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";
}
}
&define_pretty_variable ('ELCFILES', '', @elfiles);
$output_rules .= &file_contents ('lisp-clean');
- &depend ('clean', 'lisp');
- &push_phony_cleaners ('lisp');
push (@all, '$(ELCFILES)');
&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');
@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 = ();
################################################################
+# $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])
# 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
# 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;
}
}
}
&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')
}
}
-# 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
## 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
## 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:
## 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
## 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
## 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?
@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
## 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
## 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
## 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
## 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
## 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
## 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
## should remove it (and if the maintainer built it, then
## maintainer-clean should remove it).
-rm -f ansi2knr
-
-distclean-krextra:
-
-maintainer-clean-krextra:
## 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
## 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:
## 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?
@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
## 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
## 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
## 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
## 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
## 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
## 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:
$(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:
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
clean-recursive: clean-multi
distclean-recursive: distclean-multi
maintainer-clean-recursive: maintainer-clean-multi
-.PHONY: all-multi install-multi
$(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
## 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
-@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@
## 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) && \
## 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
## 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:
## 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
## 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:
mostlyclean-generic:
+
clean-generic:
+
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
@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:
+
$(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:
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
clean-recursive: clean-multi
distclean-recursive: distclean-multi
maintainer-clean-recursive: maintainer-clean-multi
-.PHONY: all-multi install-multi
## 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
## 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:
$(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
## 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
## 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
## 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
mostlyclean-generic:
+
clean-generic:
+
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
@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:
# 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:
+
## 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
-@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@
## 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) && \