added list-defconfigs and %_defconfig

This commit is contained in:
wt
2025-02-13 00:27:24 +07:00
parent f638ff09b0
commit e01f0b6934
16 changed files with 87 additions and 43 deletions
+21 -5
View File
@@ -1,3 +1,6 @@
TOPDIR := $(CURDIR)
DEFCONFIGS_DIR := $(CURDIR)/configs
nconfig:
kconfig-nconf Config.in
@@ -12,15 +15,16 @@ py-menuconfig:
include scripts/funcs.mk
include package/package.mk
include support/config/config.mk
Command := $(firstword $(MAKECMDGOALS))
UC = $(shell echo $(Command) | tr '[:lower:]' '[:upper:]')
$(Command):
$(call CMD_CONFIGURE_$(call UC))
$(call CMD_BUILD_$(call UC))
$(call CMD_INSTALL_$(call UC))
# $(Command):
# $(call CMD_CONFIGURE_$(call UC))
# $(call CMD_BUILD_$(call UC))
# $(call CMD_INSTALL_$(call UC))
all:
$(call CMD_CONFIGURE_UCLIBC)
@@ -48,4 +52,16 @@ endif
$(call CMD_BUILD_UBOOT)
$(call CMD_INSTALL_UBOOT)
list-defconfigs:
$(call list-defconfigs,$(TOPDIR))
%_defconfig:
$(call msg,Copy defconfig: $@ to .config)
$(if \
$(wildcard $(DEFCONFIGS_DIR)/$@),\
$(call copy_file,$(DEFCONFIGS_DIR)/$@,$(TOPDIR)/.config),\
$(call errmsg,Can't find $@)\
)
$(call successmsg,Copy defconfig: $@ to .config is OK)
.PHONY: %_defconfig