Skip to content

Commit

Permalink
Makefile: simplify MINIKCONF rules
Browse files Browse the repository at this point in the history
There is no reason to write MINIKCONF_DEPS manually, since minikconf.py
emits a dependency file, and also no reason to list multiple Kconfig
files on the command line since they can be included from a master file
in the top-level source directory.

Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
bonzini committed Jul 10, 2020
1 parent bb321b2 commit aaa1b70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 4 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source Kconfig.host
source backends/Kconfig
source accel/Kconfig
source hw/Kconfig
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ endif
# This has to be kept in sync with Kconfig.host.
MINIKCONF_ARGS = \
$(CONFIG_MINIKCONF_MODE) \
$@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \
$@ $*/config-devices.mak.d $< $(SRC_PATH)/Kconfig \
CONFIG_TCG=$(CONFIG_TCG) \
CONFIG_KVM=$(CONFIG_KVM) \
CONFIG_SPICE=$(CONFIG_SPICE) \
Expand All @@ -419,15 +419,9 @@ MINIKCONF_ARGS = \
CONFIG_LINUX=$(CONFIG_LINUX) \
CONFIG_PVRDMA=$(CONFIG_PVRDMA)

MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host \
$(SRC_PATH)/backends/Kconfig \
$(SRC_PATH)/accel/Kconfig \
$(SRC_PATH)/hw/Kconfig
MINIKCONF_DEPS = $(MINIKCONF_INPUTS) \
$(wildcard $(SRC_PATH)/hw/*/Kconfig)
MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py

$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_DEPS) $(BUILD_DIR)/config-host.mak
$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(SRC_PATH)/Kconfig $(BUILD_DIR)/config-host.mak
$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) \
> $@.tmp, "GEN", "$@.tmp")
$(call quiet-command, if test -f $@; then \
Expand Down

0 comments on commit aaa1b70

Please sign in to comment.