Add detection support for Buffalo WHR-G125 from #2611
[openwrt/svn-archive/archive.git] / rules.mk
index 28d28b10c24ab9d4cc980d627472090a46904cb2..4a0fa32e3554b124a5d687825220224df8558dc0 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,10 @@ $(call shvar,$(1))=$$(call $(1))
 export $(call shvar,$(1))
 endef
 
+define confvar
+$(foreach v,$(1),$(if $($(v)),y,n))
+endef
+
 # file extension
 ext=$(word $(words $(subst ., ,$(1))),$(subst ., ,$(1)))