]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] refactor: use new function 'am.vars.is-undef' ...
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 27 Jul 2012 22:52:45 +0000 (00:52 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 28 Jul 2012 08:15:27 +0000 (10:15 +0200)
* lib/am/header-vars.am (SUBDIRS): ... in the definition of this (instead
of using hand-rolled almost-equivalent) ...
($(1)LOG_DRIVER, TEST_EXTENSIONS): ... and of these (instead of resorting
to weaker and unsafer '?=' assignment).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
lib/am/header-vars.am
lib/am/parallel-tests.am

index 6bbde638a12f229d5c6d3f689ed76786b5a5b5a2..fc3d3cf55040b67498c778c86eb700bcbb9a885c 100644 (file)
@@ -99,12 +99,8 @@ endef
 
 # Neutralize unwarranted environment settings that might interfere with
 # our Makefiles.
-ifdef SUBDIRS
-  ifneq "$(origin SUBDIRS)" "file"
-    ifneq "$(origin SUBDIRS)" "command line"
-      SUBDIRS :=
-    endif
-  endif
+ifeq ($(call am.vars.is-undef,SUBDIRS),yes)
+  SUBDIRS :=
 endif
 
 # CDPATH is only useful in interactive usage, and should never be exported
index bb4ce6463a3dd99cce5bcaeb037625e7cea40043..43daeef4b241742b88edd82945da806f67ee7c83 100644 (file)
@@ -66,9 +66,9 @@ am__tpfx = \
 
 define am.test-suite.handle-suffix
 
-# FIXME: This will pick up the default from the environment; are we sure
-# FIXME: we want that?
-$$(call am__tpfx,$1)LOG_DRIVER ?= $(SHELL) $(am.conf.aux-dir)/test-driver
+ifeq ($$(call am.vars.is-undef,$$(call am__tpfx,$1)LOG_DRIVER),yes)
+$$(call am__tpfx,$1)LOG_DRIVER = $(SHELL) $(am.conf.aux-dir)/test-driver
+endif
 
 %.log %.trs: %$1 $$($$(call am__tpfx,$1)LOG_DEPENDENCIES)
        @$$(call am.test-suite.runtest,$$(call am__tpfx,$1))
@@ -82,9 +82,10 @@ endif # am.conf.handle-exeext = yes
 
 endef # am.test-suite.handle-suffix
 
-# FIXME: this will pick up the default from the environment; are we sure
-# FIXME: we want that?
-TEST_EXTENSIONS ?= .test
+ifeq ($(call am.vars.is-undef,TEST_EXTENSIONS),yes)
+  TEST_EXTENSIONS := .test
+endif
+
 $(foreach e,$(filter-out .%,$(TEST_EXTENSIONS)),\
      $(call am.error,invalid test extension: '$e'))
 $(foreach e,$(TEST_EXTENSIONS), \