]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - Makefile
compat: disable edid on correct virtio-gpu device
[thirdparty/qemu.git] / Makefile
index ef10b9a031d9a4ee8b5d359e20661f516484f13d..fc2808fb4b76eed155411b298abe1a02927d2feb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,9 +15,6 @@ UNCHECKED_GOALS := %clean TAGS cscope ctags dist \
     help check-help print-% \
     docker docker-% vm-help vm-test vm-build-%
 
-print-%:
-       @echo '$*=$($*)'
-
 # All following code might depend on configuration variables
 ifneq ($(wildcard config-host.mak),)
 # Put the all: rule here so that config-host.mak can contain dependencies.
@@ -128,7 +125,28 @@ GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.c)
 GENERATED_QAPI_FILES += qapi/qapi-introspect.c qapi/qapi-introspect.h
 GENERATED_QAPI_FILES += qapi/qapi-doc.texi
 
+# The following list considers only the storage daemon main module. All other
+# modules are currently shared with the main schema, so we don't actually
+# generate additional files.
+
+GENERATED_STORAGE_DAEMON_QAPI_FILES = storage-daemon/qapi/qapi-commands.h
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-commands.c
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-emit-events.h
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-emit-events.c
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-events.h
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-events.c
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-init-commands.h
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-init-commands.c
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-introspect.h
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-introspect.c
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-types.h
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-types.c
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-visit.h
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-visit.c
+GENERATED_STORAGE_DAEMON_QAPI_FILES += storage-daemon/qapi/qapi-doc.texi
+
 generated-files-y += $(GENERATED_QAPI_FILES)
+generated-files-y += $(GENERATED_STORAGE_DAEMON_QAPI_FILES)
 
 generated-files-y += trace/generated-tcg-tracers.h
 
@@ -344,7 +362,6 @@ MANUAL_BUILDDIR := docs
 endif
 
 ifdef BUILD_DOCS
-DOCS=qemu-doc.html qemu-doc.txt
 DOCS+=$(MANUAL_BUILDDIR)/system/qemu.1
 DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-img.1
 DOCS+=$(MANUAL_BUILDDIR)/tools/qemu-nbd.8
@@ -451,6 +468,8 @@ dummy := $(call unnest-vars,, \
                 qga-vss-dll-obj-y \
                 block-obj-y \
                 block-obj-m \
+                storage-daemon-obj-y \
+                storage-daemon-obj-m \
                 crypto-obj-y \
                 qom-obj-y \
                 io-obj-y \
@@ -483,6 +502,7 @@ TARGET_DIRS_RULES := $(foreach t, all fuzz clean install, $(addsuffix /$(t), $(T
 SOFTMMU_ALL_RULES=$(filter %-softmmu/all, $(TARGET_DIRS_RULES))
 $(SOFTMMU_ALL_RULES): $(authz-obj-y)
 $(SOFTMMU_ALL_RULES): $(block-obj-y)
+$(SOFTMMU_ALL_RULES): $(storage-daemon-obj-y)
 $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
 $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
 $(SOFTMMU_ALL_RULES): $(io-obj-y)
@@ -587,6 +607,7 @@ qemu-img.o: qemu-img-cmds.h
 qemu-img$(EXESUF): qemu-img.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-nbd$(EXESUF): qemu-nbd.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
 qemu-io$(EXESUF): qemu-io.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
+qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-obj-y) $(COMMON_LDADDS)
 
 qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS)
 
@@ -648,6 +669,17 @@ qapi-gen-timestamp: $(qapi-modules) $(qapi-py)
                "GEN","$(@:%-timestamp=%)")
        @>$@
 
+qapi-modules-storage-daemon = \
+       $(SRC_PATH)/storage-daemon/qapi/qapi-schema.json \
+    $(QAPI_MODULES_STORAGE_DAEMON:%=$(SRC_PATH)/qapi/%.json)
+
+$(GENERATED_STORAGE_DAEMON_QAPI_FILES): storage-daemon/qapi/qapi-gen-timestamp ;
+storage-daemon/qapi/qapi-gen-timestamp: $(qapi-modules-storage-daemon) $(qapi-py)
+       $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
+               -o "storage-daemon/qapi" $<, \
+               "GEN","$(@:%-timestamp=%)")
+       @>$@
+
 QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qapi-commands.h qga-qapi-init-commands.h)
 $(qga-obj-y): $(QGALIB_GEN)
 
@@ -746,6 +778,7 @@ clean: recurse-clean
        rm -f trace/generated-tracers-dtrace.h*
        rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
        rm -f qapi-gen-timestamp
+       rm -f storage-daemon/qapi/qapi-gen-timestamp
        rm -rf qga/qapi-generated
        rm -f config-all-devices.mak
 
@@ -762,16 +795,12 @@ rm -f $(MANUAL_BUILDDIR)/$1/objects.inv $(MANUAL_BUILDDIR)/$1/searchindex.js $(M
 endef
 
 distclean: clean
-       rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-monitor.texi qemu-monitor-info.texi
+       rm -f config-host.mak config-host.h* config-host.ld $(DOCS)
        rm -f tests/tcg/config-*.mak
        rm -f config-all-devices.mak config-all-disas.mak config.status
        rm -f $(SUBDIR_DEVICES_MAK)
        rm -f po/*.mo tests/qemu-iotests/common.env
        rm -f roms/seabios/config.mak roms/vgabios/config.mak
-       rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps
-       rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys
-       rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp
-       rm -f qemu-doc.vr qemu-doc.txt
        rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols
        rm -f config.log
        rm -f linux-headers/asm
@@ -819,7 +848,7 @@ u-boot.e500 u-boot-sam460-20100605.bin \
 qemu_vga.ndrv \
 edk2-licenses.txt \
 hppa-firmware.img \
-opensbi-riscv32-virt-fw_jump.bin \
+opensbi-riscv32-sifive_u-fw_jump.bin opensbi-riscv32-virt-fw_jump.bin \
 opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin
 
 
@@ -851,8 +880,6 @@ install-sphinxdocs: sphinxdocs
 install-doc: $(DOCS) install-sphinxdocs
        $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
        $(INSTALL_DATA) $(MANUAL_BUILDDIR)/index.html "$(DESTDIR)$(qemu_docdir)"
-       $(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)"
-       $(INSTALL_DATA) qemu-doc.txt "$(DESTDIR)$(qemu_docdir)"
        $(INSTALL_DATA) docs/interop/qemu-qmp-ref.html "$(DESTDIR)$(qemu_docdir)"
        $(INSTALL_DATA) docs/interop/qemu-qmp-ref.txt "$(DESTDIR)$(qemu_docdir)"
 ifdef CONFIG_POSIX
@@ -1051,9 +1078,10 @@ sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \
 # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946
 build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD) $(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1")
 # We assume all RST files in the manual's directory are used in it
-manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst) \
+manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst $(SRC_PATH)/docs/$1/*/*.rst) \
               $(SRC_PATH)/docs/defs.rst.inc \
-              $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py
+              $(SRC_PATH)/docs/$1/conf.py $(SRC_PATH)/docs/conf.py \
+              $(SRC_PATH)/docs/sphinx/*.py
 # Macro to write out the rule and dependencies for building manpages
 # Usage: $(call define-manpage-rule,manualname,manpage1 manpage2...[,extradeps])
 # 'extradeps' is optional, and specifies extra files (eg .hx files) that
@@ -1095,49 +1123,16 @@ $(MANUAL_BUILDDIR)/index.html: $(SRC_PATH)/docs/index.html.in qemu-version.h
        $(call quiet-command, sed "s|@@VERSION@@|${VERSION}|g" $< >$@, \
              "GEN","$@")
 
-qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
-       $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
-
-qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool
-       $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
-
-qemu-monitor-info.texi: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/hxtool
-       $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@,"GEN","$@")
-
 docs/interop/qemu-qmp-qapi.texi: qapi/qapi-doc.texi
        @cp -p $< $@
 
 docs/interop/qemu-ga-qapi.texi: qga/qapi-generated/qga-qapi-doc.texi
        @cp -p $< $@
 
-html: qemu-doc.html docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxdocs
-info: qemu-doc.info docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info
-pdf: qemu-doc.pdf docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
-txt: qemu-doc.txt docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
-
-qemu-doc.html qemu-doc.info qemu-doc.pdf qemu-doc.txt: \
-       qemu-options.texi \
-       qemu-monitor.texi \
-       qemu-monitor-info.texi \
-        docs/system/quickstart.texi \
-        docs/system/invocation.texi \
-        docs/system/keys.texi \
-        docs/system/mux-chardev.texi \
-        docs/system/monitor.texi \
-        docs/system/cpu-models-x86.texi \
-        docs/system/images.texi \
-        docs/system/net.texi \
-        docs/system/usb.texi \
-        docs/system/ivshmem.texi \
-        docs/system/linuxboot.texi \
-        docs/system/vnc-security.texi \
-        docs/system/tls.texi \
-        docs/system/gdb.texi \
-        docs/system/build-platforms.texi \
-        docs/system/license.texi \
-       docs/system/cpu-models-x86.texi docs/system/cpu-models-mips.texi \
-       docs/system/deprecated.texi docs/system/qemu-option-trace.texi \
-       docs/system/security.texi
+html: docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxdocs
+info: docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info
+pdf: docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
+txt: docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
 
 docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \
     docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \
@@ -1240,50 +1235,57 @@ endif
 include $(SRC_PATH)/tests/docker/Makefile.include
 include $(SRC_PATH)/tests/vm/Makefile.include
 
+print-help-run = printf "  %-30s - %s\\n" "$1" "$2"
+print-help = $(quiet-@)$(call print-help-run,$1,$2)
+
 .PHONY: help
 help:
        @echo  'Generic targets:'
-       @echo  '  all             - Build all'
+       $(call print-help,all,Build all)
 ifdef CONFIG_MODULES
-       @echo  '  modules         - Build all modules'
+       $(call print-help,modules,Build all modules)
 endif
-       @echo  '  dir/file.o      - Build specified target only'
-       @echo  '  install         - Install QEMU, documentation and tools'
-       @echo  '  ctags/TAGS      - Generate tags file for editors'
-       @echo  '  cscope          - Generate cscope index'
+       $(call print-help,dir/file.o,Build specified target only)
+       $(call print-help,install,Install QEMU, documentation and tools)
+       $(call print-help,ctags/TAGS,Generate tags file for editors)
+       $(call print-help,cscope,Generate cscope index)
        @echo  ''
        @$(if $(TARGET_DIRS), \
                echo 'Architecture specific targets:'; \
                $(foreach t, $(TARGET_DIRS), \
-               printf "  %-30s - Build for %s\\n" $(t)/all $(t);) \
+               $(call print-help-run,$(t)/all,Build for $(t));) \
+               echo '')
+       @$(if $(TOOLS), \
+               echo 'Tools targets:'; \
+               $(foreach t, $(TOOLS), \
+               $(call print-help-run,$(t),Build $(shell basename $(t)) tool);) \
                echo '')
        @echo  'Cleaning targets:'
-       @echo  '  clean           - Remove most generated files but keep the config'
+       $(call print-help,clean,Remove most generated files but keep the config)
 ifdef CONFIG_GCOV
-       @echo  '  clean-coverage  - Remove coverage files'
+       $(call print-help,clean-coverage,Remove coverage files)
 endif
-       @echo  '  distclean       - Remove all generated files'
-       @echo  '  dist            - Build a distributable tarball'
+       $(call print-help,distclean,Remove all generated files)
+       $(call print-help,dist,Build a distributable tarball)
        @echo  ''
        @echo  'Test targets:'
-       @echo  '  check           - Run all tests (check-help for details)'
-       @echo  '  docker          - Help about targets running tests inside containers'
-       @echo  '  vm-help         - Help about targets running tests inside VM'
+       $(call print-help,check,Run all tests (check-help for details))
+       $(call print-help,docker,Help about targets running tests inside containers)
+       $(call print-help,vm-help,Help about targets running tests inside VM)
        @echo  ''
        @echo  'Documentation targets:'
-       @echo  '  html info pdf txt'
-       @echo  '                  - Build documentation in specified format'
+       $(call print-help,html info pdf txt,Build documentation in specified format)
 ifdef CONFIG_GCOV
-       @echo  '  coverage-report - Create code coverage report'
+       $(call print-help,coverage-report,Create code coverage report)
 endif
        @echo  ''
 ifdef CONFIG_WIN32
        @echo  'Windows targets:'
-       @echo  '  installer       - Build NSIS-based installer for QEMU'
+       $(call print-help,installer,Build NSIS-based installer for QEMU)
 ifdef QEMU_GA_MSI_ENABLED
-       @echo  '  msi             - Build MSI-based installer for qemu-ga'
+       $(call print-help,msi,Build MSI-based installer for qemu-ga)
 endif
        @echo  ''
 endif
-       @echo  '  $(MAKE) [targets]      (quiet build, default)'
-       @echo  '  $(MAKE) V=1 [targets]  (verbose build)'
+       $(call print-help,$(MAKE) [targets],(quiet build, default))
+       $(call print-help,$(MAKE) V=1 [targets],(verbose build))