From: Josef Schlehofer Date: Thu, 6 Aug 2026 11:54:36 +0000 (+0200) Subject: batctl: pass the feature switches directly X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=dae3f09cfc94787f07d7f24936a9c451fad53557;p=openwrt-packages.git batctl: pass the feature switches directly The CONFIG_* switches were assembled into a newline separated string and smuggled to the build through a shell variable via shexport, so the Makefile read: MAKE_FLAGS += $$$$$(call shvar,batctl_config) They can simply be listed on the make command line instead. The result is identical, since later assignments on the command line override earlier ones, exactly as the "n first, then y" order of the old string relied on. The longest variant expands to 96 assignments, about 2 KB, so there is no length concern that would justify the indirection. Signed-off-by: Josef Schlehofer Co-authored-by: Claude Fable 5 --- diff --git a/net/batctl/Makefile b/net/batctl/Makefile index 4475ab865..8770c6119 100644 --- a/net/batctl/Makefile +++ b/net/batctl/Makefile @@ -214,17 +214,9 @@ config-y := \ endif -define ConfigVars -$(subst $(space),,$(foreach opt,$(config-$(1)),CONFIG_$(opt)=$(1) -)) -endef - -define batctl_config -$(call ConfigVars,n)$(call ConfigVars,y) -endef -$(eval $(call shexport,batctl_config)) - -MAKE_FLAGS += $$$$$(call shvar,batctl_config) +MAKE_FLAGS += \ + $(patsubst %,CONFIG_%=n,$(config-n)) \ + $(patsubst %,CONFIG_%=y,$(config-y)) define Package/batctl-tiny/install $(INSTALL_DIR) $(1)/usr/libexec