From: Stijn Tintel Date: Wed, 2 Nov 2022 15:19:17 +0000 (+0200) Subject: build: add scriptconfig target X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=refs%2Fheads%2Fdpp;p=openwrt%2Fstaging%2Fstintel.git build: add scriptconfig target This makes it possible to use Kconfiglib with OpenWrt buildroot. Signed-off-by: Stijn Tintel --- diff --git a/include/toplevel.mk b/include/toplevel.mk index 328214be1b..8c46f964cf 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -151,6 +151,15 @@ xconfig: scripts/config/qconf prepare-tmpinfo FORCE fi $< Config.in +ifneq ($(filter scriptconfig,$(MAKECMDGOALS)),) + ifndef SCRIPT + $(error Use "make scriptconfig SCRIPT=/path/to/script") + endif +endif + +scriptconfig: prepare-tmpinfo FORCE + $(STAGING_DIR_HOST)/bin/python3 $(SCRIPT) Config.in + prepare_kernel_conf: .config toolchain/install FORCE ifeq ($(wildcard $(STAGING_DIR_HOST)/bin/quilt),) @@ -266,6 +275,6 @@ distclean: ifeq ($(findstring v,$(DEBUG)),) .SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig $(STAGING_DIR_HOST)/.prereq-build tmp/.prereq-package prepare-tmpinfo endif -.PHONY: help FORCE +.PHONY: help scriptconfig FORCE .NOTPARALLEL: