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-614-g13333d9
Date: Tue, 24 Jul 2012 16:50:22 +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=13333d938e6cc581dd6fd5e5ea32aa2d0ffeb7f3

The branch, ng/master has been updated
       via  13333d938e6cc581dd6fd5e5ea32aa2d0ffeb7f3 (commit)
       via  0b65ef4705cd4ca74c6a04ffc07c7fc2acbb298d (commit)
       via  a41c49dac4b93c9d102127a59393c7c54c15938f (commit)
       via  62558c73a5477adda8a377e3643e26075f0b91e3 (commit)
       via  7f6cbbeff5a6ac623b9dacc686c04633d5691858 (commit)
       via  79c9235d8c56b30e5062ed229a0cd69e09a637a3 (commit)
       via  747818be527c8a8361ee405743a808a576b93f7f (commit)
       via  e57a13194e53d76c1ad1e89109e557a195310146 (commit)
      from  de6ada3bce58df26febf1c6dcf367ced791dd03c (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 13333d938e6cc581dd6fd5e5ea32aa2d0ffeb7f3
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 16:38:22 2012 +0200

    [ng] rename: am__memoized_value/* -> am.memoize.value/*
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 0b65ef4705cd4ca74c6a04ffc07c7fc2acbb298d
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 16:36:34 2012 +0200

    [ng] cosmetics: move a variable definition
    
    * lib/am/header-vars.am (am.chars.empty): This, move earlier.  This both
    fixes the associated comments (which referred to a variable defined above
    it as "defined below"), and ensures that this variable is not used before
    being defined (not a big deal in practice, since it expands to empty; but
    better be consistent).
    
    Reported by Akim Demaille.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit a41c49dac4b93c9d102127a59393c7c54c15938f
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 15:52:38 2012 +0200

    [ng] tests: run two slow tests earlier, for better "make -j" performance
    
    * Makefile.am (long_running_TESTS): Add 't/parallel-tests-many.sh' and
    't/dist-many.sh', which are slooow.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 62558c73a5477adda8a377e3643e26075f0b91e3
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 15:23:08 2012 +0200

    [ng] vars: names of iterating vars in $(foreach) loops shorter & simpler
    
    In GNU make, after a "$(foreach x,...)" loop, the make variable $(x):
    
      - is restored to its original variable it had before the 'foreach'
        loop, if it was already set;
    
      - re-unset otherwise.
    
    This behaviour is checked by the recent spy test 't/spy-foreach.sh'.
    
    This means that, in most situations, there's no actual need to use
    a "namespace safe" variable name for the iterating variable in a
    "$(foreach ...)" loop, because that variable won't linger in the
    environment after the loop anyway.
    
    * lib/am/compile.am, lib/am/header-vars.am, lib/am/parallel-tests.am,
    lib/am/serial-tests.am: Adjust to use simpler variables names in their
    foreach loops; for example, simply 'v' instead of 'am__v', etc.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 7f6cbbeff5a6ac623b9dacc686c04633d5691858
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 15:05:14 2012 +0200

    [ng] spy: iteration variables in "$(foreach ...)" loops are temporary
    
    * t/spy-foreach.sh: New test.  Check that, after a "$(foreach x,...)"
    loop, the make variable $(x) is:
      - restored to the original variable it had before the 'foreach'
        loop, if it was already set; and
      - is re-unset otherwise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 79c9235d8c56b30e5062ed229a0cd69e09a637a3
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 14:34:58 2012 +0200

    [ng] rename: .am.* -> am.*
    
    This is the complete list of renames done in this patch:
    
        .am.clean-cmd.f  ->  am.clean-cmd.f
        .am.clean-cmd.d  ->  am.clean-cmd.d
        .am.rm-f         ->  am.rm-f
        .am.rm-rf        ->  am.rm-rf
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 747818be527c8a8361ee405743a808a576b93f7f
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 12:00:02 2012 +0200

    [ng] rename: am__memoize -> am.memoize
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit e57a13194e53d76c1ad1e89109e557a195310146
Author: Stefano Lattarini <address@hidden>
Date:   Tue Jul 24 11:58:33 2012 +0200

    [ng] rename: am__newline -> am.chars.newline
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 Makefile.am                           |    2 +
 lib/am/clean.am                       |   16 ++++++------
 lib/am/compile.am                     |    6 ++--
 lib/am/distdir.am                     |   14 +++++-----
 lib/am/header-vars.am                 |   34 ++++++++++++++--------------
 lib/am/parallel-tests.am              |   20 ++++++++--------
 lib/am/serial-tests.am                |    2 +-
 t/am-xargs-map.sh                     |    4 +-
 t/internals.tap                       |   12 +++++-----
 t/memoize.tap                         |   40 ++++++++++++++++----------------
 t/{spy-wildcard.sh => spy-foreach.sh} |   25 +++++++++++---------
 11 files changed, 90 insertions(+), 85 deletions(-)
 copy t/{spy-wildcard.sh => spy-foreach.sh} (60%)

diff --git a/Makefile.am b/Makefile.am
index f4783c6..51258cc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -312,6 +312,8 @@ all_TESTS = \
 # useful when running the testsuite in parallel on multicore machines.
 # Here too we assume that the autogenerated tests are placed in $(srcdir).
 long_running_TESTS = \
+  $(srcdir)/t/dist-many.sh \
+  $(srcdir)/t/parallel-tests-many.sh \
   $(srcdir)/t/add-missing.tap \
   $(srcdir)/t/instspc.tap \
   $(wildcard $(srcdir)/t/depcomp-*.tap) \
diff --git a/lib/am/clean.am b/lib/am/clean.am
index bc043e4..24d9587 100644
--- a/lib/am/clean.am
+++ b/lib/am/clean.am
@@ -40,23 +40,23 @@ am__maintclean_files += $(BUILT_SOURCES)
 
 mostlyclean-am: mostlyclean-generic
 mostlyclean-generic:
-       $(call .am.clean-cmd.f,$(am__mostlyclean_files))
-       $(call .am.clean-cmd.d,$(am__mostlyclean_dirs))
+       $(call am.clean-cmd.f,$(am__mostlyclean_files))
+       $(call am.clean-cmd.d,$(am__mostlyclean_dirs))
 
 clean-am: clean-generic mostlyclean-am
 clean-generic:
-       $(call .am.clean-cmd.f,$(am__clean_files))
-       $(call .am.clean-cmd.d,$(am__clean_dirs))
+       $(call am.clean-cmd.f,$(am__clean_files))
+       $(call am.clean-cmd.d,$(am__clean_dirs))
 
 distclean-am: distclean-generic clean-am
 distclean-generic:
-       $(call .am.clean-cmd.f,$(am__distclean_files))
-       $(call .am.clean-cmd.d,$(am__distclean_dirs))
+       $(call am.clean-cmd.f,$(am__distclean_files))
+       $(call am.clean-cmd.d,$(am__distclean_dirs))
 
 maintainer-clean-am: maintainer-clean-generic distclean-am
 maintainer-clean-generic:
-       $(call .am.clean-cmd.f,$(am__maintclean_files))
-       $(call .am.clean-cmd.d,$(am__maintclean_dirs))
+       $(call am.clean-cmd.f,$(am__maintclean_files))
+       $(call am.clean-cmd.d,$(am__maintclean_dirs))
 
 ## Makefiles and their dependencies cannot be cleaned by
 ## an '-am' dependency, because that would prevent other distclean
diff --git a/lib/am/compile.am b/lib/am/compile.am
index ce235c0..af96a3c 100644
--- a/lib/am/compile.am
+++ b/lib/am/compile.am
@@ -16,13 +16,13 @@
 
 if %?STDINC%
 AM_DEFAULT_INCLUDES = \
-  $(call am__memoize,AM_DEFAULT_INCLUDES,$(strip \
+  $(call am.memoize,AM_DEFAULT_INCLUDES,$(strip \
 ## We want '-I. -I$(srcdir)', but the latter -I is redundant and
 ## unaesthetic in non-VPATH builds, so get rid of it if it is not
 ## actually needed.
     $(call am.util.uniq, -I. -I$(srcdir) \
-      $(foreach am__h, $(AM_CONFIG_HEADERS), \
-        $(patsubst %/,%,-I$(dir $(am__h)))))))
+      $(foreach h, $(AM_CONFIG_HEADERS), \
+        $(patsubst %/,%,-I$(dir $h))))))
 else !%?STDINC%
 AM_DEFAULT_INCLUDES =
 endif !%?STDINC%
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index d16cc1d..2312fd4 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -18,17 +18,17 @@ am.dist.common-files += %DIST-COMMON%
 
 ## Use 'sort', not 'am.util.uniq', for performance reasons.  Luckily, we
 ## don't care in which order the distributed files are.
-am.dist.all-files = $(call am__memoize,am.dist.all-files,$(strip $(sort \
+am.dist.all-files = $(call am.memoize,am.dist.all-files,$(strip $(sort \
   $(am.dist.common-files) $(am.dist.sources) $(TEXINFOS) $(EXTRA_DIST))))
 
 ## Try to avoid repeated slashes in the entries, to make the filtering
 ## in the 'am.dist.files-tmp2' definition below more reliable.
 ## This idiom should compress up to four consecutive '/' characters
 ## in each $(am.dist.all-files) entry.
-am.dist.files-tmp1 = $(call am__memoize,am.dist.files-tmp1, \
+am.dist.files-tmp1 = $(call am.memoize,am.dist.files-tmp1, \
   $(subst //,/,$(subst //,/,$(am.dist.all-files))))
 
-am.dist.files-tmp2 = $(call am__memoize,am.dist.files-tmp2, \
+am.dist.files-tmp2 = $(call am.memoize,am.dist.files-tmp2, \
 ## Files filtered out here require an ad-hoc "munging"; see the two
 ## following 'patsubst's.
   $(filter-out $(srcdir)/% $(top_srcdir)/%, $(am.dist.files-tmp1)) \
@@ -55,7 +55,7 @@ am.dist.files-tmp2 = $(call am__memoize,am.dist.files-tmp2, \
 
 ## Strip extra whitespaces, for more safety.
 am.dist.files-cooked = \
-  $(call am__memoize,am.dist.files-cooked,$(strip $(am.dist.files-tmp2)))
+  $(call am.memoize,am.dist.files-cooked,$(strip $(am.dist.files-tmp2)))
 
 ## Given the pre-processing done above to the list of distributed files,
 ## this definition ensures that we won't try to create the wrong
@@ -66,14 +66,14 @@ am.dist.files-cooked = \
 ## "$(distdir)/$(srcdir)/subdir" -- which, in a VPATH build where
 ## "$(subdir) = ..", would be the build directory!
 am.dist.parent-dirs = \
-  $(call am__memoize,am.dist.parent-dirs,$(strip $(sort \
+  $(call am.memoize,am.dist.parent-dirs,$(strip $(sort \
     $(filter-out ., $(patsubst ./%,%,$(dir $(am.dist.files-cooked)))))))
 
 am.mkdir-for-dist = \
-  @$(MKDIR_P) $(patsubst %,"$(distdir)"/%,$1)$(am__newline)
+  @$(MKDIR_P) $(patsubst %,"$(distdir)"/%,$1)$(am.chars.newline)
 am.write-list-of-distfiles = \
   @lst='$1'; for x in $$lst; do echo $$x; done \
-    >> $(am__dir)/address@hidden(am__newline)
+    >> $(am__dir)/address@hidden(am.chars.newline)
 
 if %?TOPDIR_P%
 distdir = $(PACKAGE)-$(VERSION)
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 6efad03..52457ea 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -50,9 +50,14 @@ am.chars.dquote := "
 am.chars.squote := '
 # "` # Fix font-lock.
 
+# An empty string.  It can be very useful to "fool" the make parser w.r.t.
+# whitespace handling, and allow us to obtain tricky semantics.  See the
+# definition of $(am.chars.newline) just below for a significant example.
+am.chars.empty :=
+
 # A literal newline character, that does not get stripped if used
 # at the end of the expansion of another macro.
-define am__newline
+define am.chars.newline
 
 $(am.chars.empty)
 endef
@@ -138,16 +143,11 @@ am.vpath.rewrite = \
 ## hack with $(subst \ , ...).
 am.make.dry-run := \
   $(strip $(if $(strip \
-    $(foreach am__v, $(subst \ ,,$(strip $(MAKEFLAGS))), \
-      $(if $(or $(findstring =,$(am__v)),$(filter --%,$(am__v))),, \
-        $(findstring n,$(am__v))))), \
+    $(foreach v, $(subst \ ,,$(strip $(MAKEFLAGS))), \
+      $(if $(or $(findstring =,$v),$(filter --%,$v)),, \
+        $(findstring n,$v)))), \
     true, false))
 
-# An empty string.  It can be very useful to "fool" the make parser w.r.t.
-# whitespace handling, and allow us to obtain tricky semantics.  See the
-# definition of $(am__newline) below for a significant example.
-am.chars.empty :=
-
 am.util.strip-first-word = $(wordlist 2,$(words $(1)),$(1))
 am.util.strip-last-word  = $(wordlist 2,$(words $(1)),dummy $(1))
 
@@ -229,8 +229,8 @@ am.util.canon = $(strip \
 ## we can't afford to re-calculate it over and over every time the
 ## variable gets expanded.  Example of usage:
 ##
-##   var1 = $(am__memoize,var1,$(shell EXPENSIVE-COMMAND-LINE))
-##   var2 = $(am__memoize,var2,$(sort VERY-LONG-LIST))
+##   var1 = $(am.memoize,var1,$(shell EXPENSIVE-COMMAND-LINE))
+##   var2 = $(am.memoize,var2,$(sort VERY-LONG-LIST))
 ##
 ## This API and implementation seems to work around a bug in GNU make
 ## (present up to and including version 3.82) which caused our first
@@ -241,8 +241,8 @@ am.util.canon = $(strip \
 ##
 ## So please don't change this without a very good reason.
 ##
-am__memoize = $(or $(am__memoized_value/$1),$(strip \
-  $(eval am__memoized_value/$1 := $$2))$(am__memoized_value/$1))
+am.memoize = $(or $(am.memoize.value/$1),$(strip \
+  $(eval am.memoize.value/$1 := $$2))$(am.memoize.value/$1))
 
 ## $(call am.util.strip-suffixes, SUFFIXES, LIST)
 ## ----------------------------------------------
@@ -295,11 +295,11 @@ $(if $2,$(strip \
   )$(if $($0.counter),$(call $1,$(strip $($0.partial-args)))))
 endef
 
-.am.rm-f = $(if $(strip $1),rm -f $(strip $1)$(am__newline))
-.am.rm-rf = $(if $(strip $1),rm -rf $(strip $1)$(am__newline))
+am.rm-f = $(if $(strip $1),rm -f $(strip $1)$(am.chars.newline))
+am.rm-rf = $(if $(strip $1),rm -rf $(strip $1)$(am.chars.newline))
 
-.am.clean-cmd.f = $(call am.xargs-map,.am.rm-f,$1)
-.am.clean-cmd.d = $(call am.xargs-map,.am.rm-rf,$1)
+am.clean-cmd.f = $(call am.xargs-map,am.rm-f,$1)
+am.clean-cmd.d = $(call am.xargs-map,am.rm-rf,$1)
 
 ## Some derived variables that have been found to be useful.
 pkgdatadir = $(datadir)/@PACKAGE@
diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index 59276c0..a318281 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -87,10 +87,10 @@ am__tpfx = \
 ## FIXME: this will pick up the default from the environment; are we sure
 ## FIXME: we want that?
 !TEST_EXTENSIONS ?= .test
-!$(foreach am__e,$(filter-out .%,$(TEST_EXTENSIONS)),\
-!     $(call am.error,invalid test extension: '$(am__e)'))
-!$(foreach am__e,$(TEST_EXTENSIONS), \
-!  $(eval $(call am__handle_per_suffix_test,$(am__e))))
+!$(foreach e,$(filter-out .%,$(TEST_EXTENSIONS)),\
+!     $(call am.error,invalid test extension: '$e'))
+!$(foreach e,$(TEST_EXTENSIONS), \
+!  $(eval $(call am__handle_per_suffix_test,$e)))
 ## It is *imperative* that the "empty" suffix goes last.  Otherwise, a
 ## declaration like "TESTS = all.test" would cause GNU make to mistakenly
 ## try to build the 'all.log' and 'all.trs' files from a non-existent
@@ -303,17 +303,17 @@ am__rst_title = { sed 's/.*/   &   /;h;s/./=/g;p;x;s/ 
*$$//;p;g' && echo; }
 
 # This supports runtime overriding of $(TESTS) and $(XFAIL_TESTS).
 !am__test_bases ?= \
-!  $(call am__memoize,am__test_bases,$(call am__get_test_bases,$(TESTS)))
+!  $(call am.memoize,am__test_bases,$(call am__get_test_bases,$(TESTS)))
 am__xfail_test_bases = \
-  $(call am__memoize,am__xfail_test_bases,$(call 
am__get_test_bases,$(XFAIL_TESTS)))
+  $(call am.memoize,am__xfail_test_bases,$(call 
am__get_test_bases,$(XFAIL_TESTS)))
 
 # The $(strip) is to work around the GNU make 3.80 bug where trailing
 # whitespace in "TESTS = foo.test $(empty)" causes $(TESTS_LOGS) to
 # erroneously expand to "foo.log .log".
 am__test_results = \
-  $(call am__memoize,am__test_results,$(addsuffix .trs,$(strip 
$(am__test_bases))))
+  $(call am.memoize,am__test_results,$(addsuffix .trs,$(strip 
$(am__test_bases))))
 am__test_logs = \
-  $(call am__memoize,am__test_logs,$(addsuffix .log,$(strip 
$(am__test_bases))))
+  $(call am.memoize,am__test_logs,$(addsuffix .log,$(strip $(am__test_bases))))
 
 am__mostlyclean_files += $(am__test_results) $(am__test_logs)
 
@@ -324,7 +324,7 @@ am.test-harness.workdir = $(am__dir)/test-harness
 
 am.test-harness.append-to-list-of-bases = \
   @lst='$1'; for x in $$lst; do echo $$x; done \
-    >> $(am.test-harness.workdir)/bases$(am__newline)
+    >> $(am.test-harness.workdir)/bases$(am.chars.newline)
 
 !define am.setup-test-harness-workdir
 !      @rm -rf $(am.test-harness.workdir)
@@ -445,7 +445,7 @@ am__mostlyclean_files += $(TEST_SUITE_LOG)
 ## ------------------------------------------ ##
 
 am__remove_if_not_lazy_check = \
-  $(if $(filter yes,$(AM_LAZY_CHECK)),,$(call .am.clean-cmd.f,$1))
+  $(if $(filter yes,$(AM_LAZY_CHECK)),,$(call am.clean-cmd.f,$1))
 
 check-TESTS:
        @$(call am__remove_if_not_lazy_check,$(am__test_results))
diff --git a/lib/am/serial-tests.am b/lib/am/serial-tests.am
index 7a8f071..8850dbb 100644
--- a/lib/am/serial-tests.am
+++ b/lib/am/serial-tests.am
@@ -23,7 +23,7 @@ if %?HANDLE-EXEEXT%
 am__check_cook_with_exeext_1 = \
     $(if $(filter $(am.all-progs), $1), $1$(EXEEXT), $1)
 am__check_cook_with_exeext = $(strip \
-  $(if $(EXEEXT), $(foreach am__t, $1, $(call $(0)_1, $(am__t))), $1))
+  $(if $(EXEEXT), $(foreach t, $1, $(call $(0)_1, $t)), $1))
 else !%?HANDLE-EXEEXT%
 am__check_cook_with_exeext = $(strip $1)
 endif !%?HANDLE-EXEEXT%
diff --git a/t/am-xargs-map.sh b/t/am-xargs-map.sh
index 4da959f..da3621d 100755
--- a/t/am-xargs-map.sh
+++ b/t/am-xargs-map.sh
@@ -47,12 +47,12 @@ sed 's/^[0-9][0-9]*:://' > Makefile << 'END'
 args32 := $(args16) $(args16)
 args64 := $(args32) $(args32)
 
-bar = test '$1' = '$(args4)'$(am__newline)
+bar = test '$1' = '$(args4)'$(am.chars.newline)
 test-xargs-map:
        $(call am.xargs-map,bar,$(args16))
 
 args = $(error 'args' should be overridden from the command line)
-foo = @echo $1$(am__newline)
+foo = @echo $1$(am.chars.newline)
 echo-xargs-map:
        $(call am.xargs-map,foo,$(args))
 END
diff --git a/t/internals.tap b/t/internals.tap
index 8063e04..90126a7 100755
--- a/t/internals.tap
+++ b/t/internals.tap
@@ -164,12 +164,12 @@ test-canonicalize:
 
 .PHONY: test-newline-1
 test-newline-1:
-       @echo OK > fo1$(am__newline)@touch ba1$(am__newline)-false > qu1
+       @echo OK > fo1$(am.chars.newline)@touch ba1$(am.chars.newline)-false > 
qu1
        test `cat fo1` = OK
        test -f ba1
        test -f qu1
 
-my_newline = $(am__newline)
+my_newline = $(am.chars.newline)
 .PHONY: test-newline-2
 test-newline-2:
        @echo OK > fo2$(my_newline)@touch ba2$(my_newline)-false > qu2
@@ -177,7 +177,7 @@ test-newline-2:
        test -f ba2
        test -f qu2
 
-command-1 = test x = x$(am__newline)
+command-1 = test x = x$(am.chars.newline)
 command-2 = test y = y$(my_newline)
 .PHONY: test-newline-3
 test-newline-3:
@@ -192,8 +192,8 @@ command_ok_  am.util.strip-suffixes     $MAKE 
test-strip-suffixes
 command_ok_  am.util.tolower            $MAKE test-tolower
 command_ok_  am.util.toupper            $MAKE test-toupper
 command_ok_  am.util.canon              $MAKE test-canonicalize
-command_ok_  "am__newline (1)"          $MAKE test-newline-1
-command_ok_  "am__newline (2)"          $MAKE test-newline-2
-command_ok_  "am__newline (3)"          $MAKE test-newline-3
+command_ok_  "am.chars.newline (1)"          $MAKE test-newline-1
+command_ok_  "am.chars.newline (2)"          $MAKE test-newline-2
+command_ok_  "am.chars.newline (3)"          $MAKE test-newline-3
 
 :
diff --git a/t/memoize.tap b/t/memoize.tap
index 587bd87..d24a711 100755
--- a/t/memoize.tap
+++ b/t/memoize.tap
@@ -52,7 +52,7 @@ tcount=0
 
 T "basic usage" <<'END'
 
-foo = $(call am__memoize,foo,ok)
+foo = $(call am.memoize,foo,ok)
 
 test:
        test '$(foo)' = ok
@@ -63,7 +63,7 @@ END
 
 T "variables expanding to blanks only (1)" <<'END'
 
-foo = $(call am__memoize,foo,$(am.chars.empty) )
+foo = $(call am.memoize,foo,$(am.chars.empty) )
 
 test:
        test '$(foo)' = ' '
@@ -75,7 +75,7 @@ END
 T "variables expanding to blanks only (2)" <<END
 
 blank = \$(am.chars.empty) $tab$tab   \$(am.chars.empty)
-foo = \$(call am__memoize,foo,\$(blank))
+foo = \$(call am.memoize,foo,\$(blank))
 
 test:
        test '\$(foo)' = ' $tab$tab   '
@@ -98,7 +98,7 @@ set -x # Re-enable shell traces.
 
 T "very long variable name" <<END
 
-$var = \$(call am__memoize,$var,foo)
+$var = \$(call am.memoize,$var,foo)
 
 test:
        # Why we silence this?
@@ -122,7 +122,7 @@ set -x # Re-enable shell traces.
 
 T "very long variable name with long content" <<END
 
-$var = \$(call am__memoize,$var,$val)
+$var = \$(call am.memoize,$var,$val)
 
 test:
        # Why we silence this?
@@ -135,7 +135,7 @@ END
 
 T "memoize indirect recursive variable expansion" <<'END'
 
-foo = $(call am__memoize,foo,$(indir))
+foo = $(call am.memoize,foo,$(indir))
 
 ## This is delibrately placed after the memoize call.
 indir = zardoz
@@ -149,7 +149,7 @@ END
 
 T "memoize indirect immediate variable expansion" <<'END'
 
-foo = $(call am__memoize,foo,$(indir))
+foo = $(call am.memoize,foo,$(indir))
 
 ## This is delibrately placed after the memoize call.
 indir := blob
@@ -164,7 +164,7 @@ END
 T "memoize function call (containing builtin calls)" <<'END'
 
 my_func = $(firstword $(sort $(1)))
-foo = $(call am__memoize,foo,$(call my_func, 6 3 1 7))
+foo = $(call am.memoize,foo,$(call my_func, 6 3 1 7))
 
 test:
        test '$(foo)' = 1
@@ -175,7 +175,7 @@ END
 
 T "expanded as function argument" <<'END'
 
-foo = $(call am__memoize,foo,bar)
+foo = $(call am.memoize,foo,bar)
 func = ::$(0)::$(1)::
 
 test:
@@ -189,7 +189,7 @@ END
 
 T "expanded as function argument (trickier)" <<'END'
 
-foo = $(call am__memoize,foo,zardoz)
+foo = $(call am.memoize,foo,zardoz)
 indir_func = ::$($1)::
 
 test:
@@ -203,9 +203,9 @@ END
 
 T "expanded into another memoized variable" <<'END'
 
-foo = $(call am__memoize,foo,one $(bar))
-bar = $(call am__memoize,bar,two $(baz))
-baz = $(call am__memoize,baz,$(sort 4 3))
+foo = $(call am.memoize,foo,one $(bar))
+bar = $(call am.memoize,bar,two $(baz))
+baz = $(call am.memoize,baz,$(sort 4 3))
 
 test:
        test '$(foo)' = 'one two 3 4'
@@ -217,7 +217,7 @@ END
 T "memoization actually takes place (1)" <<'END'
 
 indir := ok
-foo = $(call am__memoize,foo,$(indir))
+foo = $(call am.memoize,foo,$(indir))
 expand-it := $(foo)
 override indir := ko
 
@@ -232,7 +232,7 @@ T "memoization actually takes place (2)" <<'END'
 
 indir := ok
 expand = $(eval expanded-to := $$($1))
-foo = $(call am__memoize,foo,$(indir))
+foo = $(call am.memoize,foo,$(indir))
 $(call expand,foo)
 override indir := ko
 
@@ -246,8 +246,8 @@ END
 
 T "memoization actually takes place (3)" <<'END'
 
-foo1 = $(call am__memoize,foo1,$(shell test -f x && echo "+"))
-foo2 = $(call am__memoize,foo2,$(shell test -f y || echo "-"))
+foo1 = $(call am.memoize,foo1,$(shell test -f x && echo "+"))
+foo2 = $(call am.memoize,foo2,$(shell test -f y || echo "-"))
 
 test: one two
 two: one
@@ -275,7 +275,7 @@ END
 
 T "definition on multiple lines" <<'END'
 
-foo = $(call am__memoize,foo,a \
+foo = $(call am.memoize,foo,a \
   b \
   c \
   \
@@ -298,7 +298,7 @@ T "known GNU make issue 
(https://savannah.gnu.org/patch/?7534)" <<'END'
 setup := $(shell mkdir -p t/pm && : > t/pm/Cond2.pl)
 
 TESTS = $(wildcard t/pm/Cond2.pl)
-am__test_bases = $(call am__memoize,am__test_bases,$(TESTS))
+am__test_bases = $(call am.memoize,am__test_bases,$(TESTS))
 
 test:
        test '$(am__test_bases)' = 't/pm/Cond2.pl'
@@ -320,7 +320,7 @@ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 
20; do
   mv -f t1 t
 done
 
-echo "list = \$(call am__memoize,list,$line \\" >> big.mk
+echo "list = \$(call am.memoize,list,$line \\" >> big.mk
 cat t >> big.mk
 echo "  $line)" >> big.mk
 
diff --git a/t/spy-wildcard.sh b/t/spy-foreach.sh
similarity index 60%
copy from t/spy-wildcard.sh
copy to t/spy-foreach.sh
index 9a8e47d..e71bd81 100755
--- a/t/spy-wildcard.sh
+++ b/t/spy-foreach.sh
@@ -14,23 +14,26 @@
 # 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 that the behaviour of the $(wildcard) builtin in corner cases
-# matches the assumptions done in our recipes.
+# Verify that iterating variable used in a $(foreach ...) builtin is
+# only temporary, and restored to its previous variable if it was already
+# set.
 
+am_create_testdir=empty
 . ./defs || exit 1
 
-mkdir dir
-echo dummy > file
-
 cat > Makefile <<'END'
-.PHONY: test
+$(foreach x,1 2,$(warning foo-$(x))$(eval y:=$$(x)))
+$(foreach u,oops ko,$(warning bar-$(u))$(eval v=$(u)))
 test:
-       test x'$(wildcard dir)'    = x'dir'
-       test x'$(wildcard file)'   = x'file'
-       test x'$(wildcard dir/)'   = x'dir/'
-       test x'$(wildcard file/.)' = x''
+       test .'$(x)' = .
+       test .'$(origin x)' = .'undefined'
+       test .'$(y)' = .2
+       test .'$(v)' = .ko
+       test .'$(u)' = .ok
+       test .'$(origin u)' = .'command line'
 END
 
-$MAKE test
+x= y= u= v=; unset x y u v
+$MAKE test u=ok
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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