[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [FYI] [ng] refactor: use new function 'am.vars.is-undef' .
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [FYI] [ng] refactor: use new function 'am.vars.is-undef' ... |
Date: |
Sat, 28 Jul 2012 01:29:09 +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 <address@hidden>
---
lib/am/header-vars.am | 8 ++------
lib/am/parallel-tests.am | 13 +++++++------
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 545dea9..d51c949 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -100,12 +100,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
diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index bb4ce64..43daeef 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -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), \
--
1.7.12.rc0
- [Automake-NG] [FYI] [ng] refactor: use new function 'am.vars.is-undef' ...,
Stefano Lattarini <=