automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 52-factored-install.patch


From: Akim Demaille
Subject: Re: 52-factored-install.patch
Date: 25 Feb 2001 19:09:41 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

Tom Tromey <address@hidden> writes:

> One example of how the new code can fail is a system-dependent header
> file install:
> 
>     inclexecdir = $(exec_prefix)/include   ## Just an example!
>     inclexec_HEADERS = my-config.h
> 
> With the new code the header will be installed by `install-data'.
> However, that is wrong.  `install-exec' ought to install this header.

It's fixed now.  I'm applying the patch below.  In short, here is what
changed:

            $output_rules .=
              &file_contents ($file,
                              &transform ('DIR'  => $X,
                                          'NDIR' => $nodir_name)
                              . &transform_cond ('BASE' => $strip_subdir,
                                                 'EXEC' => $X =~ /exec/)
                              . $ltxform
                              . $cygxform);

and for instance data.am now has.

?EXEC?.PHONY install-exec-am: address@hidden@DATA
?!EXEC?.PHONY install-data-am: address@hidden@DATA

I also provide a new test case.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * automake.in (&handle_texinfo, &handle_man_pages, &am_install_var):
        Don't deal with install-data-am, install-exec-am and unstall-am.
        (&initialize_per_input): Add them to %dependencies.
        Remove %exec_dir_p since the *.am files are now in charge of it.
        Remove @uninstall, @install_data, @install_exec.
        (&handle_merge_targets): Adjust to these removals.
        (&file_contents): Also &transform_cond for --no-installman and
        --no-installinfo.
        (&do_one_merge_target): Add some magic to install hooks on
        %dependencies' targets.
        (%required_targets): New.
        (&handle_factored_dependencies): Output required targets.
        * data.am, header.am, java.am, libs.am, lisp.am, ltlib.am,
        * mans-vars.am, mans.am, progs.am, python.am, scripts.am,
        * texinfos.am: Declare your dependencies on install-data-am,
        install-exec-am and uninstall-am.
        * tests/instdata2.test (incldata_HEADERS): New test.

Index: Makefile.in
===================================================================
RCS file: /cvs/automake/automake/Makefile.in,v
retrieving revision 1.270
diff -u -u -r1.270 Makefile.in
--- Makefile.in 2001/02/25 06:47:17 1.270
+++ Makefile.in 2001/02/25 17:59:42
@@ -130,12 +130,12 @@
 TEXINFOS = automake.texi
 DATA =  $(dist_pkgdata_DATA) $(dist_script_DATA)
 
-DIST_COMMON =  README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \
-COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS README-alpha \
-THANKS TODO aclocal.in aclocal.m4 ansi2knr.1 ansi2knr.c automake.in \
-compile config.guess config.sub configure configure.in depcomp \
-elisp-comp install-sh mdate-sh missing mkinstalldirs py-compile \
-stamp-vti texinfo.tex version.texi ylwrap
+DIST_COMMON =  mkinstalldirs automake.in install-sh version.texi \
+aclocal.m4 README-alpha ansi2knr.c Makefile.am mdate-sh NEWS COPYING \
+stamp-vti ansi2knr.1 AUTHORS compile Makefile.in configure.in README \
+depcomp THANKS configure ylwrap elisp-comp py-compile ChangeLog missing \
+config.sub texinfo.tex INSTALL $(dist_script_DATA) aclocal.in \
+config.guess TODO $(dist_pkgdata_DATA)
 
 DIST_SUBDIRS =  $(SUBDIRS)
 all: all-recursive
@@ -206,19 +206,6 @@
 automake.info: automake.texi $(srcdir)/version.texi
 automake.dvi: automake.texi $(srcdir)/version.texi
 
-.texi.info:
-       @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-       cd $(srcdir) \
-         && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
-
-.texi.dvi:
-       TEXINPUTS=$(srcdir):$$TEXINPUTS \
-         MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.texi:
-       @cd $(srcdir) && rm -f $@ address@hidden address@hidden
-       cd $(srcdir) \
-         && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 DVIPS = dvips
 .dvi.ps:
@@ -505,20 +492,11 @@
 check: check-recursive
 installcheck-am: installcheck-local
 installcheck: installcheck-recursive
-install-exec-am: install-binSCRIPTS
 install-exec: install-exec-recursive
-
-install-data-am: install-info-am install-dist_pkgdataDATA \
-               install-dist_scriptDATA
-       @$(NORMAL_INSTALL)
-       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
 install-data: install-data-recursive
-
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 install: install-recursive
-uninstall-am: uninstall-binSCRIPTS uninstall-info \
-               uninstall-dist_pkgdataDATA uninstall-dist_scriptDATA
 uninstall: uninstall-recursive
 all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA)
 install-strip:
@@ -543,33 +521,18 @@
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -rm -f Makefile.in
-clean: clean-recursive
-
-clean-am: clean-generic mostlyclean-am
-
-dist-all: dist
-
-distclean: distclean-recursive
-       -rm -f config.status
-
-distclean-am: clean-am distclean-generic distclean-tags
-
-maintainer-clean: maintainer-clean-recursive
-       -rm -f config.status
-
 maintainer-clean-am: distclean-am maintainer-clean-aminfo \
        maintainer-clean-generic maintainer-clean-vti
 
-mostlyclean: mostlyclean-recursive
+uninstall-am: uninstall-binSCRIPTS uninstall-dist_pkgdataDATA \
+       uninstall-dist_scriptDATA uninstall-info
 
-mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
-
 .PHONY: all all-am all-recursive check check-am check-recursive clean \
-       clean-generic clean-recursive dist dist-all distcheck 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 \
+       clean-generic clean-recursive dist dist-all dist-info distcheck \
+       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 \
@@ -581,6 +544,33 @@
        tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \
        uninstall-dist_pkgdataDATA uninstall-dist_scriptDATA \
        uninstall-info uninstall-recursive
+
+install-man:
+
+distclean: distclean-recursive
+       -rm -f config.status
+
+clean-am: clean-generic mostlyclean-am
+
+install-exec-am: install-binSCRIPTS
+
+install-data-am: install-dist_pkgdataDATA install-dist_scriptDATA \
+       install-info-am
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+
+distclean-am: clean-am distclean-generic distclean-tags
+
+dist-all: dist
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f config.status
+
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
+
+mostlyclean: mostlyclean-recursive
+
+clean: clean-recursive
 
 
 install-data-hook:
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.906
diff -u -u -r1.906 automake.in
--- automake.in 2001/02/25 04:37:51 1.906
+++ automake.in 2001/02/25 17:59:45
@@ -120,7 +120,23 @@
 # TRUE if we should always update files that we know about.
 $force_missing = 0;
 
+# List of targets we must always output.
+# FIXME: Complete, and remove falsely required targets.
+my %required_targets =
+  (
+   'all'          => 1,
+   'install'      => 1,
+   'install-data' => 1,
+   'install-exec' => 1,
+
+   # FIXME: Not required, temporary hack until install-data and install-exec
+   # are factored.
+   'install-data-am' => 1,
+   'install-exec-am' => 1,
 
+   'install-man' => 1,
+  );
+
 # Variables filled during files scanning.
 
 # Name of the top autoconf input: `configure.ac' or `configure.in'.
@@ -2457,10 +2473,7 @@
 
     if (! defined $options{'no-installinfo'})
     {
-       push (@uninstall, 'uninstall-info');
        push (@installdirs, '$(DESTDIR)$(infodir)');
-       unshift (@install_data, 'install-info-am');
-
        # Make sure documentation is made and installed first.  Use
        # $(INFO_DEPS), not 'info', because otherwise recursive makes
        # get run twice during "make all".
@@ -2541,7 +2554,6 @@
        $output_rules .= &file_contents ('mans',
                                         &transform ('SECTION', $sect));
     }
-    &depend ('.PHONY', 'install-man', 'uninstall-man');
 
     # We don't really need this, but we use it in case we ever want to
     # support noinst_MANS.
@@ -2551,8 +2563,6 @@
 
     if (! defined $options{'no-installman'})
     {
-       push (@install_data, 'install-man');
-       push (@uninstall, 'uninstall-man');
        push (@all, '$(MANS)');
     }
 }
@@ -3697,14 +3707,11 @@
        $output_rules .= "install-binPROGRAMS: install-libLTLIBRARIES\n\n";
     }
     # Print definitions users can use.
-    &do_one_merge_target ('install-exec', @install_exec);
-    $output_rules .= "\n";
-
-    &do_one_merge_target ('install-data', @install_data);
-    $output_rules .= "\n";
+    &do_one_merge_target ('install-exec');
+    &do_one_merge_target ('install-data');
 
     &do_one_merge_target ('install', 'all-am');
-    &do_one_merge_target ('uninstall', @uninstall);
+    &do_one_merge_target ('uninstall');
 
     &do_one_merge_target ('all', @all);
 
@@ -3731,16 +3738,29 @@
 # relies on the fact that this doesn't add an extra \n at the end.
 sub do_one_merge_target
 {
-    local ($name, @values) = @_;
+    my ($name, @values) = @_;
 
-    if (&target_defined ($name . '-local'))
+    # Install hooks.
+    if (&target_defined ("$name-local"))
     {
        # User defined local form of target.  So include it.
-       push (@values, $name . '-local');
-       &depend ('.PHONY', $name . '-local');
+        if (defined $dependencies{"$name-am"})
+         {
+           depend ("$name-am", "$name-local");
+         }
+       else
+         {
+           push (@values, "$name-local");
+         }
+       &depend ('.PHONY', "$name-local");
     }
 
-    &pretty_print_rule ($name . "-am:", "\t\t", @values);
+    # FIXME: Gross, should disapear once all these targets properly
+    # registered in %dependencies.
+    if (!defined $dependencies {"$name-am"})
+      {
+       &pretty_print_rule ("$name-am:", "\t\t", @values);
+      }
     if ($name eq 'install')
     {
        # Special-case `install-am' to run install-exec-am and
@@ -3750,15 +3770,17 @@
     }
     elsif ($name eq 'install-exec' && &target_defined ('install-exec-hook'))
     {
-       $output_rules .= ("address@hidden(NORMAL_INSTALL)\n"
-                         . "\t" . '$(MAKE) $(AM_MAKEFLAGS) install-exec-hook'
-                         . "\n");
+        $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'))
     {
-       $output_rules .= ("address@hidden(NORMAL_INSTALL)\n"
-                         . "\t" . '$(MAKE) $(AM_MAKEFLAGS) install-data-hook'
-                         . "\n");
+        $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.
@@ -3910,7 +3932,9 @@
     {
         # If there is nothing about this guy, skip it.
         next
-         unless @{$dependencies{$_}} || $actions{$_};
+         unless (@{$dependencies{$_}}
+                 || $actions{$_}
+                 || $required_targets{$_});
         &pretty_print_rule ("$_:", "\t",
                            sort @{$dependencies{$_}});
        $output_rules .= $actions{$_};
@@ -6415,26 +6439,6 @@
     $AC_CANONICAL_HOST = 1;
     $AC_CANONICAL_SYSTEM = 2;
 
-    # Associative array of standard directory names.  Entry is TRUE if
-    # corresponding directory should be installed during
-    # 'install-exec' phase.
-    %exec_dir_p =
-       ('bin', 1,
-        'sbin', 1,
-        'libexec', 1,
-        'data', 0,
-        'sysconf', 1,
-        'localstate', 1,
-        'lib', 1,
-        'info', 0,
-        'man', 0,
-        'include', 0,
-        'oldinclude', 0,
-        'pkgdata', 0,
-        'pkglib', 1,
-        'pkginclude', 0
-        );
-
     # Commonly found files we look for and automatically include in
     # DISTFILES.
     @common_files =
@@ -6540,9 +6544,6 @@
     %dist_dirs = ();
 
     # List of dependencies for the obvious targets.
-    @install_data = ();
-    @install_exec = ();
-    @uninstall = ();
     @installdirs = ();
 
     @info = ();
@@ -6560,8 +6561,11 @@
     %dependencies =
       (
        # Installing/uninstalling.
+       'install-data-am'      => [],
+       'install-exec-am'      => [],
        'install-man'         => [],
        'uninstall-man'       => [],
+       'uninstall-am'         => [],
 
        # Cleaning.
        'clean-am'             => [],
@@ -6710,13 +6714,18 @@
     # Sanity check over COMMAND, and complete it with global options.
     &prog_error ("file_contents: $command")
         if $command ne '' && substr ($command, -1) ne ';';
-    $command .= &transform_cond ('CYGNUS'   => $cygnus_mode,
-                                'SHAR'     => $options{'dist-shar'},
-                                'BZIP2'    => $options{'dist-bzip2'},
-                                'ZIP'      => $options{'dist-zip'},
-                                'COMPRESS' => $options{'dist-tarZ'},
-                                'CK-NEWS'  => $options{'check-news'});
+    $command .=
+      &transform_cond ('CYGNUS'   => $cygnus_mode,
 
+                      'SHAR'        => $options{'dist-shar'},
+                      'BZIP2'       => $options{'dist-bzip2'},
+                      'ZIP'         => $options{'dist-zip'},
+                      'COMPRESS'    => $options{'dist-tarZ'},
+
+                      'INSTALL-INFO' => !$options{'no-installinfo'},
+                      'INSTALL-MAN'  => !$options{'no-installman'},
+                      'CK-NEWS'      => $options{'check-news'});
+
     # Swallow the file and applied the COMMAND.
     my $file = $am_dir . '/' . $basename . '.am';
     open (FC_FILE, $file)
@@ -7211,23 +7220,12 @@
              &file_contents ($file,
                              &transform ('DIR'  => $X,
                                          'NDIR' => $nodir_name)
-                             . &transform_cond ('BASE' => $strip_subdir)
+                             . &transform_cond ('BASE' => $strip_subdir,
+                                                'EXEC' => $X =~ /exec/)
                              . $ltxform
                              . $cygxform);
 
-           push (@uninstall, 'uninstall-' . $X . $primary);
-           &depend ('.PHONY', 'uninstall-' . $X . $primary);
            push (@installdirs, '$(DESTDIR)$(' . $X . 'dir)');
-           if (defined $exec_dir_p{$X} ? $exec_dir_p{$X} : ($X =~ /exec/))
-           {
-               push (@install_exec, 'install-' . $X . $primary);
-               &depend ('.PHONY', 'install-' . $X . $primary);
-           }
-           else
-           {
-               push (@install_data, 'install-' . $X . $primary);
-               &depend ('.PHONY', 'install-' . $X . $primary);
-           }
        }
     }
 
Index: data.am
===================================================================
RCS file: /cvs/automake/automake/data.am,v
retrieving revision 1.28
diff -u -u -r1.28 data.am
--- data.am 2001/02/09 03:38:16 1.28
+++ data.am 2001/02/25 17:59:45
@@ -15,6 +15,9 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
+?EXEC?.PHONY install-exec-am: address@hidden@DATA
+?!EXEC?.PHONY install-data-am: address@hidden@DATA
 address@hidden@DATA: $(@address@hidden)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
@@ -31,6 +34,7 @@
          $(INSTALL_DATA) $$d$$p $(DESTDIR)$(@address@hidden)/$$f; \
        done
 
+.PHONY uninstall-am: address@hidden@DATA
 address@hidden@DATA:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
Index: header.am
===================================================================
RCS file: /cvs/automake/automake/header.am,v
retrieving revision 1.29
diff -u -u -r1.29 header.am
--- header.am 2001/02/09 21:52:30 1.29
+++ header.am 2001/02/25 17:59:45
@@ -15,6 +15,9 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
+?EXEC?.PHONY install-exec-am: address@hidden@HEADERS
+?!EXEC?.PHONY install-data-am: address@hidden@HEADERS
 address@hidden@HEADERS: $(@address@hidden)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
@@ -29,6 +32,7 @@
          $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(@address@hidden)/$$f; \
        done
 
+.PHONY uninstall-am: address@hidden@HEADERS
 address@hidden@HEADERS:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
Index: java.am
===================================================================
RCS file: /cvs/automake/automake/java.am,v
retrieving revision 1.5
diff -u -u -r1.5 java.am
--- java.am 2000/10/16 09:01:36 1.5
+++ java.am 2001/02/25 17:59:45
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright 1998, 1999 Free Software Foundation, Inc.
+## Copyright 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
@@ -15,6 +15,9 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
+?EXEC?.PHONY install-exec-am: address@hidden@JAVA
+?!EXEC?.PHONY install-data-am: address@hidden@JAVA
 address@hidden@JAVA: address@hidden@.stamp
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
@@ -26,6 +29,7 @@
          $(INSTALL_DATA) $$p $(DESTDIR)$(@address@hidden)/$$p; \
        done
 
+.PHONY uninstall-am: address@hidden@JAVA
 address@hidden@JAVA:
        @$(NORMAL_UNINSTALL)
        @for p in *.class; do \
Index: libs.am
===================================================================
RCS file: /cvs/automake/automake/libs.am,v
retrieving revision 1.13
diff -u -u -r1.13 libs.am
--- libs.am 2000/10/16 09:01:36 1.13
+++ libs.am 2001/02/25 17:59:45
@@ -15,6 +15,8 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
+.PHONY install-exec-am: address@hidden@LIBRARIES
 address@hidden@LIBRARIES: $(@address@hidden)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
@@ -40,6 +42,7 @@
          else :; fi; \
        done
 
+.PHONY uninstall-am: address@hidden@LIBRARIES
 address@hidden@LIBRARIES:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
Index: lisp.am
===================================================================
RCS file: /cvs/automake/automake/lisp.am,v
retrieving revision 1.20
diff -u -u -r1.20 lisp.am
--- lisp.am 2001/02/23 15:06:16 1.20
+++ lisp.am 2001/02/25 17:59:45
@@ -16,6 +16,8 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
+?EXEC?.PHONY install-exec-am: address@hidden@LISP
+?!EXEC?.PHONY install-data-am: address@hidden@LISP
 address@hidden@LISP: $(@address@hidden) $(ELCFILES)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
@@ -35,6 +37,7 @@
          else : ; fi; \
        done
 
+.PHONY uninstall-am: address@hidden@LISP
 address@hidden@LISP:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
Index: ltlib.am
===================================================================
RCS file: /cvs/automake/automake/ltlib.am,v
retrieving revision 1.13
diff -u -u -r1.13 ltlib.am
--- ltlib.am 2000/10/16 09:01:36 1.13
+++ ltlib.am 2001/02/25 17:59:45
@@ -1,5 +1,6 @@
 ## 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
@@ -15,6 +16,8 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
+.PHONY install-exec-am: address@hidden@LTLIBRARIES
 address@hidden@LTLIBRARIES: $(@address@hidden)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
@@ -31,6 +34,7 @@
          else :; fi; \
        done
 
+.PHONY uninstall-am: address@hidden@LTLIBRARIES
 address@hidden@LTLIBRARIES:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
Index: mans-vars.am
===================================================================
RCS file: /cvs/automake/automake/mans-vars.am,v
retrieving revision 1.6
diff -u -u -r1.6 mans-vars.am
--- mans-vars.am 2000/10/16 09:01:36 1.6
+++ mans-vars.am 2001/02/25 17:59:45
@@ -1,5 +1,5 @@
 ## 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
@@ -15,4 +15,13 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
 NROFF = nroff
+
+## FIXME: This is not elegant: there is more than simply variables,
+## but we take advantage of the facts that these are factored dependencies,
+## and therefore will be output here, in the variable section.
+
+.PHONY: install-man uninstall-man
+?INSTALL-MAN?install-data-am: install-man
+?INSTALL-MAN?uninstall-am: uninstall-man
Index: progs.am
===================================================================
RCS file: /cvs/automake/automake/progs.am,v
retrieving revision 1.23
diff -u -u -r1.23 progs.am
--- progs.am 2001/02/18 00:35:18 1.23
+++ progs.am 2001/02/25 17:59:45
@@ -15,6 +15,8 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
+.PHONY install-exec-am: address@hidden@PROGRAMS
 address@hidden@PROGRAMS: $(@address@hidden)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
@@ -31,6 +33,7 @@
          else :; fi; \
        done
 
+.PHONY uninstall-am: address@hidden@PROGRAMS
 address@hidden@PROGRAMS:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
Index: python.am
===================================================================
RCS file: /cvs/automake/automake/python.am,v
retrieving revision 1.3
diff -u -u -r1.3 python.am
--- python.am 2001/02/23 15:06:16 1.3
+++ python.am 2001/02/25 17:59:45
@@ -16,6 +16,7 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 
+.PHONY install-exec-am: address@hidden@PYTHON
 address@hidden@PYTHON: $(@address@hidden)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
@@ -30,6 +31,7 @@
 ## encoded in the actual files.
        @PYTHON=$(PYTHON) $(py_compile) --basedir $(DESTDIR)$(@address@hidden) 
$(@address@hidden)
 
+.PHONY uninstall-am: address@hidden@PYTHON
 address@hidden@PYTHON:
        @$(NORMAL_UNINSTALL)
        list='$(@address@hidden)'; for p in $$list; do \
Index: scripts.am
===================================================================
RCS file: /cvs/automake/automake/scripts.am,v
retrieving revision 1.33
diff -u -u -r1.33 scripts.am
--- scripts.am 2000/10/16 09:01:36 1.33
+++ scripts.am 2001/02/25 17:59:45
@@ -15,6 +15,8 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
+.PHONY install-exec-am: address@hidden@SCRIPTS
 address@hidden@SCRIPTS: $(@address@hidden)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
@@ -31,6 +33,7 @@
          else :; fi; \
        done
 
+.PHONY uninstall-am: address@hidden@SCRIPTS
 address@hidden@SCRIPTS:
        @$(NORMAL_UNINSTALL)
        @list='$(@address@hidden)'; for p in $$list; do \
Index: texinfos.am
===================================================================
RCS file: /cvs/automake/automake/texinfos.am,v
retrieving revision 1.74
diff -u -u -r1.74 texinfos.am
--- texinfos.am 2001/02/25 04:37:52 1.74
+++ texinfos.am 2001/02/25 17:59:45
@@ -27,6 +27,9 @@
 ## break a possible install-sh reference.
 ## Funny name due to --cygnus influence; we want to reserve
 ## `install-info' for the user.
+.PHONY: install-info-am
+?EXEC??INSTALL-INFO?insexec-data-am: install-info-am
+?!EXEC??INSTALL-INFO?install-data-am: install-info-am
 install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(infodir)
@@ -62,6 +65,8 @@
          done; \
        else : ; fi
 
+.PHONY: uninstall-info
+?INSTALL-INFO?uninstall-am: uninstall-info
 uninstall-info:
        $(PRE_UNINSTALL)
 ## Run two loops here so that we can handle PRE_UNINSTALL and
@@ -84,6 +89,7 @@
           else :; fi); \
        done
 
+.PHONY: dist-info
 dist-info: $(INFO_DEPS)
        list='$(INFO_DEPS)'; \
        for base in $$list; do \
@@ -96,8 +102,6 @@
            || cp -p $$d/$$file $(distdir)/$$file; \
          done; \
        done
-
-.PHONY: install-info-am uninstall-info
 
 
 ## How to clean.  The funny name is due to --cygnus influence; in
Index: m4/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/m4/Makefile.in,v
retrieving revision 1.123
diff -u -u -r1.123 Makefile.in
--- m4/Makefile.in 2001/02/25 06:47:17 1.123
+++ m4/Makefile.in 2001/02/25 17:59:46
@@ -153,16 +153,11 @@
 check: check-am
 installcheck-am:
 installcheck: installcheck-am
-install-exec-am:
 install-exec: install-exec-am
-
-install-data-am: install-m4dataDATA
 install-data: install-data-am
-
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 install: install-am
-uninstall-am: uninstall-m4dataDATA
 uninstall: uninstall-am
 all-am: Makefile $(DATA)
 install-strip:
@@ -184,29 +179,37 @@
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -rm -f Makefile.in
-clean: clean-am
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-clean-am: clean-generic mostlyclean-am
+uninstall-am: uninstall-m4dataDATA
+
+.PHONY: all all-am 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
+
+install-man:
 
 distclean: distclean-am
 
+clean-am: clean-generic mostlyclean-am
+
+install-exec-am:
+
+install-data-am: install-m4dataDATA
+
 distclean-am: clean-am distclean-generic
 
 maintainer-clean: maintainer-clean-am
 
-maintainer-clean-am: distclean-am maintainer-clean-generic
+mostlyclean-am: mostlyclean-generic
 
 mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
 
-.PHONY: all all-am 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
+clean: clean-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.257
diff -u -u -r1.257 Makefile.am
--- tests/Makefile.am 2001/02/25 04:37:52 1.257
+++ tests/Makefile.am 2001/02/25 17:59:46
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = gnits
 
-XFAIL_TESTS = 
+XFAIL_TESTS =
 TESTS =        \
 acinclude.test \
 aclocal.test \
@@ -129,6 +129,7 @@
 install2.test \
 installsh.test \
 instdata.test \
+instdata2.test \
 instexec.test \
 insthook.test \
 instman.test \
Index: tests/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.in,v
retrieving revision 1.335
diff -u -u -r1.335 Makefile.in
--- tests/Makefile.in 2001/02/25 04:37:52 1.335
+++ tests/Makefile.in 2001/02/25 17:59:46
@@ -206,6 +206,7 @@
 install2.test \
 installsh.test \
 instdata.test \
+instdata2.test \
 instexec.test \
 insthook.test \
 instman.test \
@@ -453,16 +454,11 @@
 check: check-am
 installcheck-am:
 installcheck: installcheck-am
-install-exec-am:
 install-exec: install-exec-am
-
-install-data-am:
 install-data: install-data-am
-
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 install: install-am
-uninstall-am:
 uninstall: uninstall-am
 all-am: Makefile
 install-strip:
@@ -483,28 +479,34 @@
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -rm -f Makefile.in
-clean: clean-am
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-clean-am: clean-generic mostlyclean-am
+.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
+
+install-man:
 
 distclean: distclean-am
 
+clean-am: clean-generic mostlyclean-am
+
+install-exec-am:
+
+install-data-am:
+
 distclean-am: clean-am distclean-generic distclean-local
 
 maintainer-clean: maintainer-clean-am
 
-maintainer-clean-am: distclean-am maintainer-clean-generic
+mostlyclean-am: mostlyclean-generic
 
 mostlyclean: mostlyclean-am
-
-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
+clean: clean-am
 
 
 distclean-local:
Index: tests/instdata2.test
===================================================================
RCS file: instdata2.test
diff -N instdata2.test
--- /dev/null   Tue May  5 13:32:27 1998
+++ tests/instdata2.test Sun Feb 25 09:59:46 2001
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+# Test that installing under $exec_prefix is handled by install-exec.
+# Testing with headers for instance.
+
+. $srcdir/defs || exit 1
+
+cat >Makefile.am << \EOF
+inclexecdir = $(exec_prefix)/include
+inclexec_HEADERS = my-config.h
+
+incldatadir = $(prefix)/include
+incldata_HEADERS = my-data.h
+EOF
+
+set -e
+$AUTOMAKE
+grep '^install-exec-am: install-inclexecHEADERS$' Makefile.in
+grep '^install-data-am: install-incldataHEADERS$' Makefile.in
+
+exit 0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]