From 66a5fc74e7465c2bce2afba8b0d0618cf9ef200e Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 4 Jun 2016 18:30:48 +0200 Subject: [PATCH] core: name the package before its help text Currently, all our internal packages provide actions that are prefixed with their own names. This makes it obvious what package the action refer to. However, the help commands are really free-form. This means that packages (and especially packages from a br2-external tree) may provide completely arbitrary help text. As such, all that text can get pretty easily mixed up, and it will be very difficult to read. Prefix each package-specific help text with the name of the package it refers to. This generate a "make help" that looks like: [...] Package-specific: - Build and install and all its dependencies -source - Only download the source files for -extract - Extract sources -patch - Apply patches to -depends - Build 's dependencies -configure - Build up to the configure step -build - Build up to the build step -graph-depends - Generate a graph of 's dependencies -dirclean - Remove build directory -reconfigure - Restart the build from the configure step -rebuild - Restart the build from the build step busybox: busybox-menuconfig - Run BusyBox menuconfig busybox-nconfig - Run BusyBox nconfig barebox: barebox-menuconfig - Run barebox menuconfig barebox-savedefconfig - Run barebox savedefconfig linux: linux-menuconfig - Run Linux kernel menuconfig linux-savedefconfig - Run Linux kernel savedefconfig linux-update-defconfig - Save the Linux configuration to the path specified by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE Documentation: manual - build manual in all formats manual-html - build manual in HTML [...] (Note: busybox, barebox, linux help will be converted in followup commits, they are represented here as an example of what this patch does look like.) Signed-off-by: "Yann E. MORIN" cc: Arnout Vandecappelle Cc: Thomas Petazzoni Signed-off-by: Thomas Petazzoni --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d77b5396cf..65f5a65d4a 100644 --- a/Makefile +++ b/Makefile @@ -937,7 +937,10 @@ help: @echo ' -dirclean - Remove build directory' @echo ' -reconfigure - Restart the build from the configure step' @echo ' -rebuild - Restart the build from the build step' - $(foreach p,$(HELP_PACKAGES),$($(p)_HELP_CMDS)$(sep)) + $(foreach p,$(HELP_PACKAGES), \ + @echo $(sep) \ + @echo '$($(p)_NAME):' $(sep) \ + $($(p)_HELP_CMDS)$(sep)) ifeq ($(BR2_PACKAGE_BUSYBOX),y) @echo ' busybox-menuconfig - Run BusyBox menuconfig' endif -- 2.30.2