qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] buildsys: Restore listing binaries/tools/helpers in 'make help' target
@ 2021-06-02 15:08 Philippe Mathieu-Daudé
  2021-06-03 16:07 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-06-02 15:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé

When switching to Meson (commit 7fd51e68c34, 2020-08-21) we lost many
targets listed in 'make help':
- target specific binaries
  commit 5e6d1573b49 ("remove Makefile.target")
- tools and helpers
  commit c3a0ee847a5 ("configure, Makefile; remove TOOLS and HELPERS-y variable")

Since 'ninja' is not officially supported, but 'make' still is,
restore a similar list of make targets (extracted from ninja).
The targets are not described as before, but it is still more
useful to users rather than nothing listed at all.

Now we get:

  $ make help
    GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc capstone slirp
  Architecture specific targets:
    qemu-system-aarch64
    qemu-system-alpha
    qemu-system-arm
    qemu-system-avr
    ...
    qemu-x86_64
    qemu-xtensaeb
    qemu-xtensa

  Generic targets:
    all                            - Build all
    dir/file.o                     - Build specified target only
    install                        - Install QEMU
    ctags/gtags/TAGS               - Generate tags file for editors
    cscope                         - Generate cscope index
    sparse                         - Run sparse on the QEMU source

  Tools and helper targets:
    contrib/elf2dmp/elf2dmp
    contrib/ivshmem-client/ivshmem-client
    contrib/ivshmem-server/ivshmem-server
    contrib/vhost-user-blk/vhost-user-blk
    contrib/vhost-user-gpu/vhost-user-gpu
    contrib/vhost-user-input/vhost-user-input
    contrib/vhost-user-scsi/vhost-user-scsi
    fsdev/virtfs-proxy-helper
    qemu-bridge-helper
    qemu-edid
    qemu-img
    qemu-io
    qemu-keymap
    qemu-nbd
    qemu-pr-helper
    qga/qemu-ga
    storage-daemon/qemu-storage-daemon
    tools/virtiofsd/virtiofsd

  Cleaning targets:
    clean                          - Remove most generated files but keep the config
    distclean                      - Remove all generated files
    dist                           - Build a distributable tarball
  ...

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/227
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Makefile b/Makefile
index 30f19d33bb3..f2c5ce2e5fe 100644
--- a/Makefile
+++ b/Makefile
@@ -286,6 +286,9 @@ print-help = @$(call print-help-run,$1,$2)
 
 .PHONY: help
 help:
+	@echo  'Architecture specific targets:'
+	@ninja -t targets all | sed -ne 's/\(.*\): cpp_LINKER.*/  \1/p'
+	@echo  ''
 	@echo  'Generic targets:'
 	$(call print-help,all,Build all)
 	$(call print-help,dir/file.o,Build specified target only)
@@ -294,6 +297,10 @@ help:
 	$(call print-help,cscope,Generate cscope index)
 	$(call print-help,sparse,Run sparse on the QEMU source)
 	@echo  ''
+	@echo  'Tools and helper targets:'
+	@ninja -t targets all | sed -ne 's/\(.*\): c_LINKER.*/  \1/p' \
+		| sort | egrep -v '^  (subprojects|tests|target)'
+	@echo  ''
 ifeq ($(CONFIG_PLUGIN),y)
 	@echo  'Plugin targets:'
 	$(call print-help,plugins,Build the example TCG plugins)
-- 
2.26.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] buildsys: Restore listing binaries/tools/helpers in 'make help' target
  2021-06-02 15:08 [PATCH] buildsys: Restore listing binaries/tools/helpers in 'make help' target Philippe Mathieu-Daudé
@ 2021-06-03 16:07 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2021-06-03 16:07 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel

On 02/06/21 17:08, Philippe Mathieu-Daudé wrote:
> +	@echo  'Architecture specific targets:'
> +	@ninja -t targets all | sed -ne 's/\(.*\): cpp_LINKER.*/  \1/p'
> +	@echo  ''

This doesn't work in general, it depends on the link_language 
established by configure.  The separation between qemu-* targets and 
other targets is not particularly useful in my opinion.

> The targets are not described as before, but it is still more
> useful to users rather than nothing listed at all.

Maybe add "make targets" and add it to the help?  The information in 
"make help" already includes what's generally useful; listing a few 
dozen targets overwhelms the user with output, whereas most people only 
care about "make all" and "make check".

Paolo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-03 16:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-02 15:08 [PATCH] buildsys: Restore listing binaries/tools/helpers in 'make help' target Philippe Mathieu-Daudé
2021-06-03 16:07 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).