Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/rules/pre/000-option-disabled.make b/rules/pre/000-option-disabled.make
- index 7ace5c9..19730e1 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
- Zum testen:
- define ptx/ifdef
- $(strip $(if $(filter y,$($(strip $(1)))),$(2),$(3)))
- endef
- OPT_YES=y
- # OPT_NO
- all:
- echo $(call ptx/ifdef, OPT_YES,,#)
- echo $(call ptx/ifdef, OPT_NO,,#)
- echo $(call ptx/ifdef, OPT_YES,#,)
- echo $(call ptx/ifdef, OPT_NO,#,)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement