]> git.99rst.org Git - openwrt-packages.git/commitdiff
batctl: pass the feature switches directly
authorJosef Schlehofer <redacted>
Thu, 6 Aug 2026 11:54:36 +0000 (13:54 +0200)
committerJosef Schlehofer <redacted>
Tue, 18 Aug 2026 06:39:25 +0000 (08:39 +0200)
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 <redacted>
Co-authored-by: Claude Fable 5 <redacted>
net/batctl/Makefile

index 4475ab865deb08dda667f9173471a8b096a92ff9..8770c6119ece5076bee9c74aca391d5d5dd9161c 100644 (file)
@@ -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
git clone https://git.99rst.org/PROJECT