From 1df4a8c865f911ba54fe9db661e8d81a0032a1cd Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Wed, 2 Nov 2022 17:19:17 +0200 Subject: [PATCH] build: add scriptconfig target This makes it possible to use Kconfiglib with OpenWrt buildroot. Signed-off-by: Stijn Tintel --- include/toplevel.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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: -- 2.30.2