that `make -n install' works with BSD Make too.
+2004-12-27 Alexandre Duret-Lutz <adl@gnu.org>
+
+ Declare recursive install targets as dependencies of `.MAKE', so
+ that `make -n install' works with BSD Make too.
+
+ * lib/Automake/Rule.pm (reset) <%dependencies>: Add `.MAKE'.
+ * automake.in (target_cmp): Move all `.XYZ' target last, not
+ only `.PHONY'.
+ (handle_factored_dependencies): Add target with hooks to `.MAKE'.
+ Do not let a user definition of .MAKE override ours.
+ * lib/am/install.am (install-am, install-strip): Mark as `.MAKE'.
+ * lib/am/multilib.am (all-multi, install-multi, mostlyclean-multi,
+ clean-multi, distclean-multi, maintainer-clean-multi): Likewise.
+ * lib/am/subdirs.am (mostlyclean-recursive, clean-recursive,
+ distclean-recursive, maintainer-clean-recursive): Likewise.
+
2004-12-18 Alexandre Duret-Lutz <adl@gnu.org>
* lib/config-ml.in, lib/config.guess, lib/config.sub,
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-recursive ctags \
- ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
- dist-tarZ dist-zip distcheck distclean distclean-generic \
- distclean-recursive distclean-tags distcleancheck distdir \
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-exec-am install-strip uninstall-am
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+ dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-binSCRIPTS install-data \
install-data-am install-exec install-exec-am install-exec-hook \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-binSCRIPTS uninstall-hook \
uninstall-info-am
# &target_cmp ($A, $B)
# --------------------
-# Subroutine for &handle_factored_dependencies to let `.PHONY' be last.
+# Subroutine for &handle_factored_dependencies to let `.PHONY' and
+# other `.TARGETS' be last.
sub target_cmp
{
- return 0
- if $a eq $b;
- return -1
- if $b eq '.PHONY';
- return 1
- if $a eq '.PHONY';
- return $a cmp $b;
+ return 0 if $a eq $b;
+
+ my $a1 = substr ($a, 0, 1);
+ my $b1 = substr ($b, 0, 1);
+ if ($a1 ne $b1)
+ {
+ return -1 if $b1 eq '.';
+ return 1 if $a1 eq '.';
+ }
+ return $a cmp $b;
}
$actions{"$_-am"} .=
("\t\@\$(NORMAL_INSTALL)\n"
. "\t" . '$(MAKE) $(AM_MAKEFLAGS) ' . "$_-hook\n");
+ depend ('.MAKE', "$_-am");
}
}
# to append dependencies. This would not work if Automake
# refrained from defining its own .PHONY target as it does
# with other overridden targets.
+ # Likewise for `.MAKE'.
my @undefined_conds = (TRUE,);
- if ($_ ne '.PHONY')
+ if ($_ ne '.PHONY' && $_ ne '.MAKE')
{
@undefined_conds =
Automake::Rule::define ($_, 'internal',
done
mostlyclean-aminfo:
- -rm -rf automake.aux automake.cm automake.cp automake.cps automake.cv \
- automake.fn automake.ky automake.kys automake.log \
- automake.op automake.ov automake.pg automake.pgs \
+ -rm -rf automake.ac automake.aux automake.cm automake.cp automake.cps \
+ automake.fn automake.fns automake.ky automake.kys \
+ automake.log automake.op automake.pg automake.pgs \
automake.tmp automake.toc automake.tp automake.tps \
automake.tr automake.vr automake.vrs automake.dvi \
automake.pdf automake.ps automake.html
uninstall-am: uninstall-info-am
+.MAKE: install-am install-strip
+
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
ctags dist-info distclean distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
dist_perllibDATA_INSTALL = $(INSTALL_DATA)
nodist_perllibDATA_INSTALL = $(INSTALL_DATA)
DATA = $(dist_perllib_DATA) $(nodist_perllib_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-recursive ctags ctags-recursive \
- distclean distclean-generic distclean-recursive distclean-tags \
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic ctags \
+ ctags-recursive distclean distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am \
install-dist_perllibDATA install-exec install-exec-am \
install-info install-info-am install-man \
install-nodist_perllibDATA install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-dist_perllibDATA uninstall-info-am \
uninstall-nodist_perllibDATA
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004 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
# Phoning.
'.PHONY' => [],
+ # Recursive install targets (so `make -n install' works for BSD Make).
+ '.MAKE' => [],
);
%actions = ();
}
uninstall-am: uninstall-info-am
+.MAKE: install-am install-strip
+
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distdir dvi dvi-am html html-am \
info info-am install install-am install-data install-data-am \
dist_pkgvdataDATA_INSTALL = $(INSTALL_DATA)
dist_scriptDATA_INSTALL = $(INSTALL_DATA)
DATA = $(dist_pkgvdata_DATA) $(dist_script_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
uninstall-info: uninstall-info-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-recursive ctags ctags-recursive \
- distclean distclean-generic distclean-recursive distclean-tags \
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-data-am install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic ctags \
+ ctags-recursive distclean distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-data-hook \
install-dist_pkgvdataDATA install-dist_scriptDATA install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installcheck-local \
installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA \
uninstall-info-am
uninstall-am: uninstall-dist_amDATA uninstall-info-am
+.MAKE: install-am install-strip
+
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
uninstall: uninstall-am
endif !%?SUBDIRS%
-.PHONY: install-am
+.MAKE .PHONY: install-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
## If you ever modify this, keep in mind that INSTALL_PROGRAM is used
## in subdirectories, so never set it to a value relative to the top
## directory.
-.PHONY: install-strip
+.MAKE .PHONY: install-strip
install-strip:
## Beware that they are two variables used to install programs:
## INSTALL_PROGRAM is used for ordinary *_PROGRAMS
install-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
-.PHONY: all-multi install-multi
+.MAKE .PHONY: all-multi install-multi
mostlyclean-multi:
maintainer-clean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE)
-.PHONY: mostlyclean-multi clean-multi distclean-multi maintainer-clean-multi
+.MAKE .PHONY: mostlyclean-multi clean-multi distclean-multi maintainer-clean-multi
install-exec-am: install-multi
## No uninstall rule?
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-RECURSIVE_TARGETS += \
-all-recursive check-recursive installcheck-recursive
+RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
-.PHONY: $(RECURSIVE_TARGETS)
+.PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
+.MAKE: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
distclean: distclean-recursive
maintainer-clean: 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
## some automatically generated header in an earlier directory. Since
## the dependencies are required before any target is examined, make
## bombs.
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
## For distclean and maintainer-clean we make sure to use the full
uninstall-am: uninstall-dist_m4dataDATA uninstall-info-am
+.MAKE: install-am install-strip
+
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
uninstall-am: uninstall-info-am
+.MAKE: install-am install-strip
+
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
distclean distclean-generic distclean-local distdir dvi dvi-am \
html html-am info info-am install install-am install-data \