[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: register recursive install target as dependencies of .MAKE
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: register recursive install target as dependencies of .MAKE |
Date: |
Mon, 27 Dec 2004 21:38:05 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
I'm installing this on HEAD. (Posting the *.in changes on purpose.)
2004-12-27 Alexandre Duret-Lutz <address@hidden>
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.
Index: Makefile.in
===================================================================
RCS file: /cvs/automake/automake/Makefile.in,v
retrieving revision 1.508
diff -u -r1.508 Makefile.in
--- Makefile.in 13 Dec 2004 21:21:50 -0000 1.508
+++ Makefile.in 27 Dec 2004 20:32:08 -0000
@@ -64,6 +64,8 @@
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)
@@ -262,8 +264,7 @@
$(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 \
@@ -592,19 +593,21 @@
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
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1591
diff -u -r1.1591 automake.in
--- automake.in 12 Dec 2004 23:39:01 -0000 1.1591
+++ automake.in 27 Dec 2004 20:32:09 -0000
@@ -4386,16 +4386,20 @@
# &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;
}
@@ -4440,6 +4444,7 @@
$actions{"$_-am"} .=
("address@hidden(NORMAL_INSTALL)\n"
. "\t" . '$(MAKE) $(AM_MAKEFLAGS) ' . "$_-hook\n");
+ depend ('.MAKE', "$_-am");
}
}
@@ -4462,8 +4467,9 @@
# 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',
Index: doc/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/doc/Makefile.in,v
retrieving revision 1.41
diff -u -r1.41 Makefile.in
--- doc/Makefile.in 12 Oct 2004 19:39:06 -0000 1.41
+++ doc/Makefile.in 27 Dec 2004 20:32:11 -0000
@@ -488,6 +488,8 @@
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 \
Index: lib/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/lib/Makefile.in,v
retrieving revision 1.116
diff -u -r1.116 Makefile.in
--- lib/Makefile.in 12 Oct 2004 19:39:07 -0000 1.116
+++ lib/Makefile.in 27 Dec 2004 20:32:11 -0000
@@ -71,6 +71,8 @@
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)
@@ -246,8 +248,7 @@
$(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 \
@@ -466,17 +467,19 @@
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
Index: lib/Automake/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Makefile.in,v
retrieving revision 1.127
diff -u -r1.127 Makefile.in
--- lib/Automake/Makefile.in 12 Oct 2004 19:39:07 -0000 1.127
+++ lib/Automake/Makefile.in 27 Dec 2004 20:32:11 -0000
@@ -68,6 +68,8 @@
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)
@@ -270,8 +272,7 @@
$(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 \
@@ -489,17 +490,19 @@
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
Index: lib/Automake/Rule.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Rule.pm,v
retrieving revision 1.7
diff -u -r1.7 Rule.pm
--- lib/Automake/Rule.pm 10 Dec 2003 17:20:06 -0000 1.7
+++ lib/Automake/Rule.pm 27 Dec 2004 20:32:11 -0000
@@ -1,4 +1,4 @@
-# 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
@@ -349,6 +349,8 @@
# Phoning.
'.PHONY' => [],
+ # Recursive install targets (so `make -n install' works for BSD Make).
+ '.MAKE' => [],
);
%actions = ();
}
Index: lib/Automake/tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/tests/Makefile.in,v
retrieving revision 1.57
diff -u -r1.57 Makefile.in
--- lib/Automake/tests/Makefile.in 12 Oct 2004 19:39:07 -0000 1.57
+++ lib/Automake/tests/Makefile.in 27 Dec 2004 20:32:11 -0000
@@ -342,6 +342,8 @@
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 \
Index: lib/am/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/lib/am/Makefile.in,v
retrieving revision 1.104
diff -u -r1.104 Makefile.in
--- lib/am/Makefile.in 12 Oct 2004 19:39:07 -0000 1.104
+++ lib/am/Makefile.in 27 Dec 2004 20:32:11 -0000
@@ -333,6 +333,8 @@
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 \
Index: lib/am/install.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/install.am,v
retrieving revision 1.17
diff -u -r1.17 install.am
--- lib/am/install.am 28 Jan 2004 20:50:43 -0000 1.17
+++ lib/am/install.am 27 Dec 2004 20:32:11 -0000
@@ -64,7 +64,7 @@
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
@@ -78,7 +78,7 @@
## 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
Index: lib/am/multilib.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/multilib.am,v
retrieving revision 1.8
diff -u -r1.8 multilib.am
--- lib/am/multilib.am 23 May 2004 09:49:13 -0000 1.8
+++ lib/am/multilib.am 27 Dec 2004 20:32:11 -0000
@@ -32,7 +32,7 @@
install-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
-.PHONY: all-multi install-multi
+.MAKE .PHONY: all-multi install-multi
mostlyclean-multi:
@@ -44,7 +44,7 @@
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?
Index: lib/am/subdirs.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/subdirs.am,v
retrieving revision 1.56
diff -u -r1.56 subdirs.am
--- lib/am/subdirs.am 6 Jul 2003 19:30:46 -0000 1.56
+++ lib/am/subdirs.am 27 Dec 2004 20:32:11 -0000
@@ -1,5 +1,5 @@
## 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
@@ -17,10 +17,12 @@
## 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.
@@ -56,17 +58,13 @@
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
Index: m4/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/m4/Makefile.in,v
retrieving revision 1.262
diff -u -r1.262 Makefile.in
--- m4/Makefile.in 12 Oct 2004 19:39:07 -0000 1.262
+++ m4/Makefile.in 27 Dec 2004 20:32:11 -0000
@@ -328,6 +328,8 @@
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 \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.747
diff -u -r1.747 Makefile.in
--- tests/Makefile.in 9 Dec 2004 22:07:45 -0000 1.747
+++ tests/Makefile.in 27 Dec 2004 20:32:11 -0000
@@ -908,6 +908,8 @@
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 \
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: register recursive install target as dependencies of .MAKE,
Alexandre Duret-Lutz <=