[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/61] Makefile: Align 'help' target output
From: |
Paolo Bonzini |
Subject: |
[PULL 23/61] Makefile: Align 'help' target output |
Date: |
Mon, 16 Mar 2020 22:26:50 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
The 'help' target is displayed unaligned. Add a print-help
function and use it. Now if someone want to change the
indentation, there is a single place to modify.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 44 +++++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/Makefile b/Makefile
index 7df22fc..6ec19f8 100644
--- a/Makefile
+++ b/Makefile
@@ -1235,50 +1235,52 @@ 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 '')
@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))
--
1.8.3.1
- [PULL 13/61] modules: load modules from versioned /var/run dir, (continued)
- [PULL 13/61] modules: load modules from versioned /var/run dir, Paolo Bonzini, 2020/03/16
- [PULL 16/61] memory: Fix start offset for bitmap log_clear hook, Paolo Bonzini, 2020/03/16
- [PULL 12/61] build-sys: do not make qemu-ga link with pixman, Paolo Bonzini, 2020/03/16
- [PULL 15/61] tests/docker: Install SASL library to extend code coverage on amd64, Paolo Bonzini, 2020/03/16
- [PULL 19/61] ich9: Simplify ich9_lpc_initfn, Paolo Bonzini, 2020/03/16
- [PULL 18/61] ich9: fix getter type for sci_int property, Paolo Bonzini, 2020/03/16
- [PULL 17/61] qom/object: enable setter for uint types, Paolo Bonzini, 2020/03/16
- [PULL 21/61] i386: Fix GCC warning with snprintf when HAX is enabled, Paolo Bonzini, 2020/03/16
- [PULL 20/61] qom/object: Use common get/set uint helpers, Paolo Bonzini, 2020/03/16
- [PULL 22/61] WHPX: Use proper synchronization primitives while processing, Paolo Bonzini, 2020/03/16
- [PULL 23/61] Makefile: Align 'help' target output,
Paolo Bonzini <=
- [PULL 24/61] Makefile: Let the 'help' target list the tools targets, Paolo Bonzini, 2020/03/16
- [PULL 25/61] hw/audio/fmopl: Move ENV_CURVE to .heap to save 32KiB of .bss, Paolo Bonzini, 2020/03/16
- [PULL 26/61] hw/audio/intel-hda: Use memory region alias to reduce .rodata by 4.34MB, Paolo Bonzini, 2020/03/16
- [PULL 27/61] hw/usb/quirks: Use smaller types to reduce .rodata by 10KiB, Paolo Bonzini, 2020/03/16
- [PULL 28/61] ui/curses: Make control_characters[] array const, Paolo Bonzini, 2020/03/16
- [PULL 32/61] Use -isystem for linux-headers dir, Paolo Bonzini, 2020/03/16
- [PULL 29/61] ui/curses: Move arrays to .heap to save 74KiB of .bss, Paolo Bonzini, 2020/03/16
- [PULL 31/61] softmmu/vl.c: Handle '-cpu help' and '-device help' before 'no default machine', Paolo Bonzini, 2020/03/16
- [PULL 33/61] exec/rom_reset: Free rom data during inmigrate skip, Paolo Bonzini, 2020/03/16
- [PULL 36/61] lockable: add QemuRecMutex support, Paolo Bonzini, 2020/03/16