Browse Source

doc/asciidoc: add possibility to define document dependencies

Currently, a document can not have dependencies, except for the purely
internal ones (like checking asciidoc version, and presence of dblatex).

For our own manual, this will come in handy when we introduce a
generated kconfig snippet, so we can actually make the manual depend on
that snippet being generated first.

For external documents, it can be used to depend on host-packages if
need be (e.g. a custom host packages that generates specific media files
included in the manual).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Samuel Martin <s.martin49@gmail.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Yann E. MORIN 9 years ago
parent
commit
3c695928f5
2 changed files with 4 additions and 1 deletions
  1. 3 0
      docs/manual/adding-packages-asciidoc.txt
  2. 1 1
      package/doc-asciidoc.mk

+ 3 - 0
docs/manual/adding-packages-asciidoc.txt

@@ -63,6 +63,9 @@ information is (assuming the document name is +foo+) :
   to one or more directories containing so-called resources (like CSS or
   to one or more directories containing so-called resources (like CSS or
   images). By default, empty.
   images). By default, empty.
 
 
+* +FOO_DEPENDENCIES+, optional, the list of packages (most probably,
+  host-packages) that must be built before building this document.
+
 There are also additional hooks (see xref:hooks[] for general information
 There are also additional hooks (see xref:hooks[] for general information
 on hooks), that a document may set to define extra actions to be done at
 on hooks), that a document may set to define extra actions to be done at
 various steps:
 various steps:

+ 1 - 1
package/doc-asciidoc.mk

@@ -141,7 +141,7 @@ endef
 ################################################################################
 ################################################################################
 define ASCIIDOC
 define ASCIIDOC
 # Single line, because splitting a foreach is not easy...
 # Single line, because splitting a foreach is not easy...
-$(1)-check-dependencies: asciidoc-check-dependencies
+$(1)-check-dependencies: asciidoc-check-dependencies $$($(2)_DEPENDENCIES)
 	$$(Q)$$(foreach hook,$$($(2)_CHECK_DEPENDENCIES_HOOKS),$$(call $$(hook))$$(sep))
 	$$(Q)$$(foreach hook,$$($(2)_CHECK_DEPENDENCIES_HOOKS),$$(call $$(hook))$$(sep))
 
 
 # Single line, because splitting a foreach is not easy...
 # Single line, because splitting a foreach is not easy...