build: clean up and optimize ipkg control generator code

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43017
This commit is contained in:
Felix Fietkau
2014-10-22 08:57:16 +00:00
parent 364fb4dacb
commit d081edf7eb
3 changed files with 53 additions and 45 deletions

View File

@@ -21,6 +21,7 @@ qstrip=$(strip $(subst ",,$(1)))
empty:=
space:= $(empty) $(empty)
comma:=,
merge=$(subst $(space),,$(1))
confvar=$(call merge,$(foreach v,$(1),$(if $($(v)),y,n)))
strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1))