summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2010-11-11 15:46:29 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2010-11-18 10:14:00 +0100
commit189851887fc0b8ea300fa0c5e2c07228bcb9d50e (patch)
treecea83e72ed28980f11206702cc22485363c6f287
parentcec866356961f9f848390e6ebc79423e5917325d (diff)
downloadptxdist-189851887fc0b8ea300fa0c5e2c07228bcb9d50e.tar.gz
ptxdist-189851887fc0b8ea300fa0c5e2c07228bcb9d50e.tar.xz
[option-disabled] make ptx/ifdef more robust, e.g. for empty parameters
Also, use ptx/ifdef for ptx/opt-dis Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> (cherry picked from commit 4dc5faf6829df9984fa15fa902aadd6e2433eb5b) Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/pre/000-option-disabled.make4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/pre/000-option-disabled.make b/rules/pre/000-option-disabled.make
index 7ace5c9f8..19730e11e 100644
--- a/rules/pre/000-option-disabled.make
+++ b/rules/pre/000-option-disabled.make
@@ -20,7 +20,7 @@
#
define ptx/opt-dis
-$(firstword $(subst y,n,$(filter y,$($(strip $(1))))) y)
+$(call ptx/ifdef,$(1),n,y)
endef
@@ -34,7 +34,7 @@ endef
# $1, $2, $3
#
define ptx/ifdef
-$(strip $(firstword $(subst y,$(2),$(filter y,$($(strip $(1))))) $(3)))
+$(strip $(if $(filter y,$($(strip $(1)))),$(2),$(3)))
endef