]> sourceware.org Git - automake.git/commitdiff
* automake.in (&handle_merge_targets, &do_one_merge_target): Don't
authorAkim Demaille <akim@epita.fr>
Mon, 26 Feb 2001 09:30:01 +0000 (09:30 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 26 Feb 2001 09:30:01 +0000 (09:30 +0000)
work on targets handled by %dependencies.
(&handle_factored_dependencies): Do it.
* install.am: Install install-exec, install-data and uninstall's
suites.

ChangeLog
Makefile.in
automake.in
install.am
lib/am/install.am
m4/Makefile.in
tests/Makefile.in

index 4178947a42de3a9539345919a9d4efd5cf5598f9..b5a9960e9bf41f01745fb8b72c290a044223edf3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-02-26  Akim Demaille  <akim@epita.fr>
+
+       * 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.
+
 2001-02-26  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&handle_merge_targets): Move `install-strip' from
index f9c4853be44caa08d9043d0523526b202413521b..32db106767550d77361030936d5b7adf0eaa454f 100644 (file)
@@ -502,18 +502,19 @@ check-am: all-am
 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)
 
 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_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
          INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
index c5aa6013f7b640056a40c7325ae2d1bb3b2f136c..08fabd567ef839a2581010f591ab2de14c22bc62 100755 (executable)
@@ -3605,23 +3605,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 = '';
@@ -3660,11 +3643,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);
 }
@@ -3706,20 +3685,6 @@ sub do_one_merge_target
        &pretty_print_rule ("\t\@\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
                            'install-exec-am', 'install-data-am');
     }
-    elsif ($name eq 'install-exec' && &target_defined ('install-exec-hook'))
-    {
-        $actions{'install-exec-am'} .=
-         ("\t\@\$(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'} .=
-         ("\t\@\$(NORMAL_INSTALL)\n"
-          . "\t" . '$(MAKE) $(AM_MAKEFLAGS) install-data-hook'
-          . "\n");
-    }
 
     # To understand this special case, see handle_merge_targets.
     if ($name eq 'all')
@@ -3816,12 +3781,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
@@ -3863,9 +3822,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"} .=
+           ("\t\@\$(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 e661f5015e41c3ea96e2afcd63a0e5d6027660ac..7b8da0af90477d38d56c7d4c1c0e3fb310374d77 100644 (file)
@@ -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:
 ?!SUBDIRS?installdirs:
 ?!SUBDIRS??_am_installdirs?    $(mkinstalldirs) @_am_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
+
 ## 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.
index e661f5015e41c3ea96e2afcd63a0e5d6027660ac..7b8da0af90477d38d56c7d4c1c0e3fb310374d77 100644 (file)
@@ -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:
 ?!SUBDIRS?installdirs:
 ?!SUBDIRS??_am_installdirs?    $(mkinstalldirs) @_am_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
+
 ## 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.
index af62a5578f3f1da8126f95b8d9b128ed9d6f43b7..04c64cf91841a5a2d710e691d201d0348dc0e165 100644 (file)
@@ -151,17 +151,18 @@ check-am: all-am
 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)
 
 installdirs:
        $(mkinstalldirs) $(DESTDIR)$(m4datadir)
 
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
          INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
index 53c42084f7cb67624ed5f4506ec16c42141530c6..51a332f21231d8a088dca1dcce0922dc98dd6b2d 100644 (file)
@@ -456,16 +456,17 @@ check-am: all-am
 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
 
 installdirs:
 
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
          INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
@@ -485,11 +486,12 @@ maintainer-clean-generic:
 maintainer-clean-am: distclean-am maintainer-clean-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
 
 install-man:
 
This page took 0.055636 seconds and 5 git commands to generate.