xref: /openbmc/qemu/Makefile (revision 1023e0033db712b0742de226f133a494f7c474c8)
1 0cb3fb1eSpbrook# Makefile for QEMU.
2 0cb3fb1eSpbrook
3 4ace32e2SAntonio Ospiteifneq ($(words $(subst :, ,$(CURDIR))), 1)
4 4ace32e2SAntonio Ospite  $(error main directory cannot contain spaces nor colons)
5 4ace32e2SAntonio Ospiteendif
6 4ace32e2SAntonio Ospite
7 519e1693SStefan Weil# Always point to the root of the build tree (needs GNU make).
8 519e1693SStefan WeilBUILD_DIR=$(CURDIR)
9 388d4758SLluís Vilanova
10 eaa2ddbbSFam Zheng# Before including a proper config-host.mak, assume we are in the source tree
11 eaa2ddbbSFam ZhengSRC_PATH=.
12 eaa2ddbbSFam Zheng
13 660f7930SPaolo Bonzini# Don't use implicit rules or variables
14 660f7930SPaolo Bonzini# we have explicit rules for everything
15 660f7930SPaolo BonziniMAKEFLAGS += -rR
16 660f7930SPaolo Bonzini
17 3bf45835SPaolo BonziniSHELL = /usr/bin/env bash -o pipefail
18 3bf45835SPaolo Bonzini
19 660f7930SPaolo Bonzini# Usage: $(call quiet-command,command and args,"NAME","args to print")
20 660f7930SPaolo Bonzini# This will run "command and args", and either:
21 660f7930SPaolo Bonzini#  if V=1 just print the whole command and args
22 660f7930SPaolo Bonzini#  otherwise print the 'quiet' output in the format "  NAME     args to print"
23 660f7930SPaolo Bonzini# NAME should be a short name of the command, 7 letters or fewer.
24 660f7930SPaolo Bonzini# If called with only a single argument, will print nothing in quiet mode.
25 660f7930SPaolo Bonziniquiet-command-run = $(if $(V),,$(if $2,printf "  %-7s %s\n" $2 $3 && ))$1
26 660f7930SPaolo Bonziniquiet-@ = $(if $(V),,@)
27 660f7930SPaolo Bonziniquiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3)
28 660f7930SPaolo Bonzini
29 28fa2927SPhilippe Mathieu-DaudéUNCHECKED_GOALS := %clean TAGS cscope ctags dist \
30 de1da442SMarc-André Lureau    help check-help print-% \
31 4f2f6276SPhilippe Mathieu-Daudé    docker docker-% vm-help vm-test vm-build-%
32 eaa2ddbbSFam Zheng
33 2b8575bdSPaolo Bonziniall:
34 2b8575bdSPaolo Bonzini.PHONY: all clean distclean recurse-all dist msi FORCE
35 2b8575bdSPaolo Bonzini
36 2b8575bdSPaolo Bonzini# Don't try to regenerate Makefile or configure
37 2b8575bdSPaolo Bonzini# We don't generate any of them
38 2b8575bdSPaolo BonziniMakefile: ;
39 2b8575bdSPaolo Bonziniconfigure: ;
40 2b8575bdSPaolo Bonzini
41 250b086eSLluís Vilanova# All following code might depend on configuration variables
42 55d7e8f6Saurel32ifneq ($(wildcard config-host.mak),)
43 ad064840Spbrookinclude config-host.mak
44 d1bd2423SPeter Maydell
45 aef45d51SDaniel P. Berrangegit-submodule-update:
46 2b8575bdSPaolo Bonzini.git-submodule-status: git-submodule-update config-host.mak
47 2b8575bdSPaolo BonziniMakefile: .git-submodule-status
48 aef45d51SDaniel P. Berrange
49 aef45d51SDaniel P. Berrange.PHONY: git-submodule-update
50 aef45d51SDaniel P. Berrange
51 aef45d51SDaniel P. Berrangegit_module_status := $(shell \
52 aef45d51SDaniel P. Berrange  cd '$(SRC_PATH)' && \
53 cc84d63aSDaniel P. Berrange  GIT="$(GIT)" ./scripts/git-submodule.sh status $(GIT_SUBMODULES); \
54 aef45d51SDaniel P. Berrange  echo $$?; \
55 aef45d51SDaniel P. Berrange)
56 aef45d51SDaniel P. Berrange
57 aef45d51SDaniel P. Berrangeifeq (1,$(git_module_status))
58 f62bbee5SDaniel P. Berrangeifeq (no,$(GIT_UPDATE))
59 f62bbee5SDaniel P. Berrangegit-submodule-update:
60 f62bbee5SDaniel P. Berrange	$(call quiet-command, \
61 f62bbee5SDaniel P. Berrange            echo && \
62 f62bbee5SDaniel P. Berrange            echo "GIT submodule checkout is out of date. Please run" && \
63 f62bbee5SDaniel P. Berrange            echo "  scripts/git-submodule.sh update $(GIT_SUBMODULES)" && \
64 f62bbee5SDaniel P. Berrange            echo "from the source directory checkout $(SRC_PATH)" && \
65 f62bbee5SDaniel P. Berrange            echo && \
66 f62bbee5SDaniel P. Berrange            exit 1)
67 f62bbee5SDaniel P. Berrangeelse
68 aef45d51SDaniel P. Berrangegit-submodule-update:
69 aef45d51SDaniel P. Berrange	$(call quiet-command, \
70 cc84d63aSDaniel P. Berrange          (cd $(SRC_PATH) && GIT="$(GIT)" ./scripts/git-submodule.sh update $(GIT_SUBMODULES)), \
71 aef45d51SDaniel P. Berrange          "GIT","$(GIT_SUBMODULES)")
72 aef45d51SDaniel P. Berrangeendif
73 aef45d51SDaniel P. Berrangeendif
74 aef45d51SDaniel P. Berrange
75 09e93326SPaolo Bonzini# 0. ensure the build tree is okay
76 a5665051SPaolo Bonzini
77 d1bd2423SPeter Maydell# Check that we're not trying to do an out-of-tree build from
78 d1bd2423SPeter Maydell# a tree that's been used for an in-tree build.
79 d1bd2423SPeter Maydellifneq ($(realpath $(SRC_PATH)),$(realpath .))
80 d1bd2423SPeter Maydellifneq ($(wildcard $(SRC_PATH)/config-host.mak),)
81 d1bd2423SPeter Maydell$(error This is an out of tree build but your source tree ($(SRC_PATH)) \
82 d1bd2423SPeter Maydellseems to have been used for an in-tree build. You can fix this by running \
83 b98a3baeSPhilippe Mathieu-Daudé"$(MAKE) distclean && rm -rf *-linux-user *-softmmu" in your source tree)
84 d1bd2423SPeter Maydellendif
85 d1bd2423SPeter Maydellendif
86 d1bd2423SPeter Maydell
87 2b8575bdSPaolo Bonzini# force a rerun of configure if config-host.mak is too old or corrupted
88 2b8575bdSPaolo Bonziniifeq ($(MESON),)
89 2b8575bdSPaolo Bonzini.PHONY: config-host.mak
90 2b8575bdSPaolo Bonzinix := $(shell rm -rf meson-private meson-info meson-logs)
91 2b8575bdSPaolo Bonziniendif
92 2b8575bdSPaolo Bonziniifeq ($(NINJA),)
93 2b8575bdSPaolo Bonzini.PHONY: config-host.mak
94 2b8575bdSPaolo Bonzinix := $(shell rm -rf meson-private meson-info meson-logs)
95 5914ef77SPaolo Bonzinielse
96 5914ef77SPaolo Bonziniexport NINJA
97 2b8575bdSPaolo Bonziniendif
98 2b8575bdSPaolo Bonziniifeq ($(wildcard build.ninja),)
99 2b8575bdSPaolo Bonzini.PHONY: config-host.mak
100 2b8575bdSPaolo Bonzinix := $(shell rm -rf meson-private meson-info meson-logs)
101 2b8575bdSPaolo Bonziniendif
102 16bf7a33SPaolo Bonziniifeq ($(origin prefix),file)
103 16bf7a33SPaolo Bonzini.PHONY: config-host.mak
104 16bf7a33SPaolo Bonzinix := $(shell rm -rf meson-private meson-info meson-logs)
105 16bf7a33SPaolo Bonziniendif
106 2b8575bdSPaolo Bonzini
107 09e93326SPaolo Bonzini# 1. ensure config-host.mak is up-to-date
108 3a6b016dSMarkus Armbrusterconfig-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
109 5914ef77SPaolo Bonzini	@echo config-host.mak is out-of-date, running configure
110 a5665051SPaolo Bonzini	@if test -f meson-private/coredata.dat; then \
111 a5665051SPaolo Bonzini	  ./config.status --skip-meson; \
112 a5665051SPaolo Bonzini	else \
113 5914ef77SPaolo Bonzini	  ./config.status && touch build.ninja.stamp; \
114 a5665051SPaolo Bonzini	fi
115 26fffe29SEmilio G. Cota
116 5914ef77SPaolo Bonzini# 2. meson.stamp exists if meson has run at least once (so ninja reconfigure
117 5914ef77SPaolo Bonzini# works), but otherwise never needs to be updated
118 5914ef77SPaolo Bonzinimeson-private/coredata.dat: meson.stamp
119 5914ef77SPaolo Bonzinimeson.stamp: config-host.mak
120 5914ef77SPaolo Bonzini	@touch meson.stamp
121 5914ef77SPaolo Bonzini
122 5914ef77SPaolo Bonzini# 3. ensure generated build files are up-to-date
123 09e93326SPaolo Bonzini
124 09e93326SPaolo Bonziniifneq ($(NINJA),)
125 09e93326SPaolo BonziniMakefile.ninja: build.ninja
126 5914ef77SPaolo Bonzini	$(quiet-@){ \
127 5914ef77SPaolo Bonzini	  echo 'ninja-targets = \'; \
128 5914ef77SPaolo Bonzini	  $(NINJA) -t targets all | sed 's/:.*//; $$!s/$$/ \\/'; \
129 5914ef77SPaolo Bonzini	  echo 'build-files = \'; \
130 5914ef77SPaolo Bonzini	  $(NINJA) -t query build.ninja | sed -n '1,/^  input:/d; /^  outputs:/q; s/$$/ \\/p'; \
131 5914ef77SPaolo Bonzini	} > $@.tmp && mv $@.tmp $@
132 09e93326SPaolo Bonzini-include Makefile.ninja
133 5914ef77SPaolo Bonzini
134 5914ef77SPaolo Bonzini# A separate rule is needed for Makefile dependencies to avoid -n
135 5914ef77SPaolo Bonzinibuild.ninja: build.ninja.stamp
136 5914ef77SPaolo Bonzinibuild.ninja.stamp: meson.stamp $(build-files)
137 5914ef77SPaolo Bonzini	$(NINJA) $(if $V,-v,) build.ninja && touch $@
138 09e93326SPaolo Bonziniendif
139 09e93326SPaolo Bonzini
140 09e93326SPaolo Bonziniifneq ($(MESON),)
141 5914ef77SPaolo BonziniMakefile.mtest: build.ninja scripts/mtest2make.py
142 09e93326SPaolo Bonzini	$(MESON) introspect --targets --tests --benchmarks | $(PYTHON) scripts/mtest2make.py > $@
143 09e93326SPaolo Bonzini-include Makefile.mtest
144 09e93326SPaolo Bonziniendif
145 09e93326SPaolo Bonzini
146 5914ef77SPaolo Bonzini# 4. Rules to bridge to other makefiles
147 09e93326SPaolo Bonzini
148 09e93326SPaolo Bonziniifneq ($(NINJA),)
149 c8e6cfbaSPaolo BonziniMAKE.n = $(findstring n,$(firstword $(MAKEFLAGS)))
150 c8e6cfbaSPaolo BonziniMAKE.k = $(findstring k,$(firstword $(MAKEFLAGS)))
151 c8e6cfbaSPaolo BonziniMAKE.q = $(findstring q,$(firstword $(MAKEFLAGS)))
152 c8e6cfbaSPaolo BonziniMAKE.nq = $(if $(word 2, $(MAKE.n) $(MAKE.q)),nq)
153 c8e6cfbaSPaolo BonziniNINJAFLAGS = $(if $V,-v) $(if $(MAKE.n), -n) $(if $(MAKE.k), -k0) \
154 09e93326SPaolo Bonzini        $(filter-out -j, $(lastword -j1 $(filter -l% -j%, $(MAKEFLAGS)))) \
155 09e93326SPaolo Bonzini
156 09e93326SPaolo Bonzinininja-cmd-goals = $(or $(MAKECMDGOALS), all)
157 09e93326SPaolo Bonzinininja-cmd-goals += $(foreach t, $(.tests), $(.test.deps.$t))
158 09e93326SPaolo Bonzini
159 09e93326SPaolo Bonzinimakefile-targets := build.ninja ctags TAGS cscope dist clean uninstall
160 5914ef77SPaolo Bonzini# "ninja -t targets" also lists all prerequisites.  If build system
161 5914ef77SPaolo Bonzini# files are marked as PHONY, however, Make will always try to execute
162 5914ef77SPaolo Bonzini# "ninja build.ninja".
163 5914ef77SPaolo Bonzinininja-targets := $(filter-out $(build-files) $(makefile-targets), $(ninja-targets))
164 09e93326SPaolo Bonzini.PHONY: $(ninja-targets) run-ninja
165 09e93326SPaolo Bonzini$(ninja-targets): run-ninja
166 09e93326SPaolo Bonzini
167 09e93326SPaolo Bonzini# Use "| cat" to give Ninja a more "make-y" output.  Use "+" to bypass the
168 09e93326SPaolo Bonzini# --output-sync line.
169 09e93326SPaolo Bonzinirun-ninja: config-host.mak
170 09e93326SPaolo Bonziniifneq ($(filter $(ninja-targets), $(ninja-cmd-goals)),)
171 c8e6cfbaSPaolo Bonzini	+$(quiet-@)$(if $(MAKE.nq),@:, $(NINJA) \
172 c8e6cfbaSPaolo Bonzini	   $(NINJAFLAGS) $(sort $(filter $(ninja-targets), $(ninja-cmd-goals))) | cat)
173 09e93326SPaolo Bonziniendif
174 09e93326SPaolo Bonziniendif
175 09e93326SPaolo Bonzini
176 26fffe29SEmilio G. Cota# Force configure to re-run if the API symbols are updated
177 26fffe29SEmilio G. Cotaifeq ($(CONFIG_PLUGIN),y)
178 26fffe29SEmilio G. Cotaconfig-host.mak: $(SRC_PATH)/plugins/qemu-plugins.symbols
179 c17a386bSAlex Bennée
180 c17a386bSAlex Bennée.PHONY: plugins
181 c17a386bSAlex Bennéeplugins:
182 c17a386bSAlex Bennée	$(call quiet-command,\
183 c17a386bSAlex Bennée		$(MAKE) $(SUBDIR_MAKEFLAGS) -C contrib/plugins V="$(V)", \
184 c17a386bSAlex Bennée		"BUILD", "example plugins")
185 2b8575bdSPaolo Bonziniendif # $(CONFIG_PLUGIN)
186 26fffe29SEmilio G. Cota
187 2b8575bdSPaolo Bonzinielse # config-host.mak does not exist
188 55d7e8f6Saurel32config-host.mak:
189 eaa2ddbbSFam Zhengifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
190 55d7e8f6Saurel32	@echo "Please call configure before running make!"
191 55d7e8f6Saurel32	@exit 1
192 55d7e8f6Saurel32endif
193 2b8575bdSPaolo Bonziniendif # config-host.mak does not exist
194 766a487aSbellard
195 660f7930SPaolo BonziniSUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet)
196 a992fe3dSPaul Brook
197 46e7b706SFam Zhenginclude $(SRC_PATH)/tests/Makefile.include
198 992aeb8eSPaolo Bonzini
199 484e2cc7SPaolo Bonziniall: recurse-all
200 675b9b53SMarc-André Lureau
201 3b8593eeSMarkus ArmbrusterROM_DIRS = $(addprefix pc-bios/, $(ROMS))
202 1338a4b7SMarkus ArmbrusterROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS)))
203 a9c87304SMarc-André Lureau# Only keep -O and -g cflags
204 1338a4b7SMarkus Armbruster.PHONY: $(ROM_DIRS_RULES)
205 1338a4b7SMarkus Armbruster$(ROM_DIRS_RULES):
206 49b7d744SPaolo Bonzini	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
207 c05ac895SPaul Brook
208 5e6d1573SPaolo Bonzini.PHONY: recurse-all recurse-clean
209 49b7d744SPaolo Bonzinirecurse-all: $(addsuffix /all, $(ROM_DIRS))
210 5e6d1573SPaolo Bonzinirecurse-clean: $(addsuffix /clean, $(ROM_DIRS))
211 4aa42531Spbrook
212 3bc2f570SPaolo Bonzini######################################################################
213 4fb240a4Sbellard
214 09e93326SPaolo Bonziniclean: recurse-clean
215 *1023e003SPaolo Bonzini	-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean || :
216 *1023e003SPaolo Bonzini	-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || :
217 2d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files
218 25be210fSJuan Quintela	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
219 484e2cc7SPaolo Bonzini	find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \
220 23858f40SLaszlo Ersek		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
221 23858f40SLaszlo Ersek		! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
222 23858f40SLaszlo Ersek		-exec rm {} +
223 c3a0ee84SPaolo Bonzini	rm -f TAGS cscope.* *.pod *~ */*~
224 b855f8d1SPaolo Bonzini	rm -f fsdev/*.pod scsi/*.pod
225 31e31b8aSbellard
226 859aef02SPaolo BonziniVERSION = $(shell cat $(SRC_PATH)/VERSION)
227 34bb443eSAnthony Liguori
228 34bb443eSAnthony Liguoridist: qemu-$(VERSION).tar.bz2
229 34bb443eSAnthony Liguori
230 34bb443eSAnthony Liguoriqemu-%.tar.bz2:
231 34bb443eSAnthony Liguori	$(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
232 34bb443eSAnthony Liguori
233 09e93326SPaolo Bonzinidistclean: clean
234 *1023e003SPaolo Bonzini	-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean -g || :
235 acfdaac5SPaolo Bonzini	rm -f config-host.mak config-host.h*
236 2038f8c8SPaolo Bonzini	rm -f tests/tcg/config-*.mak
237 2becc36aSPaolo Bonzini	rm -f config-all-disas.mak config.status
238 e8f3bd71SMarc-André Lureau	rm -f tests/qemu-iotests/common.env
239 fc8e320eSMagnus Damm	rm -f roms/seabios/config.mak roms/vgabios/config.mak
240 26fffe29SEmilio G. Cota	rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols
241 64ed6f92SPaolo Bonzini	rm -f *-config-target.h *-config-devices.mak *-config-devices.h
242 a5665051SPaolo Bonzini	rm -rf meson-private meson-logs meson-info compile_commands.json
243 5914ef77SPaolo Bonzini	rm -f Makefile.ninja Makefile.mtest build.ninja.stamp meson.stamp
244 793553acSAlexandre Raymond	rm -f config.log
245 67ed96f9SPeter Maydell	rm -f linux-headers/asm
246 d9840e25STomoki Sekiyama	rm -Rf .sdk
247 7d13299dSbellard
248 018da279SGreg Kurzfind-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name "*.[chsS]" -o -name "*.[ch].inc" \)
249 c857f905SGreg Kurz
250 d7986405SGreg Kurz.PHONY: ctags
251 d7986405SGreg Kurzctags:
252 e90df5eaSGreg Kurz	rm -f "$(SRC_PATH)/"tags
253 e90df5eaSGreg Kurz	$(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} +
254 d7986405SGreg Kurz
255 d7986405SGreg Kurz.PHONY: TAGS
256 d7986405SGreg KurzTAGS:
257 e90df5eaSGreg Kurz	rm -f "$(SRC_PATH)/"TAGS
258 e90df5eaSGreg Kurz	$(find-src-path) -exec etags -f "$(SRC_PATH)/"TAGS --append {} +
259 d7986405SGreg Kurz
260 d7986405SGreg Kurz.PHONY: cscope
261 d7986405SGreg Kurzcscope:
262 d7986405SGreg Kurz	rm -f "$(SRC_PATH)"/cscope.*
263 c857f905SGreg Kurz	$(find-src-path) -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files"
264 e90df5eaSGreg Kurz	cscope -b -i"$(SRC_PATH)/cscope.files" -f"$(SRC_PATH)"/cscope.out
265 d7986405SGreg Kurz
266 a5665051SPaolo Bonzini# Needed by "meson install"
267 a5665051SPaolo Bonziniexport DESTDIR
268 612384d7Sbellard
269 324027c2SFam Zhenginclude $(SRC_PATH)/tests/docker/Makefile.include
270 b1fb9a63SFam Zhenginclude $(SRC_PATH)/tests/vm/Makefile.include
271 0d8e065fSMarc-André Lureau
272 c355de59SPhilippe Mathieu-Daudéprint-help-run = printf "  %-30s - %s\\n" "$1" "$2"
273 c355de59SPhilippe Mathieu-Daudéprint-help = $(quiet-@)$(call print-help-run,$1,$2)
274 c355de59SPhilippe Mathieu-Daudé
275 0d8e065fSMarc-André Lureau.PHONY: help
276 0d8e065fSMarc-André Lureauhelp:
277 0d8e065fSMarc-André Lureau	@echo  'Generic targets:'
278 c355de59SPhilippe Mathieu-Daudé	$(call print-help,all,Build all)
279 c355de59SPhilippe Mathieu-Daudé	$(call print-help,dir/file.o,Build specified target only)
280 c355de59SPhilippe Mathieu-Daudé	$(call print-help,install,Install QEMU, documentation and tools)
281 c355de59SPhilippe Mathieu-Daudé	$(call print-help,ctags/TAGS,Generate tags file for editors)
282 c355de59SPhilippe Mathieu-Daudé	$(call print-help,cscope,Generate cscope index)
283 968b4db3SPaolo Bonzini	$(call print-help,sparse,Run sparse on the QEMU source)
284 0d8e065fSMarc-André Lureau	@echo  ''
285 c17a386bSAlex Bennéeifeq ($(CONFIG_PLUGIN),y)
286 c17a386bSAlex Bennée	@echo  'Plugin targets:'
287 c17a386bSAlex Bennée	$(call print-help,plugins,Build the example TCG plugins)
288 c17a386bSAlex Bennée	@echo  ''
289 c17a386bSAlex Bennéeendif
290 0d8e065fSMarc-André Lureau	@echo  'Cleaning targets:'
291 c355de59SPhilippe Mathieu-Daudé	$(call print-help,clean,Remove most generated files but keep the config)
292 c355de59SPhilippe Mathieu-Daudé	$(call print-help,distclean,Remove all generated files)
293 c355de59SPhilippe Mathieu-Daudé	$(call print-help,dist,Build a distributable tarball)
294 0d8e065fSMarc-André Lureau	@echo  ''
295 0d8e065fSMarc-André Lureau	@echo  'Test targets:'
296 c355de59SPhilippe Mathieu-Daudé	$(call print-help,check,Run all tests (check-help for details))
297 9ed7247aSPaolo Bonzini	$(call print-help,bench,Run all benchmarks)
298 c355de59SPhilippe Mathieu-Daudé	$(call print-help,docker,Help about targets running tests inside containers)
299 c355de59SPhilippe Mathieu-Daudé	$(call print-help,vm-help,Help about targets running tests inside VM)
300 0d8e065fSMarc-André Lureau	@echo  ''
301 0d8e065fSMarc-André Lureau	@echo  'Documentation targets:'
302 4ac2ee19SPeter Maydell	$(call print-help,html man,Build documentation in specified format)
303 0d8e065fSMarc-André Lureau	@echo  ''
304 0d8e065fSMarc-André Lureauifdef CONFIG_WIN32
305 0d8e065fSMarc-André Lureau	@echo  'Windows targets:'
306 c355de59SPhilippe Mathieu-Daudé	$(call print-help,installer,Build NSIS-based installer for QEMU)
307 4bad7c3bSStefan Hajnocziifdef CONFIG_QGA_MSI
308 c355de59SPhilippe Mathieu-Daudé	$(call print-help,msi,Build MSI-based installer for qemu-ga)
309 0d8e065fSMarc-André Lureauendif
310 0d8e065fSMarc-André Lureau	@echo  ''
311 0d8e065fSMarc-André Lureauendif
312 c355de59SPhilippe Mathieu-Daudé	$(call print-help,$(MAKE) [targets],(quiet build, default))
313 c355de59SPhilippe Mathieu-Daudé	$(call print-help,$(MAKE) V=1 [targets],(verbose build))
314 660f7930SPaolo Bonzini
315 660f7930SPaolo Bonzini# will delete the target of a rule if commands exit with a nonzero exit status
316 660f7930SPaolo Bonzini.DELETE_ON_ERROR:
317 660f7930SPaolo Bonzini
318 660f7930SPaolo Bonziniprint-%:
319 660f7930SPaolo Bonzini	@echo '$*=$($*)'
320