]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Bug fixes
authorTom Tromey <tromey@redhat.com>
Sun, 18 Feb 1996 00:39:25 +0000 (00:39 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 18 Feb 1996 00:39:25 +0000 (00:39 +0000)
14 files changed:
ChangeLog
Makefile.in
NEWS
TODO
automake.in
data.am
header.am
lib/am/data.am
lib/am/header.am
lib/am/scripts.am
libraries.am
programs.am
scripts.am
tests/Makefile.in

index bf356dc3e357e148ed36cc2ef7c345601de33e1c..ca5ba0946a23fa7e1ca333222b8fb8e5225f748a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 Sat Feb 17 00:15:20 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
+       * automake.in (am_install_var): Error if primary variable actually
+       defined.
+       (am_install_var): Skip elements that look like configure
+       substitutions.
+       (am_install_var): "EXTRA" is a valid prefix.
+       (am_install_var): Push contents EXTRA_PRIMARY onto @result.
+       (handle_merge_targets): Treat "all" target like "install".
+       (handle_subdirs): Don't push all-recursive.
+
+       * header.am (install-@DIR@HEADERS): Don't depend on all.
+       * data.am (install-@DIR@DATA): Don't depend on all.
+       * libraries.am (install-@DIR@LIBRARIES): Don't depend on all.
+       * programs.am (install-@DIR@PROGRAMS): Don't depend on all.
+       * scripts.am (install-@DIR@SCRIPTS): Don't depend on all.
+
+       * automake.in (am_install_var): Push generated install targets
+       onto @phony.
+
        * subdirs.am: No longer depend on Makefile and $(CONFIG_HEADER).
        * automake.in (handle_merge_targets): Correctly handle recursive
        calls of uninstall, install-exec, and install-data.
index 59b8f3f9793dc5927b1d478cea7274301aae6e20..b84241311b9dbe198584a91b819e996b54059407 100644 (file)
@@ -119,7 +119,7 @@ distclean-binSCRIPTS:
 
 maintainer-clean-binSCRIPTS:
 
-install-binSCRIPTS: all
+install-binSCRIPTS: $(bin_SCRIPTS)
        $(top_srcdir)/mkinstalldirs $(bindir)
        for p in $(bin_SCRIPTS); do             \
          if test -f $$p; then                  \
@@ -190,7 +190,7 @@ distclean-info:
 maintainer-clean-info:
        rm -f $(INFOS)
 
-install-pkgdataDATA: all
+install-pkgdataDATA: $(pkgdata_DATA)
        $(top_srcdir)/mkinstalldirs $(pkgdatadir)
        for p in $(pkgdata_DATA); do            \
          $(INSTALL_DATA) $(srcdir)/$$p $(pkgdatadir)/$$p; \
@@ -276,8 +276,6 @@ dist: $(DEP_DISTFILES)
        chmod -R a+r $(distdir)
        tar chozf $(distdir).tar.gz $(distdir)
        rm -rf $(distdir)
-all: $(INFO_DEPS) $(SCRIPTS) $(DATA) all-recursive Makefile
-
 info: $(INFO_DEPS) info-recursive
 
 dvi: $(DVIS) dvi-recursive
@@ -286,6 +284,8 @@ check: check-recursive
 
 installcheck: installcheck-recursive
 
+all-am: $(INFO_DEPS) $(SCRIPTS) $(DATA) Makefile
+
 install-exec-am: install-binSCRIPTS
 
 install-data-am: install-info install-pkgdataDATA
@@ -301,6 +301,8 @@ install: install-recursive install-exec-am install-data-am
 
 uninstall: uninstall-recursive uninstall-am
 
+all: all-recursive all-am
+
 installdirs: installdirs-recursive
        $(top_srcdir)/mkinstalldirs  $(bindir) $(infodir) $(pkgdatadir)
 
@@ -345,21 +347,21 @@ maintainer-clean:  maintainer-clean-am maintainer-clean-recursive
 
 .PHONY: default mostlyclean-binSCRIPTS distclean-binSCRIPTS \
     clean-binSCRIPTS maintainer-clean-binSCRIPTS uninstall-binSCRIPTS \
-    mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
-    install-info uninstall-info mostlyclean-info distclean-info \
-    clean-info maintainer-clean-info uninstall-pkgdataDATA \
-    install-data-recursive uninstall-data-recursive \
-    install-exec-recursive uninstall-exec-recursive \
-    installdirs-recursive uninstalldirs-recursive all-recursive \
-    check-recursive installcheck-recursive info-recursive dvi-recursive \
+    install-binSCRIPTS mostlyclean-vti distclean-vti clean-vti \
+    maintainer-clean-vti install-info uninstall-info mostlyclean-info \
+    distclean-info clean-info maintainer-clean-info \
+    uninstall-pkgdataDATA install-pkgdataDATA install-data-recursive \
+    uninstall-data-recursive install-exec-recursive \
+    uninstall-exec-recursive installdirs-recursive \
+    uninstalldirs-recursive all-recursive check-recursive \
+    installcheck-recursive info-recursive dvi-recursive \
     mostlyclean-recursive distclean-recursive clean-recursive \
     maintainer-clean-recursive tags mostlyclean-tags distclean-tags \
-    clean-tags maintainer-clean-tags dist all info dvi check \
-    installcheck install-exec-am install-data-am uninstall-am \
-    install-exec install-data install uninstall installdirs \
-    mostlyclean-generic distclean-generic clean-generic \
-    maintainer-clean-generic clean mostlyclean distclean \
-    maintainer-clean
+    clean-tags maintainer-clean-tags dist info dvi check installcheck \
+    all-am install-exec-am install-data-am uninstall-am install-exec \
+    install-data install uninstall all installdirs mostlyclean-generic \
+    distclean-generic clean-generic maintainer-clean-generic clean \
+    mostlyclean distclean maintainer-clean
 
 
 # Some simple checks:
diff --git a/NEWS b/NEWS
index 93c7903fa71a0158b5050c5f2d379454087c84a4..b64d642ffa8fd505124ae0a971522c351f772679 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ New in 0.30:
 * Can specify version in AUTOMAKE_OPTIONS
 * Most errors recognizable by Emacs' M-x next-error
 * Added --verbose option
+* All "primary" variables now obsolete; use EXTRA_PRIMARY to supply
+  configure-generated names
 \f
 New in 0.29:
 * Many bug fixes
diff --git a/TODO b/TODO
index b68e7335c6323e9b29fb32bb5101e7618098cddc..86e6fbd9fe891ebc887b5fed286bab102347a162 100644 (file)
--- a/TODO
+++ b/TODO
@@ -5,6 +5,8 @@ Top priorities:
 * Rewrite clean targets.
 * Expand test suite.
 
+BUGS: 
+
 NOTE: in handle_merge_targets, 'all' handling is still wrong wrt
 subdirs.  'install' should always depend on "local all", whether 'all'
 or 'all-am'.  Actually, something perplexing is going on.  Why does
index e2ce3a139f9f6de57d49321f834851b6a585c52c..2b77b6863a23b5700aaadc3174f96e50e185baa5 100755 (executable)
@@ -1166,7 +1166,6 @@ sub handle_subdirs
     }
     &push_phony_cleaners ('recursive');
 
-    push (@all, "all-recursive");
     push (@check, "check-recursive");
     push (@installcheck, "installcheck-recursive");
     push (@info, "info-recursive");
@@ -1353,7 +1352,7 @@ sub handle_merge_targets
     push (@all, 'Makefile');
     push (@all, $config_name)
        if $config_name && &dirname ($config_name) eq $relative_dir;
-    &do_one_merge_target ('all', @all);
+
     &do_one_merge_target ('info', @info);
     &do_one_merge_target ('dvi', @dvi);
 
@@ -1371,19 +1370,16 @@ sub handle_merge_targets
     # that (eg) "make install-exec" will run "install-exec-recursive"
     # if required, but "make install" won't run it twice.  Step one is
     # to see if the user specified local versions of any of the
-    # targets we handle.
-    if (defined $contents{'install-exec-local'})
-    {
-       push (@install_exec, 'install-exec-local');
-    }
-    if (defined $contents{'install-data-local'})
-    {
-       push (@install_data, 'install-data-local');
-    }
-    if (defined $contents{'uninstall-local'})
-    {
-       push (@uninstall, 'uninstall-local');
-    }
+    # targets we handle.  "all" is treated as one of these since
+    # "install" can run it.
+    push (@install_exec, 'install-exec-local')
+       if defined $contents{'install-exec-local'};
+    push (@install_data, 'install-data-local')
+       if defined $contents{'install-data-local'};
+    push (@uninstall, 'uninstall-local')
+       if defined $contents{'uninstall-local'};
+    push (@all, 'all-local')
+       if defined $contents{'all-local'};
 
     if (defined $contents{'install-local'})
     {
@@ -1398,6 +1394,18 @@ sub handle_merge_targets
     {
        push (@install, 'install-recursive');
 
+       if (@all)
+       {
+           $output_rules .= ('all-am: '
+                             . join (' ', @all)
+                             . "\n\n");
+           @all = ('all-recursive', 'all-am');
+           push (@phony, 'all-am');
+       }
+       else
+       {
+           @all = ('all-recursive');
+       }
        if (@install_exec)
        {
            $output_rules .= ('install-exec-am: '
@@ -1464,6 +1472,11 @@ sub handle_merge_targets
                      . join (' ', @uninstall)
                      . "\n\n");
     push (@phony, 'install', 'uninstall');
+
+    $output_rules .= ('all: '
+                     . join (' ', @all)
+                     . "\n\n");
+    push (@phony, 'all');
 }
 
 # Helper for handle_merge_targets.
@@ -2249,6 +2262,11 @@ sub am_install_var
     local (@used) = ();
     local (@result) = ();
 
+    # Now that configure substitutions are allowed in where_HOW
+    # variables, it is an error to actually define the primary.
+    &am_line_error ($primary, "\`$primary' is an anachronism")
+       if defined $contents{$primary};
+
     local ($clean_file) = $file . '-clean';
     local ($one_name);
     local ($X);
@@ -2257,8 +2275,10 @@ sub am_install_var
        $one_name = $X . '_' . $primary;
        if (defined $contents{$one_name})
        {
-           # Append actual contents to result.
-           push (@result, split (/\s+/, $contents{$one_name}));
+           # Append actual contents to result.  Skip elements that
+           # look like configure substitutions.
+           push (@result, grep (! /^\@.*\@$/,
+                                split (/\s+/, $contents{$one_name})));
 
            if ($do_clean)
            {
@@ -2287,15 +2307,17 @@ sub am_install_var
            if ($exec_dir_p{$X})
            {
                push (@install_exec, 'install-' . $X . $primary);
+               push (@phony, 'install-' . $X . $primary);
            }
            else
            {
                push (@install_data, 'install-' . $X . $primary);
+               push (@phony, 'install-' . $X . $primary);
            }
        }
     }
 
-    if (! defined $contents{$primary} && @used)
+    if (@used)
     {
        # Define it.
        &pretty_print ($primary . ' =', '', @used);
@@ -2303,13 +2325,15 @@ sub am_install_var
     }
 
     # Push here because PRIMARY might be configure time determined.
-    push (@all, '$(' . $primary . ')') if ($do_all && @used);
+    push (@all, '$(' . $primary . ')')
+       if $do_all && @used;
 
     # Look for misspellings.  It is an error to have a variable ending
     # in a "reserved" suffix whose prefix is unknown, eg
     # "bni_PROGRAMS".
     local (%valid, $varname);
     grep ($valid{$_} = 0, @prefixes);
+    $valid{'EXTRA'} = 0;
     foreach $varname (keys %contents)
     {
        if ($varname =~ /^(.*)_$primary$/ && ! defined $valid{$1})
@@ -2318,6 +2342,9 @@ sub am_install_var
        }
     }
 
+    push (@result, split (/\s+/, $contents{'EXTRA_' . $primary}))
+       if defined $contents{'EXTRA_' . $primary};
+
     return (@result);
 }
 
diff --git a/data.am b/data.am
index f8bbab26632100a55e75fd9d983967a6b66cbbad..aa445f9efdd28e86e8d12031653d700ac2fdc7e6 100644 (file)
--- a/data.am
+++ b/data.am
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_DATA) here; otherwise conditional
-## data will always be built.
-install-@DIR@DATA: all
+install-@DIR@DATA: $(@DIR@_DATA)
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_DATA); do              \
          $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
index 4c0409edc92b5527137cdc40041236308c9dea53..bc257504889d3e1f4f7b44bff569ed08c78217b9 100644 (file)
--- a/header.am
+++ b/header.am
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_HEADERS) here; otherwise conditional
-## headers will always be built.
-install-@DIR@HEADERS: all
+install-@DIR@HEADERS: $(@DIR@_HEADERS)
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_HEADERS); do           \
          $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
index f8bbab26632100a55e75fd9d983967a6b66cbbad..aa445f9efdd28e86e8d12031653d700ac2fdc7e6 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_DATA) here; otherwise conditional
-## data will always be built.
-install-@DIR@DATA: all
+install-@DIR@DATA: $(@DIR@_DATA)
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_DATA); do              \
          $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
index 4c0409edc92b5527137cdc40041236308c9dea53..bc257504889d3e1f4f7b44bff569ed08c78217b9 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_HEADERS) here; otherwise conditional
-## headers will always be built.
-install-@DIR@HEADERS: all
+install-@DIR@HEADERS: $(@DIR@_HEADERS)
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_HEADERS); do           \
          $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
index f542206aa8cfb0c39c4e471577d2b0398727abf8..39199d7194e92155179cfc66a4c8cf566f824af0 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_SCRIPTS) here; otherwise conditional
-## scripts will always be built.
-install-@DIR@SCRIPTS: all
+install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_SCRIPTS); do           \
          if test -f $$p; then                  \
index 4762266393b3bc26224d1980220334476b212f2b..ab4c9c19e374a09ee31f15a9b122c5b4478e1c56 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_LIBRARIES) here; otherwise conditional
-## libraries will always be built.
-install-@DIR@LIBRARIES: all
+install-@DIR@LIBRARIES: $(@DIR@_LIBFILES)
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_LIBFILES); do          \
          if test -f $$p; then                  \
index 440df599faad20fb69eda6956986007e378d9215..26379ca770b75aeb0b5c6209c34ac7ef001d8c82 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_PROGRAMS) here; otherwise conditional
-## executables will always be built.
-install-@DIR@PROGRAMS: all
+install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_PROGRAMS); do          \
          if test -f $$p; then                  \
index f542206aa8cfb0c39c4e471577d2b0398727abf8..39199d7194e92155179cfc66a4c8cf566f824af0 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-##
-## Can't depend on $(@DIR@_SCRIPTS) here; otherwise conditional
-## scripts will always be built.
-install-@DIR@SCRIPTS: all
+install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
        $(top_srcdir)/mkinstalldirs $(@DIR@dir)
        for p in $(@DIR@_SCRIPTS); do           \
          if test -f $$p; then                  \
index fcb934e921ced6c25163cc75d5f23949b0b7b458..cb15800ee369b789ddd87dcb357693a9369ff204 100644 (file)
@@ -74,8 +74,6 @@ dist: $(DEP_DISTFILES)
          || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
          || cp -p $(srcdir)/$$file $(distdir)/$$file; \
        done
-all: Makefile
-
 info:
 
 dvi:
@@ -93,6 +91,8 @@ install: install-exec install-data
 
 uninstall: 
 
+all: Makefile
+
 installdirs:
 
 
@@ -120,8 +120,8 @@ maintainer-clean:  maintainer-clean-generic distclean
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
 
-.PHONY: default tags dist all info dvi check-local check installcheck \
-    install-exec install-data install uninstall installdirs \
+.PHONY: default tags dist info dvi check-local check installcheck \
+    install-exec install-data install uninstall all installdirs \
     mostlyclean-generic distclean-generic clean-generic \
     maintainer-clean-generic clean mostlyclean distclean \
     maintainer-clean