aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-08-30 12:05:08 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-09-07 13:32:37 +0200
commit2a5919ab642a3273698233ef46c83741eec327bf (patch)
treeb29cb27bff7eefbadbcce48ed9a46fb33f6a36ff /Makefile
parentbafe78ad3bc4cef3a4d22e477c8940a7c955f1ea (diff)
downloadqemu-2a5919ab642a3273698233ef46c83741eec327bf.zip
qemu-2a5919ab642a3273698233ef46c83741eec327bf.tar.gz
qemu-2a5919ab642a3273698233ef46c83741eec327bf.tar.bz2
configure: unify recursion into sub-Makefiles
Treat contrib/plugins the same as the firmware. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 12 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 5d48dfa..118c28e 100644
--- a/Makefile
+++ b/Makefile
@@ -164,14 +164,6 @@ ifneq ($(filter $(ninja-targets), $(ninja-cmd-goals)),)
endif
endif
-ifeq ($(CONFIG_PLUGIN),y)
-.PHONY: plugins
-plugins:
- $(call quiet-command,\
- $(MAKE) $(SUBDIR_MAKEFLAGS) -C contrib/plugins V="$(V)", \
- "BUILD", "example plugins")
-endif # $(CONFIG_PLUGIN)
-
else # config-host.mak does not exist
ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
$(error Please call configure before running make)
@@ -184,15 +176,20 @@ include $(SRC_PATH)/tests/Makefile.include
all: recurse-all
-ROMS_RULES=$(foreach t, all clean distclean, $(addsuffix /$(t), $(ROMS)))
-.PHONY: $(ROMS_RULES)
-$(ROMS_RULES):
+SUBDIR_RULES=$(foreach t, all clean distclean, $(addsuffix /$(t), $(SUBDIRS)))
+.PHONY: $(SUBDIR_RULES)
+$(SUBDIR_RULES):
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
+ifneq ($(filter contrib/plugins, $(SUBDIRS)),)
+.PHONY: plugins
+plugins: contrib/plugins/all
+endif
+
.PHONY: recurse-all recurse-clean
-recurse-all: $(addsuffix /all, $(ROMS))
-recurse-clean: $(addsuffix /clean, $(ROMS))
-recurse-distclean: $(addsuffix /distclean, $(ROMS))
+recurse-all: $(addsuffix /all, $(SUBDIRS))
+recurse-clean: $(addsuffix /clean, $(SUBDIRS))
+recurse-distclean: $(addsuffix /distclean, $(SUBDIRS))
######################################################################
@@ -296,7 +293,7 @@ help:
$(call print-help,cscope,Generate cscope index)
$(call print-help,sparse,Run sparse on the QEMU source)
@echo ''
-ifeq ($(CONFIG_PLUGIN),y)
+ifneq ($(filter contrib/plugins, $(SUBDIRS)),)
@echo 'Plugin targets:'
$(call print-help,plugins,Build the example TCG plugins)
@echo ''