Skip to content

Commit

Permalink
tools/kconfiglib: purge warning print of kconfiglib
Browse files Browse the repository at this point in the history
Purge warning:
Kconfig:249: warning: the 'modules' option is not supported.
Let me know if this is a problem for you, as it wouldn't be that
hard to implement. Note that modules are supported -- Kconfiglib
just assumes the symbol name MODULES, like older versions of the
C implementation did when 'option modules' wasn't used.

Signed-off-by: chao an <[email protected]>
  • Loading branch information
anchao committed Feb 16, 2023
1 parent d8f7a9e commit cd53db6
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tools/Unix.mk
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,10 @@ pass2dep: context tools/mkdeps$(HOSTEXEEXT) tools/cnvwindeps$(HOSTEXEEXT)
KCONFIG_ENV = APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR)
KCONFIG_ENV += APPSBINDIR=${CONFIG_APPS_DIR} BINDIR=${TOPDIR}

KCONFIG_LIB = $(shell command -v menuconfig 2> /dev/null)
LOADABLE = $(shell grep "=m$$" $(TOPDIR)/.config)
ifeq ($(CONFIG_BUILD_LOADABLE) $(LOADABLE),)
KCONFIG_LIB = $(shell command -v menuconfig 2> /dev/null)
endif

# Prefer "kconfiglib" if host OS supports it

Expand All @@ -616,18 +619,19 @@ ifeq ($(KCONFIG_LIB),)
KCONFIG_NCONFIG = kconfig-nconf Kconfig
KCONFIG_QCONFIG = kconfig-qconf Kconfig
KCONFIG_GCONFIG = kconfig-gconf Kconfig
KCONFIG_SAVEDEFCONFIG = kconfig-conf Kconfig --savedefconfig
KCONFIG_SAVEDEFCONFIG = kconfig-conf Kconfig --savedefconfig defconfig.tmp
define kconfig_tweak_disable
kconfig-tweak --file $1 -u $2
endef
else
KCONFIG_OLDCONFIG = oldconfig
KCONFIG_OLDDEFCONFIG = olddefconfig
KCONFIG_MENUCONFIG = menuconfig
KCONFIG_NCONFIG = guiconfig
PURGE_MODULE_WARNING = 2> >(grep -v "warning: the 'modules' option is not supported")
KCONFIG_OLDCONFIG = oldconfig ${PURGE_MODULE_WARNING}
KCONFIG_OLDDEFCONFIG = olddefconfig ${PURGE_MODULE_WARNING}
KCONFIG_MENUCONFIG = menuconfig ${PURGE_MODULE_WARNING}
KCONFIG_NCONFIG = guiconfig ${PURGE_MODULE_WARNING}
KCONFIG_QCONFIG = ${KCONFIG_NCONFIG}
KCONFIG_GCONFIG = ${KCONFIG_NCONFIG}
KCONFIG_SAVEDEFCONFIG = savedefconfig --out
KCONFIG_SAVEDEFCONFIG = savedefconfig --out defconfig.tmp ${PURGE_MODULE_WARNING}
define kconfig_tweak_disable
$(Q) sed -i'.orig' '/$2/d' $1
$(Q) rm -f $1.orig
Expand Down Expand Up @@ -672,7 +676,7 @@ gconfig: apps_preconfig
$(Q) ${KCONFIG_ENV} ${KCONFIG_GCONFIG}

savedefconfig: apps_preconfig
$(Q) ${KCONFIG_ENV} ${KCONFIG_SAVEDEFCONFIG} defconfig.tmp
$(Q) ${KCONFIG_ENV} ${KCONFIG_SAVEDEFCONFIG}
$(Q) $(call kconfig_tweak_disable,defconfig.tmp,CONFIG_APPS_DIR)
$(Q) grep "CONFIG_ARCH=" .config >> defconfig.tmp
$(Q) grep "^CONFIG_ARCH_CHIP_" .config >> defconfig.tmp; true
Expand Down

0 comments on commit cd53db6

Please sign in to comment.