]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
core/pkg-generic: add support for package-defined help
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 4 Jun 2016 16:30:47 +0000 (18:30 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 7 Jun 2016 19:36:04 +0000 (21:36 +0200)
Add a package-variable to store the package-specific make rules.

Although this variable would be seldom used, we still document it.
However, we make sure the documentation explicitly states that this
variable should not be used (if it needs to be, the submitter of a
package will be told so during reviews).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile
docs/manual/adding-packages-generic.txt
package/pkg-generic.mk

index 21d63f6ef741f7a072033d9fd4317037246c5f1e..d77b5396cf12a3eab1d61530a4316611e6404890 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -937,6 +937,7 @@ help:
        @echo '  <pkg>-dirclean         - Remove <pkg> build directory'
        @echo '  <pkg>-reconfigure      - Restart the build from the configure step'
        @echo '  <pkg>-rebuild          - Restart the build from the build step'
+       $(foreach p,$(HELP_PACKAGES),$($(p)_HELP_CMDS)$(sep))
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
        @echo '  busybox-menuconfig     - Run BusyBox menuconfig'
 endif
index 8ed7fe8ee253b6d10eb6cb9d02aae2b70098cd6d..de8aca20b53abe9c008937b9787cca920d961a58 100644 (file)
@@ -497,6 +497,12 @@ different steps of the build process.
   systemd is selected as the init system in the configuration, only
   +LIBFOO_INSTALL_INIT_SYSTEMD+ will be run).
 
+* +LIBFOO_HELP_CMDS+ lists the actions to print the package help, which
+  is included to the main +make help+ output. These commands can print
+  anything in any format.
+  This is seldom used, as packages rarely have custom rules. *Do not use
+  this variable*, unless you really know that you need to print help.
+
 The preferred way to define these variables is:
 
 ----------------------
index b03187956e2d22d960d4c9d8df029d93ea7a9232..374d9d56c9a7c7d3faa8ceb35985cd7ab0a6ebe3 100644 (file)
@@ -914,6 +914,10 @@ ifeq ($$(patsubst %/,ERROR,$$($(2)_SITE)),ERROR)
 $$(error $(2)_SITE ($$($(2)_SITE)) cannot have a trailing slash)
 endif
 
+ifneq ($$($(2)_HELP_CMDS),)
+HELP_PACKAGES += $(2)
+endif
+
 endif # $(2)_KCONFIG_VAR
 endef # inner-generic-package