From 53eb1efe1b090b805a0ed9de68112f9007fcf9a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= Date: Tue, 28 Jul 2020 19:43:09 +0200 Subject: [PATCH] kconfig: make sync-deps flag accessible --- makefiles/kconfig.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/makefiles/kconfig.mk b/makefiles/kconfig.mk index 745a668f90..01ffba758a 100644 --- a/makefiles/kconfig.mk +++ b/makefiles/kconfig.mk @@ -7,6 +7,9 @@ include $(RIOTMAKE)/tools/kconfiglib.inc.mk # Generated dir will contain Kconfig generated configurations GENERATED_DIR = $(BINDIR)/generated +# The sync dir will contain a tree of header files that represent Kconfig symbols +KCONFIG_SYNC_DIR = $(GENERATED_DIR)/deps + # This file will contain all generated configuration from kconfig export KCONFIG_GENERATED_AUTOCONF_HEADER_C = $(GENERATED_DIR)/autoconf.h @@ -75,6 +78,10 @@ $(GENERATED_DIR): $(CLEAN) SHOULD_RUN_KCONFIG ?= $(or $(wildcard $(APPDIR)/*.config), $(wildcard $(APPDIR)/Kconfig), $(wildcard $(KCONFIG_MERGED_CONFIG)), $(filter menuconfig, $(MAKECMDGOALS))) ifneq (,$(SHOULD_RUN_KCONFIG)) + +# Flag to enable the --sync-dir feature of Kconfiglib +KCONFIG_SYNC_DEPS ?= + # Add configuration header to build dependencies BUILDDEPS += $(KCONFIG_GENERATED_AUTOCONF_HEADER_C) @@ -125,5 +132,7 @@ $(KCONFIG_OUT_CONFIG) $(KCONFIG_GENERATED_AUTOCONF_HEADER_C) &: $(KCONFIG_GENERA $(Q) \ KCONFIG_CONFIG=$(KCONFIG_MERGED_CONFIG) $(GENCONFIG) \ --config-out=$(KCONFIG_OUT_CONFIG) \ - --header-path $(KCONFIG_GENERATED_AUTOCONF_HEADER_C) $(KCONFIG) + --header-path $(KCONFIG_GENERATED_AUTOCONF_HEADER_C) \ + $(if $(KCONFIG_SYNC_DEPS),--sync-deps $(KCONFIG_SYNC_DIR)) \ + $(KCONFIG) endif