automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.2


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.2-731-gf0b6274
Date: Mon, 30 Jul 2012 16:15:29 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=f0b62740e84c6682f5300a6ca5cf696b66d794a2

The branch, ng/master has been updated
       via  f0b62740e84c6682f5300a6ca5cf696b66d794a2 (commit)
       via  d3e05cbd339d35a896e1640efaab028f1b17cefc (commit)
       via  50c1d81de9cbabe7a6299599b2c599a0d35208fb (commit)
       via  d7c525ce7b5eaf4419a5ea85ad7cab54c32aabd3 (commit)
       via  41456cf28af0b6f17c78ab98611a3ec4194a1684 (commit)
       via  530db90666bb13e80c5570e2b47b527088a9feeb (commit)
       via  27bbb0b1ef0a8273b262730263a5f31a39924b0e (commit)
       via  4dea566e9832b4a803ee5f319925e5c892ee8caa (commit)
       via  e35306b40107b333c978a5c484cd3af4a67fc525 (commit)
       via  021ad59476299c4819a6980a65c6b286e65a51f0 (commit)
       via  cd5adbfbbfee8c6b16946250dc151c5ffa67db76 (commit)
       via  286a4487155812a21030853547e47a0f1e765747 (commit)
      from  0e72e0851cc26c5cf322ff991f843f03b6e3fb0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f0b62740e84c6682f5300a6ca5cf696b66d794a2
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 17:39:05 2012 +0200

    [ng] refactor: handle 'all', 'check' and 'install' target in on '.am' file
    
    * lib/am/common-targets.am: New file, superseding and encompassing ...
    * lib/am/check-target.am, all-target.am, lib/am/install.am: ... these
    ones.
    * Makefile.am (dist_am_DATA): Adjust.
    * automake.in (handle_all_and_check): Remove.
    (generate_makefile): Adjust: include 'common-targets.am' "almost
    verbatim".
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit d3e05cbd339d35a896e1640efaab028f1b17cefc
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 16:58:40 2012 +0200

    [ng] refactor: move hack for libtool installs from automake to install.am
    
    * automake.in (generate_makefile): Move the hack necessary to make the
    installation of libtool libraries and binaries dependent on them work
    "on degenerate systems even with make -j" (according to the comments of
    the original authors :-) from here ...
    * lib/am/install.am: ... to here, with improved comments.
    
    For the origin of the hack we are moving around here, refer to commit
    bd4a1d5 of 2000-10-19, "* automake.in (handle_merge_targets): Allow
    parallel install with forced relink".
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 50c1d81de9cbabe7a6299599b2c599a0d35208fb
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 16:32:35 2012 +0200

    [ng] dejagnu: remove an obsolete comment
    
    * lib/am/dejagnu.am (check-DEJAGNU): Here.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit d7c525ce7b5eaf4419a5ea85ad7cab54c32aabd3
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 16:04:00 2012 +0200

    [ng] automake: merge '&handle_tests_dejagnu' into '&handle_tests'
    
    * automake.in (handle_tests_dejagnu): This is just a trivial
    one-liner now, so merge it ...
    (handle_tests): ... in here.  And remove a redundant heading
    comment.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 41456cf28af0b6f17c78ab98611a3ec4194a1684
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 15:36:58 2012 +0200

    [ng] all: deps for the 'all' target listed in '$(am.all.targets)'
    
    * automake.in (handle_all_and_check): Drop transform 'ALL-DEPS' when
    processing the 'all-target.am' file.
    (generate_makefile): Define '$(am.all.targets)' as the list of
    dependencies for the 'all' target.
    * lib/am/all-target.am: Use it instead of the transform '%ALL-DEPS%'.
    * t/java.sh: Relax grepping checks to avoid spurious failures.
    * t/amopts-variable-expansion.sh: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 530db90666bb13e80c5570e2b47b527088a9feeb
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 14:52:10 2012 +0200

    [ng] cleanup: drop redundant use of a transform
    
    * lib/am/all-target.am: Use '$(am.config-hdr.local)' directly,
    instead of the '%LOCAL-HEADERS%' transform.
    * automake.in (handle_all_and_check): Drop that transform.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 27bbb0b1ef0a8273b262730263a5f31a39924b0e
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 14:22:56 2012 +0200

    [ng] automake: remove useless code duplication
    
    This is a pure refactoring with no semantic changes intended.
    
    * automake.in (handle_all_and_check, handle_tags): Do not re-calculate
    the list of "local" input or output header files (specified by
    AC_CONFIG_HEADERS in configure.ac); that is already saved in the internal
    make variables '$(am.config-hdr.local)' and '$(am.config-hdr.local.in)'.
    Simply use these variables instead.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 4dea566e9832b4a803ee5f319925e5c892ee8caa
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 14:47:04 2012 +0200

    [ng] vars: list input config headers in an internal make variable as well
    
    This is only a preparatory change in view of future refactorings.
    
    * automake.in (handle_config_headers): Define a new make variable
    'am.config-hdr.local.in'.
    * t/confh-internals.sh: New test.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e35306b40107b333c978a5c484cd3af4a67fc525
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 14:19:00 2012 +0200

    [ng] vars: separate config headers in two vars (local and non-local ones)
    
    Where the "local" are those which are in the same subdirectory of the
    Makefile.am being currently processed, and the "non-local" ones are
    not (and thus need to be prepended with $(top_builddir)).
    
    * automake.in (handle_config_headers): Define two new make variables
    'am.config-hdr.local' and 'am.config-hdr.non-local'.  Accordingly,
    define 'AM_CONFIG_HEADERS' as the union of them.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 021ad59476299c4819a6980a65c6b286e65a51f0
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 14:12:11 2012 +0200

    [ng] automake: move processing of config-header rules in its own function
    
    This is a pure refactoring with no semantic changes intended.  It will
    only be useful for future changes.
    
    * automake.in (handle_configure): Move definition of $(AM_CONF_HEADERS)
    from here ...
    (handle_config_headers): ... to this new function, which will also ensure
    that the $(AM_CONFIG_HEADERS) will always be defined (albeit possibly to
    an empty value).
    (generate_makefile): Call the new variable.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit cd5adbfbbfee8c6b16946250dc151c5ffa67db76
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 12:01:52 2012 +0200

    [ng] check: avoid extra recursive make invocations
    
    After this change, "make check" will not cause any recursive make
    invocation by default (unless there are $(SUBDIRS) to descend into, of
    course).  One little price to pay is that the targets 'check-TESTS',
    'check-DEJAGNU' and 'check-local' will always be defined (being dummy
    by default).  The other one is that the old semantics are not 100%
    preserved, so corner cases that worked in mainline Automake might not
    work anymore out-of-the-box with Automake-NG, thus requiring the user
    to make his dependency declarations more complete or precises.
    We believe these prices are well worth paying.
    
    * lib/am/check-target.am: Rewrite 'check-am' handling to avoid the
    extra make recursion(s).  A side effect of this is that the transform
    '%CHECK-DEPS%' is no more needed.  Accordingly ...
    * automake.in (@check_tests): ... drop definition and updating of this
    variable throughout, and ...
    (handle_all_and_check): ... the definition of the '%CHECK-TESTS%'
    transform when processing the 'check-target.am' file.
    * t/local-targets.sh: Adjust to avoid spurious failures.
    * t/checkall.sh: Remove, it's quite obsolete (and has just started
    to spuriously fail).
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 286a4487155812a21030853547e47a0f1e765747
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 30 11:25:03 2012 +0200

    [ng] check: deps for 'check' target listed in '$(am.test-suite.deps)'
    
    * automake.in (handle_all_and_check, handle_tests): Drop transform
    'CHECK-DEPS' when processing (respectively) the files 'check-target.am'
    and 'parallel-tests.am'.
    (generate_makefile): Define '$(am.test-suite.deps)' as the list of
    dependencies for the 'check' target.
    * lib/am/parallel-tests.am, lib/am/check-target.am: Use it instead
    of the transform '%CHECK-DEPS%'.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                    |    4 +-
 automake.in                    |  119 +++++++++-------------------
 lib/am/all-target.am           |   42 ----------
 lib/am/check-target.am         |   32 --------
 lib/am/common-targets.am       |  168 ++++++++++++++++++++++++++++++++++++++++
 lib/am/dejagnu.am              |    1 -
 lib/am/install.am              |   96 -----------------------
 lib/am/parallel-tests.am       |    2 +-
 t/amopts-variable-expansion.sh |    2 +-
 t/checkall.sh                  |   31 --------
 t/confh-internals.sh           |   73 +++++++++++++++++
 t/java.sh                      |    2 -
 t/local-targets.sh             |    8 +-
 13 files changed, 288 insertions(+), 292 deletions(-)
 delete mode 100644 lib/am/all-target.am
 delete mode 100644 lib/am/check-target.am
 create mode 100644 lib/am/common-targets.am
 delete mode 100644 lib/am/install.am
 delete mode 100755 t/checkall.sh
 create mode 100755 t/confh-internals.sh

diff --git a/Makefile.am b/Makefile.am
index 2cca5d5..58ff9e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -186,8 +186,7 @@ EXTRA_DIST += lib/Automake/Config.in
 
 dist_am_DATA = \
   lib/am/am-dir.am \
-  lib/am/all-target.am \
-  lib/am/check-target.am \
+  lib/am/common-targets.am \
   lib/am/serial-tests.am \
   lib/am/parallel-tests.am \
   lib/am/check-typos.am \
@@ -202,7 +201,6 @@ dist_am_DATA = \
   lib/am/footer.am \
   lib/am/header-vars.am \
   lib/am/header.am \
-  lib/am/install.am \
   lib/am/inst-vars.am \
   lib/am/java.am \
   lib/am/lang-compile.am \
diff --git a/automake.in b/automake.in
index cb3bd66..e3e96a7 100644
--- a/automake.in
+++ b/automake.in
@@ -528,7 +528,6 @@ my @include_stack;
 # List of dependencies for the obvious targets.
 my @all;
 my @check;
-my @check_tests;
 
 # Keys in this hash table are files and directories to delete.  The
 # associated value tells when this should happen (MOSTLY_CLEAN,
@@ -647,7 +646,6 @@ sub initialize_per_input ()
 
     @all = ();
     @check = ();
-    @check_tests = ();
 
     %clean_files = ();
     %clean_dirs = ();
@@ -3182,22 +3180,9 @@ sub handle_data
 # Handle TAGS.
 sub handle_tags
 {
-    my @config;
-    foreach my $spec (@config_headers)
-      {
-        my ($out, @ins) = split_config_file_spec ($spec);
-       foreach my $in (@ins)
-         {
-            # If the config header source is in this directory,
-           # require it.
-           push @config, basename ($in)
-              if $relative_dir eq dirname ($in);
-          }
-      }
-
     define_variable ('am__tagged_files', INTERNAL,
-                     qw/$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)/,
-                     @config);
+                     qw/$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+                        $(am.config-hdr.local.in)/);
 
     if (rvar('am__tagged_files')->value_as_list_recursive
           || var ('ETAGS_ARGS') || var ('SUBDIRS'))
@@ -3558,7 +3543,32 @@ sub rewrite_inputs_into_dependencies ($@)
   return @res;
 }
 
-
+sub handle_config_headers ()
+{
+  my (@config_h_local, @config_h_nonlocal, @config_hin_local);
+  foreach my $spec (@config_headers)
+    {
+      my ($out, @ins) = split_config_file_spec ($spec);
+      if ($relative_dir eq dirname ($out))
+       {
+         push @config_h_local, basename ($out);
+       }
+      else
+       {
+         push @config_h_nonlocal, "\$(top_builddir)/$out";
+       }
+      foreach my $in (@ins)
+        {
+         push @config_hin_local, '$(srcdir)/' . basename ($in)
+            if $relative_dir eq dirname ($in);
+        }
+    }
+  define_variable ('am.config-hdr.local', INTERNAL, @config_h_local);
+  define_variable ('am.config-hdr.non-local', INTERNAL, @config_h_nonlocal);
+  define_variable ('am.config-hdr.local.in',  INTERNAL, @config_hin_local);
+  define_variable ('AM_CONFIG_HEADERS', INTERNAL,
+                   qw/$(am.config-hdr.local) $(am.config-hdr.non-local)/);
+}
 
 # &handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS)
 # ------------------------------------------------------------------
@@ -3660,22 +3670,6 @@ sub handle_configure ($$$@)
        }
     }
 
-  my @config_h;
-  foreach my $spec (@config_headers)
-    {
-      my ($out, @ins) = split_config_file_spec ($spec);
-      if ($relative_dir eq dirname ($out))
-       {
-         push @config_h, basename ($out);
-       }
-      else
-       {
-         push @config_h, "\$(top_builddir)/$out";
-       }
-    }
-  define_variable ("AM_CONFIG_HEADERS", INTERNAL, @config_h)
-    if @config_h;
-
   # Now look for other files in this directory which must be remade
   # by config.status, and generate rules for them.
   my @actual_other_files = ();
@@ -3890,26 +3884,6 @@ sub handle_footer
   $output_trailer .= file_contents ('footer', new Automake::Location);
 }
 
-# Generate "make all" and "make check" rules.
-sub handle_all_and_check ()
-{
-  my @local_headers = ();
-  foreach my $spec (@config_headers)
-    {
-      my ($out, @ins) = split_config_file_spec ($spec);
-      push (@local_headers, basename ($out))
-        if dirname ($out) eq $relative_dir;
-    }
-
-  almost_verbatim ('all-target',
-                   'ALL-DEPS' => "@all",
-                   'LOCAL-HEADERS' => "@local_headers");
-
-  almost_verbatim ('check-target',
-                   'CHECK-DEPS' => "@check",
-                   'CHECK-TESTS' => "@check_tests");
-}
-
 # Generate helper targets for user recursion, where needed.
 sub handle_user_recursion ()
 {
@@ -4074,21 +4048,11 @@ sub handle_factored_dependencies
     }
 }
 
-
-# &handle_tests_dejagnu ()
-# ------------------------
-sub handle_tests_dejagnu
-{
-    push (@check_tests, 'check-DEJAGNU');
-    $output_rules .= file_contents ('dejagnu', new Automake::Location);
-}
-
-# Handle TESTS variable and other checks.
 sub handle_tests
 {
   if (option 'dejagnu')
     {
-      &handle_tests_dejagnu;
+      $output_rules .= file_contents ('dejagnu', new Automake::Location);
     }
   else
     {
@@ -4101,7 +4065,6 @@ sub handle_tests
 
   if (var ('TESTS'))
     {
-      push (@check_tests, 'check-TESTS');
       almost_verbatim ('color-tests');
       if (option 'serial-tests')
         {
@@ -4110,7 +4073,7 @@ sub handle_tests
       else
         {
           require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
-          almost_verbatim ('parallel-tests', 'CHECK-DEPS' => "@check");
+          almost_verbatim ('parallel-tests');
        }
     }
 }
@@ -6871,6 +6834,7 @@ sub generate_makefile ($$)
 
   almost_verbatim ('am-dir');
 
+  handle_config_headers;
   handle_configure ($makefile_am, $makefile_in, $makefile, @inputs);
   handle_gettext;
   handle_libraries;
@@ -6910,26 +6874,21 @@ sub generate_makefile ($$)
   define_variable 'am.all-progs',  INTERNAL, sort keys %known_programs;
   define_variable 'am.all-libs',   INTERNAL, sort keys %known_libraries;
   define_variable 'am.all-ltlibs', INTERNAL, sort keys %known_ltlibraries;
+  # Must come after invocation of several of the 'handle_*' functions
+  # above, which can declare additional dependencies for the 'check'
+  # and 'all' target.
+  define_variable ('am.all.targets', INTERNAL, @all);
+  define_variable ('am.test-suite.deps', INTERNAL, @check);
   handle_tests;
 
   # This must come after most other rules.
   handle_dist;
 
   handle_footer;
-  # Special targets "all" and "check".
-  handle_all_and_check;
-
-  # FIXME: Gross!
-  if (var ('lib_LTLIBRARIES') && var ('bin_PROGRAMS'))
-    {
-      $output_rules .= "install-binPROGRAMS: install-libLTLIBRARIES\n\n";
-    }
-  if (var ('nobase_lib_LTLIBRARIES') && var ('bin_PROGRAMS'))
-    {
-      $output_rules .= "install-binPROGRAMS: 
install-nobase_libLTLIBRARIES\n\n";
-    }
+  # Special targets 'all', 'check' and 'install', handling of
+  # $(BUILT_SOURCES), and related stuff.
+  almost_verbatim ('common-targets');
 
-  almost_verbatim ('install');
   handle_clean ($makefile);
   handle_factored_dependencies;
 
diff --git a/lib/am/all-target.am b/lib/am/all-target.am
deleted file mode 100644
index e307d5d..0000000
--- a/lib/am/all-target.am
+++ /dev/null
@@ -1,42 +0,0 @@
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2012 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
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-## The 'all' target.
-
-.PHONY: all all-am all-local
-ifdef SUBDIRS
-.PHONY: all-recursive
-endif
-
-# We need to make sure $(BUILT_SOURCES) files are built before
-# any "ordinary" target (all, check, install, ...) is run.
-# Ditto for config.h (or files specified in AC_CONFIG_HEADERS).
-# But of course, we shouldn't attempt to build any of them when
-# running in dry mode.
-am.built-early = %LOCAL-HEADERS% $(BUILT_SOURCES)
-ifeq ($(am.make.dry-run),true)
-# A trick to make the "make -n" output more useful, albeit not
-# completely accurate.
-all check install: | $(am.built-early)
-else
-$(foreach x,$(am.built-early),$(eval -include .am/built-sources/$(x)))
-.am/built-sources/%: | %
-       @$(am__ensure_target_dir_exists)
-       @touch $@
-endif
-
-all-am: all-local %ALL-DEPS%
-all: $(if $(SUBDIRS),all-recursive,all-am)
diff --git a/lib/am/check-target.am b/lib/am/check-target.am
deleted file mode 100644
index 225c566..0000000
--- a/lib/am/check-target.am
+++ /dev/null
@@ -1,32 +0,0 @@
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2012 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
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-## The 'check' target.
-
-.PHONY: check check-am check-local
-ifdef SUBDIRS
-.PHONY: check-recursive
-endif
-
-# The check target must depend on the local equivalent of 'all', to
-# ensure all the primary targets are built; then it must build the
-# local check dependencies, and finally run the actual tests (as given
-# by $(TESTS), by DejaGNU, and by the 'check-local' target).
-check-am: all-am
-       $(if %CHECK-DEPS%,$(MAKE) %CHECK-DEPS%,@:)
-       $(MAKE) %CHECK-TESTS% check-local
-
-check: $(if $(SUBDIRS),check-recursive,check-am)
diff --git a/lib/am/common-targets.am b/lib/am/common-targets.am
new file mode 100644
index 0000000..772c340
--- /dev/null
+++ b/lib/am/common-targets.am
@@ -0,0 +1,168 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 2001-2012 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
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+## Handle our "flagship" targets 'all', 'install' and 'check', as
+## well as timely creation of config headers and $(BUILT_SOURCES).
+
+# ------------------- #
+#  The 'all' target.  #
+# ------------------- #
+
+.PHONY: all all-am all-local
+ifdef SUBDIRS
+.PHONY: all-recursive
+endif
+
+all-am: all-local $(am.all.targets)
+all: $(if $(SUBDIRS),all-recursive,all-am)
+
+# --------------------- #
+#  The 'check' target.  #
+# --------------------- #
+
+.PHONY: check check-am check-local
+ifdef SUBDIRS
+.PHONY: check-recursive
+endif
+
+# The check target must depend on the local equivalent of 'all', to
+# ensure all the primary targets are built; then it must build the
+# local check dependencies, and finally run the actual tests (as given
+# by $(TESTS), by DejaGNU, and by the 'check-local' target).
+am.test-suite.check-targets = check-DEJAGNU check-TESTS check-local
+.PHONY: $(am.test-suite.check-targets)
+check-am: $(am.test-suite.check-targets)
+$(am.test-suite.check-targets): all-am $(am.test-suite.deps)
+
+check: $(if $(SUBDIRS),check-recursive,check-am)
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+## ----------------------------------------- ##
+## installdirs -- Creating the installdirs.  ##
+## ----------------------------------------- ##
+
+.PHONY: installdirs installdirs-local
+ifdef SUBDIRS
+.PHONY: installdirs-am
+RECURSIVE_TARGETS += installdirs-recursive
+installdirs: installdirs-recursive
+endif
+
+$(if $(SUBDIRS),installdirs-am,installdirs): installdirs-local
+ifdef am__installdirs
+# The reason we loop over $(am__installdirs), instead of simply running
+# "$(MKDIR_P) $(am__installdirs), is that directories variable such as
+# "$(DESTDIR)$(mydir)" can potentially expand to "" if $(mydir) is
+# conditionally defined.  BTW,  directories in $(am__installdirs) are
+# already quoted in order to support installation paths with spaces.
+       for dir in $(am__installdirs); do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+endif
+
+# ------------------ #
+#  Install targets.  #
+# ------------------ #
+
+.PHONY: install install-exec install-data uninstall
+.PHONY: install-exec-am install-data-am uninstall-am
+
+ifdef SUBDIRS
+RECURSIVE_TARGETS += install-data-recursive install-exec-recursive
+RECURSIVE_TARGETS += install-recursive uninstall-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+else
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+endif
+
+install: $(if $(SUBDIRS),install-recursive,install-am)
+
+.PHONY: install-am
+install-am: all-am
+       @$(MAKE) install-exec-am install-data-am
+
+
+.PHONY: installcheck
+ifdef SUBDIRS
+installcheck: installcheck-recursive
+else
+installcheck: installcheck-am
+.PHONY: installcheck-am
+installcheck-am:
+endif
+
+## 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
+## Beware that there are two variables used to install programs:
+##   INSTALL_PROGRAM is used for ordinary *_PROGRAMS
+##   install_sh_PROGRAM is used for nobase_*_PROGRAMS (because install-sh
+##                                                     creates directories)
+## It's OK to override both with INSTALL_STRIP_PROGRAM, because
+## INSTALL_STRIP_PROGRAM uses install-sh (see m4/strip.m4 for a rationale).
+##
+## Use double quotes for the *_PROGRAM settings because we might need to
+## interpolate some backquotes at runtime.
+##
+## The case for empty $(STRIP) is separate so that it is quoted correctly for
+## multiple words, but does not expand to an empty words if STRIP is empty.
+install-strip:
+       $(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+               install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+               INSTALL_STRIP_FLAG=-s \
+               $(if $(STRIP),"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'") \
+               install
+
+# Allow parallel install with forced relink.  See commit Automake bd4a1d5
+# of 2000-10-19 for a little more background.
+# FIXME: this is gross, and is debatable how useful and/or needed this
+# workaround still is today.  This is something that should be eventually
+# discussed with the Libtool guys.
+ifdef bin_PROGRAMS
+  ifdef lib_LTLIBRARIES
+    install-binPROGRAMS: install-libLTLIBRARIES
+  endif
+  ifdef nobase_lib_LTLIBRARIES
+    install-binPROGRAMS: install-nobase_libLTLIBRARIES
+  endif
+endif
+
+# -------------------------------------- #
+#  $(BUILT_SOURCES) and config headers.  #
+# -------------------------------------- #
+
+# We need to make sure $(BUILT_SOURCES) files are built before
+# any "ordinary" target (all, check, install, ...) is run.
+# Ditto for config.h (or files specified in AC_CONFIG_HEADERS).
+# But of course, we shouldn't attempt to build any of them when
+# running in dry mode.
+am.built-early = $(am.config-hdr.local) $(BUILT_SOURCES)
+ifeq ($(am.make.dry-run),true)
+# A trick to make the "make -n" output more useful, albeit not
+# completely accurate.
+all check install: | $(am.built-early)
+else
+$(foreach x,$(am.built-early),$(eval -include .am/built-sources/$(x)))
+.am/built-sources/%: | %
+       @$(am__ensure_target_dir_exists)
+       @touch $@
+endif
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index 8c8733d..cb5e8a3 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -26,7 +26,6 @@ RUNTEST = runtest
 
 .PHONY: check-DEJAGNU
 check-DEJAGNU: site.exp
-## Life is easiest with an absolute srcdir, so do that.
        srcdir='$(srcdir)'; export srcdir; \
        EXPECT=$(EXPECT); export EXPECT; \
 ## If runtest can't be found, print a warning but don't die.  It is
diff --git a/lib/am/install.am b/lib/am/install.am
deleted file mode 100644
index 1972905..0000000
--- a/lib/am/install.am
+++ /dev/null
@@ -1,96 +0,0 @@
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001-2012 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
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-## ----------------------------------------- ##
-## installdirs -- Creating the installdirs.  ##
-## ----------------------------------------- ##
-
-.PHONY: installdirs installdirs-local
-ifdef SUBDIRS
-.PHONY: installdirs-am
-RECURSIVE_TARGETS += installdirs-recursive
-installdirs: installdirs-recursive
-endif
-
-$(if $(SUBDIRS),installdirs-am,installdirs): installdirs-local
-ifdef am__installdirs
-## The reason we loop over $(am__installdirs), instead of simply running
-## "$(MKDIR_P) $(am__installdirs), is that directories variable such as
-## "$(DESTDIR)$(mydir)" can potentially expand to "" if $(mydir) is
-## conditionally defined.  BTW, those directories are quoted in order
-## to support installation paths with spaces.
-       for dir in $(am__installdirs); do \
-         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-       done
-endif
-
-## ----------------- ##
-## Install targets.  ##
-## ----------------- ##
-
-.PHONY: install install-exec install-data uninstall
-.PHONY: install-exec-am install-data-am uninstall-am
-
-ifdef SUBDIRS
-RECURSIVE_TARGETS += install-data-recursive install-exec-recursive
-RECURSIVE_TARGETS += install-recursive uninstall-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-else
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-endif
-
-install: $(if $(SUBDIRS),install-recursive,install-am)
-
-.PHONY: install-am
-install-am: all-am
-       @$(MAKE) install-exec-am install-data-am
-
-
-.PHONY: installcheck
-ifdef SUBDIRS
-installcheck: installcheck-recursive
-else
-installcheck: installcheck-am
-.PHONY: installcheck-am
-installcheck-am:
-endif
-
-## 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
-## Beware that there are two variables used to install programs:
-##   INSTALL_PROGRAM is used for ordinary *_PROGRAMS
-##   install_sh_PROGRAM is used for nobase_*_PROGRAMS (because install-sh
-##                                                     creates directories)
-## It's OK to override both with INSTALL_STRIP_PROGRAM, because
-## INSTALL_STRIP_PROGRAM uses install-sh (see m4/strip.m4 for a rationale).
-##
-## Use double quotes for the *_PROGRAM settings because we might need to
-## interpolate some backquotes at runtime.
-##
-## The case for empty $(STRIP) is separate so that it is quoted correctly for
-## multiple words, but does not expand to an empty words if STRIP is empty.
-install-strip:
-       $(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-               install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-               INSTALL_STRIP_FLAG=-s \
-               $(if $(STRIP),"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'") \
-               install
diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index 116d178..5297c67 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -439,7 +439,7 @@ endif
 
 # Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
 # It must also depend on the 'all' target.  See automake bug#11252.
-recheck: all %CHECK-DEPS%
+recheck: all $(am.test-suite.deps)
        +$(am.setup-test-harness-workdir)
 ## See comments above in the check-TESTS recipe for why remove
 ## $(TEST_SUITE_LOG) here.
diff --git a/t/amopts-variable-expansion.sh b/t/amopts-variable-expansion.sh
index 830373a..a11f576 100755
--- a/t/amopts-variable-expansion.sh
+++ b/t/amopts-variable-expansion.sh
@@ -57,6 +57,6 @@ AUTOMAKE_run
 grep '^Makefile\.am:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr
 grep README stderr && exit 1
 $EGREP '(install|override)' stderr && exit 1
-$EGREP 'distdir|\.tar' Makefile.in && exit 1
+$EGREP 'distdir|\.tar[ .]' Makefile.in && exit 1
 
 :
diff --git a/t/checkall.sh b/t/checkall.sh
deleted file mode 100755
index 4320574..0000000
--- a/t/checkall.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-# Copyright (C) 1996-2012 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test for bug where check target doesn't depend on all.
-
-. ./defs || exit 1
-
-cat > Makefile.am << 'END'
-bin_SCRIPTS = derived
-check-local:
-       true
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-grep '^check-am:.*all-am' Makefile.in
-grep 'MAKE.*check-local' Makefile.in
diff --git a/t/confh-internals.sh b/t/confh-internals.sh
new file mode 100755
index 0000000..eca43b7
--- /dev/null
+++ b/t/confh-internals.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+# Copyright (C) 2003-2012 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check internal make variable populated from AC_CONFIG_HEADERS calls.
+
+. ./defs || exit 1
+
+cat >>configure.ac <<'EOF'
+AC_SUBST([BOT], [bot])
+AC_CONFIG_HEADERS([defs.h config.h:sub1/config.top:sub2/config.${BOT}],,
+                  [BOT=$BOT])
+AC_CONFIG_HEADERS([sub0/CFG.h:sub0/CFG-H.in])
+AC_CONFIG_FILES([sub0/Makefile])
+AC_OUTPUT
+EOF
+
+mkdir sub0 sub1 sub2
+
+echo TOP > sub1/config.top
+echo BOT > sub2/config.bot
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub0
+.PHONY: test-vapth test-intree
+test-intree:
+       is $(am.config-hdr.local) == defs.h config.h
+       is $(am.config-hdr.local.in) == ./defs.h.in
+test-vpath:
+       is $(am.config-hdr.local) == defs.h config.h
+       is $(am.config-hdr.local.in) == ../defs.h.in
+END
+
+cat > sub0/Makefile.am << 'END'
+.PHONY: test-vapth test-intree
+test-intree:
+       is $(am.config-hdr.local) == CFG.h
+       is $(am.config-hdr.local.in) == ../sub0/CFG-H.in
+test-vpath:
+       is $(am.config-hdr.local) == CFG.h
+       is $(am.config-hdr.local.in) == ../../sub0/CFG-H.in
+END
+
+: > sub0/CFG-H.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOHEADER
+test -f defs.h.in
+$AUTOMAKE
+
+./configure
+$MAKE test-intree
+$MAKE distclean
+mkdir build
+cd build
+../configure
+$MAKE test-vpath
+$MAKE distcleancheck
+
+:
diff --git a/t/java.sh b/t/java.sh
index 0103eea..631f98b 100755
--- a/t/java.sh
+++ b/t/java.sh
@@ -33,8 +33,6 @@ $AUTOCONF
 $AUTOMAKE
 
 $EGREP '\.stamp|class' Makefile.in # For debugging.
-grep '^all[-a-z]*:.*classjava\.stamp' Makefile.in
-test $(grep -c '^all[-a-z]*:.*classjava\.stamp' Makefile.in) -eq 1
 
 echo 'class a { }' > a.java
 echo 'class b { }' > b.java
diff --git a/t/local-targets.sh b/t/local-targets.sh
index d15bc80..d7db7d4 100755
--- a/t/local-targets.sh
+++ b/t/local-targets.sh
@@ -28,17 +28,19 @@ END
 
 cat > Makefile.am <<'END'
 @SafeInclude@ ./inc.mk
-$(foreach x,all check installdirs,$(eval $(x)-local:: ; : > main-$(x)))
+$(foreach x,all check installdirs,$(eval $(x)-local: ; : > main-$(x)))
 END
 
 cat > inc.mk << 'END'
-all-local check-local installdirs-local:: %-local:
+all-local check-local installdirs-local: %-local: %-incl
+all-incl check-incl installdirs-incl: %-incl:
        : > incl-$*
 END
 
 cat > GNUmakefile << 'END'
 include ./Makefile
-all-local check-local installdirs-local:: %-local:
+all-local check-local installdirs-local: %-local: %-wrap
+all-wrap check-wrap installdirs-wrap: %-wrap:
        : > wrap-$*
 END
 


hooks/post-receive
-- 
GNU Automake



reply via email to

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