enable IPv6-support for ipsec-tools
[openwrt.git] / rules.mk
index 28d28b1..d36c994 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -32,7 +32,7 @@ SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
 
 OPTIMIZE_FOR_CPU:=$(ARCH)
 
-DL_DIR:=$(call qstrip,$(if $(CONFIG_DOWNLOAD_FOLDER), $(CONFIG_DOWNLOAD_FOLDER),$(TOPDIR)/dl))
+DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
 BIN_DIR:=$(TOPDIR)/bin
 INCLUDE_DIR:=$(TOPDIR)/include
 SCRIPT_DIR:=$(TOPDIR)/scripts
@@ -138,6 +138,11 @@ $(call shvar,$(1))=$$(call $(1))
 export $(call shvar,$(1))
 endef
 
+empty:=
+space:= $(empty) $(empty)
+merge=$(subst $(space),,$(1))
+confvar=$(call merge,$(foreach v,$(1),$(if $($(v)),y,n)))
+
 # file extension
 ext=$(word $(words $(subst ., ,$(1))),$(subst ., ,$(1)))