[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH] [ng] refactor: consider $(EXEEXT) used if non-empt
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH] [ng] refactor: consider $(EXEEXT) used if non-empty at make runtime |
Date: |
Mon, 30 Jul 2012 10:02:46 +0200 |
To check whether we should handle $(EXEEXT), simply check for
"ifdef EXEEXT" in our Makefile fragments, rather than also checking
whether EXEEXT has been set as a configure-time AC_SUBST. This
simplifies the logic, and move it completely at make runtime, rather
than having it split between automake runtime (to decide whether
EXEEXT is AC_SUBST) and make runtime (to decide whether $(EXEEXT) is
empty).
* lib/am/header-vars.am (EXEEXT): Default to empty. This is required
to avoid environment interferences.
(am.conf.handle-exeext): Define this no more.
* lib/am/parallel-tests.am, lib/am/serial-tests.am: Simply look
at $(EXEEXT), rather than using $(am.conf.handle-exeext), or the
'%?HANDLE-EXEEXT%' transform.
* automake.in (process_file): Don't define that transform anymore.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 2 --
lib/am/header-vars.am | 6 +++---
lib/am/parallel-tests.am | 13 ++++++-------
lib/am/serial-tests.am | 6 +++---
4 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/automake.in b/automake.in
index 01df5fe..3d09cc2 100644
--- a/automake.in
+++ b/automake.in
@@ -5799,8 +5799,6 @@ sub preprocess_file ($%)
'LIBTOOL' => !! var ('LIBTOOL'),
'NONLIBTOOL' => 1,
- 'HANDLE-EXEEXT' => (exists $configure_vars{'EXEEXT'} ?
- 'TRUE' : 'FALSE'),
'SILENT' => silent_flag (),
%transform);
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index fc3d3cf..e86f5b3 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -102,6 +102,9 @@ endef
ifeq ($(call am.vars.is-undef,SUBDIRS),yes)
SUBDIRS :=
endif
+ifeq ($(call am.vars.is-undef,EXEEXT),yes)
+ EXEEXT :=
+endif
# CDPATH is only useful in interactive usage, and should never be exported
# in the environment; doing so could cause our recipes and scripts to chdir
@@ -180,9 +183,6 @@ am.util.uniq = $(strip \
$(am.chars.empty), \
$(lastword $(1)))))
-?HANDLE-EXEEXT?am.conf.handle-exeext := yes
-?!HANDLE-EXEEXT?am.conf.handle-exeext := no
-
## These definitions have been generated by the following Bash 4 script:
##
## #!/bin/bash
diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am
index 579ffe5..3ad7de6 100644
--- a/lib/am/parallel-tests.am
+++ b/lib/am/parallel-tests.am
@@ -66,12 +66,10 @@ $(2)LOG_DRIVER = $(SHELL) $(am.conf.aux-dir)/test-driver
endif
%.log %.trs: %$1 $$($(2)LOG_DEPENDENCIES)
@$$(call am.test-suite.runtest,$2)
-ifeq ($(am.conf.handle-exeext),yes)
ifdef EXEEXT
%.log %.trs: %$1$(EXEEXT) $$($(2)LOG_DEPENDENCIES)
@$$(call am.test-suite.runtest,$2)
-endif # defined EXEEXT
-endif # am.conf.handle-exeext = yes
+endif
endef
define am.test-suite.handle-suffix
@@ -103,10 +101,11 @@ $(eval $(call am.test-suite.handle-suffix))
# TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
# where removing the $(srcdir) from the $(wildcard) invocation would
# cause the idiom to break in VPATH builds.
-am.test-suite.get-test-bases = $(patsubst $(srcdir)/%,%,$(strip \
-$(call am.util.strip-suffixes, $(TEST_EXTENSIONS), \
-?!HANDLE-EXEEXT? $(1))))
-?HANDLE-EXEEXT? $(patsubst %$(EXEEXT),%,$(1)))))
+define am.test-suite.get-test-bases
+$(patsubst $(srcdir)/%,%,$(strip \
+ $(call am.util.strip-suffixes, $(TEST_EXTENSIONS), \
+ $(if $(EXEEXT),$(patsubst %$(EXEEXT),%,$1),$1))))
+endef
am.test-suite.rx.recheck = ^[ ]*:recheck:[ ]*
am.test-suite.rx.global-result = ^[ ]*:global-test-result:[ ]*
diff --git a/lib/am/serial-tests.am b/lib/am/serial-tests.am
index 0c31e26..7781fda 100644
--- a/lib/am/serial-tests.am
+++ b/lib/am/serial-tests.am
@@ -16,12 +16,12 @@
## Obsolescent serial testsuite driver.
-ifeq ($(am.conf.handle-exeext),yes)
+ifdef EXEEXT
## This is suboptimal, but we need to preserve the order of $(TESTS).
am__check_cook_with_exeext_1 = \
$(if $(filter $(am.all-progs), $1), $1$(EXEEXT), $1)
-am__check_cook_with_exeext = $(strip \
- $(if $(EXEEXT), $(foreach t, $1, $(call $(0)_1, $t)), $1))
+am__check_cook_with_exeext = \
+ $(strip $(foreach t, $1, $(call $(0)_1, $t)))
else
am__check_cook_with_exeext = $(strip $1)
endif
--
1.7.12.rc0
- [Automake-NG] [PATCH] [ng] refactor: consider $(EXEEXT) used if non-empty at make runtime,
Stefano Lattarini <=