[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
67-bigger-handle-factored-dependencies.patch
From: |
Akim Demaille |
Subject: |
67-bigger-handle-factored-dependencies.patch |
Date: |
Sat, 24 Feb 2001 19:16:30 +0100 |
The difference in tests/Makefile's .PHONY is due to the fact that
distclean-local is now registered. The following loop had forgotten
to register it:
- foreach ('clean', 'distclean', 'mostlyclean', 'maintainer-clean')
- {
- &depend ("$_-am", "$_-local")
- if &target_defined ("$_-local");
- }
Index: ChangeLog
from Akim Demaille <address@hidden>
* automake.in (&handle_merge_targets, &do_one_merge_target): Don't
work on targets handled by %dependencies.
(&handle_factored_dependencies): Do it.
* install.am: Install install-exec, install-data and uninstall's
suites.
Index: Makefile.in
--- Makefile.in Sat, 24 Feb 2001 15:40:19 +0100 akim (am/h/16_Makefile.i 1.20
644)
+++ Makefile.in Sat, 24 Feb 2001 16:27:20 +0100 akim (am/h/16_Makefile.i 1.20
644)
@@ -524,19 +524,21 @@
check: check-recursive
installcheck-am: installcheck-local
installcheck: installcheck-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
-uninstall: uninstall-recursive
all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA)
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir)
$(DESTDIR)$(pkgdatadir) $(DESTDIR)$(scriptdir)
+
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
mostlyclean-generic:
Index: automake.in
--- automake.in Sat, 24 Feb 2001 15:49:38 +0100 akim (am/f/39_automake.i 1.74
755)
+++ automake.in Sat, 24 Feb 2001 16:09:53 +0100 akim (am/f/39_automake.i 1.74
755)
@@ -3571,23 +3571,6 @@ sub handle_merge_targets
"\`install-info-local' target defined but
\`no-installinfo' option not in use");
}
- foreach my $utarg ('uninstall-data-local', 'uninstall-data-hook',
- 'uninstall-exec-local', 'uninstall-exec-hook')
- {
- if (&target_defined ($utarg))
- {
- my $x = $utarg;
- $x =~ s/(data|exec)-//;
- &am_line_error ($utarg, "use \`$x', not \`$utarg'");
- }
- }
-
- if (&target_defined ('install-local'))
- {
- &am_line_error ('install-local',
- "use \`install-data-local' or \`install-exec-local',
not \`install-local'");
- }
-
if (@all || &variable_defined ('BUILT_SOURCES'))
{
my $local_headers = '';
@@ -3626,11 +3609,7 @@ sub handle_merge_targets
$output_rules .= "install-binPROGRAMS: install-libLTLIBRARIES\n\n";
}
# Print definitions users can use.
- &do_one_merge_target ('install-exec');
- &do_one_merge_target ('install-data');
-
&do_one_merge_target ('install', 'all-am');
- &do_one_merge_target ('uninstall');
&do_one_merge_target ('all', @all);
}
@@ -3672,20 +3651,6 @@ sub do_one_merge_target
&pretty_print_rule ("address@hidden(MAKE) \$(AM_MAKEFLAGS)", "\t ",
'install-exec-am', 'install-data-am');
}
- elsif ($name eq 'install-exec' && &target_defined ('install-exec-hook'))
- {
- $actions{'install-exec-am'} .=
- ("address@hidden(NORMAL_INSTALL)\n"
- . "\t" . '$(MAKE) $(AM_MAKEFLAGS) install-exec-hook'
- . "\n");
- }
- elsif ($name eq 'install-data' && &target_defined ('install-data-hook'))
- {
- $actions{'install-data-am'} .=
- ("address@hidden(NORMAL_INSTALL)\n"
- . "\t" . '$(MAKE) $(AM_MAKEFLAGS) install-data-hook'
- . "\n");
- }
# To understand this special case, see handle_merge_targets.
if ($name eq 'all')
@@ -3782,12 +3747,6 @@ sub handle_clean
$output_rules .= &file_contents ('clean', $xform);
- foreach ('clean', 'distclean', 'mostlyclean', 'maintainer-clean')
- {
- &depend ("$_-am", "$_-local")
- if &target_defined ("$_-local");
- }
-
# 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
@@ -3829,9 +3788,52 @@ sub target_cmp
# &handle_factored_dependencies ()
# --------------------------------
-# Handle .PHONY target.
+# Handle everything related to gathered targets.
sub handle_factored_dependencies
{
+ # Reject bad hooks.
+ foreach my $utarg ('uninstall-data-local', 'uninstall-data-hook',
+ 'uninstall-exec-local', 'uninstall-exec-hook')
+ {
+ if (&target_defined ($utarg))
+ {
+ my $x = $utarg;
+ $x =~ s/(data|exec)-//;
+ &am_line_error ($utarg, "use \`$x', not \`$utarg'");
+ }
+ }
+
+ if (&target_defined ('install-local'))
+ {
+ &am_line_error ('install-local',
+ "use \`install-data-local' or \`install-exec-local',
not \`install-local'");
+ }
+
+ # Install the -local hooks.
+ foreach (keys %dependencies)
+ {
+ # Hooks are installed on the -am targets.
+ s/-am$// or next;
+ if (&target_defined ("$_-local"))
+ {
+ depend ("$_-am", "$_-local");
+ &depend ('.PHONY', "$_-local");
+ }
+ }
+
+ # Install the -hook hooks.
+ # FIXME: Why not be as liberal as we are with -local hooks?
+ foreach ('install-exec', 'install-data')
+ {
+ if (&target_defined ("$_-hook"))
+ {
+ $actions{"$_-am"} .=
+ ("address@hidden(NORMAL_INSTALL)\n"
+ . "\t" . '$(MAKE) $(AM_MAKEFLAGS) ' . "$_-hook\n");
+ }
+ }
+
+ # Actually output gathered targets.
foreach (sort target_cmp keys %dependencies)
{
# If there is nothing about this guy, skip it.
Index: install.am
--- install.am Sat, 24 Feb 2001 15:49:38 +0100 akim (am/h/26_install.am 1.2 644)
+++ install.am Sat, 24 Feb 2001 16:26:37 +0100 akim (am/h/26_install.am 1.2 644)
@@ -16,6 +16,9 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
+## -------------------------- ##
+## Creating the installdirs. ##
+## -------------------------- ##
?SUBDIRS?.PHONY: installdirs installdirs-am installdirs-recursive
?SUBDIRS?installdirs: installdirs-recursive
?SUBDIRS?installdirs-am:
@@ -25,8 +28,27 @@
?!SUBDIRS?installdirs:
?!SUBDIRS??INSTALLDIRS? $(mkinstalldirs) @INSTALLDIRS@
+
+## ----------------- ##
+## Install targets. ##
+## ----------------- ##
+
+.PHONY: install install-exec install-data uninstall
+
+?SUBDIRS?.PHONY: install-recursive install-exec-recursive
install-data-recursive uninstall-recursive
+## FIXME: not ready: ?SUBDIRS?install: install-recursive
+?SUBDIRS?install-exec: install-exec-recursive
+?SUBDIRS?install-data: install-data-recursive
+?SUBDIRS?uninstall: uninstall-recursive
+
+.PHONY: install-am install-exec-am install-data-am uninstall-am
+## FIXME: not ready: ?!SUBDIRS?install: install-am
+?!SUBDIRS?install-exec: install-exec-am
+?!SUBDIRS?install-data: install-data-am
+?!SUBDIRS?uninstall: uninstall-am
+
## We can't just set INSTALL_PROGRAM because that might be a relative
## path.
.PHONY: install-strip
-install-strip:
+install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
Index: m4/Makefile.in
--- m4/Makefile.in Sat, 24 Feb 2001 15:40:19 +0100 akim (am/h/15_Makefile.i
1.15 644)
+++ m4/Makefile.in Sat, 24 Feb 2001 16:27:21 +0100 akim (am/h/15_Makefile.i
1.15 644)
@@ -145,18 +145,20 @@
check: check-am
installcheck-am:
installcheck: installcheck-am
-install-exec: install-exec-am
-install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
-uninstall: uninstall-am
all-am: Makefile $(DATA)
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(m4datadir)
+
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
mostlyclean-generic:
Index: tests/Makefile.in
--- tests/Makefile.in Sat, 24 Feb 2001 15:40:19 +0100 akim (am/h/14_Makefile.i
1.17 644)
+++ tests/Makefile.in Sat, 24 Feb 2001 16:27:22 +0100 akim (am/h/14_Makefile.i
1.17 644)
@@ -448,18 +448,20 @@
check: check-am
installcheck-am:
installcheck: installcheck-am
-install-exec: install-exec-am
-install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
-uninstall: uninstall-am
all-am: Makefile
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+
mostlyclean-generic:
clean-generic:
@@ -489,11 +491,12 @@
mostlyclean-am: mostlyclean-generic
.PHONY: all all-am 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
+ distclean distclean-generic distclean-local 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:
- 67-bigger-handle-factored-dependencies.patch,
Akim Demaille <=