]> xenbits.xensource.com Git - xen.git/commitdiff
docs/Makefile: Introduce GENERATE_PANDOC_RULE_RAW
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 6 Apr 2018 17:12:37 +0000 (18:12 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 25 Apr 2018 13:25:12 +0000 (14:25 +0100)
We are going to want to format SUPPORT.md which does not match the
filename patterns in docs/.  So provide a way to make an ad-hoc rule
using pandoc with the standard options.

No functional change in this patch.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
Acked-by: Lars Kurth <lars.kurth@citrix.com>
(cherry picked from commit 539f93945cad06fd90784716be1dc8d2624b6f66)
Acked-by: Jan Beulich <jbeulich@suse.com>
docs/Makefile

index 6743fa37445c200976a7291842623f377c7fc100..d82463fdb20f95cba70c8424fc49fe6ca15c1ace 100644 (file)
@@ -237,17 +237,18 @@ txt/%.txt: %.markdown
        $(INSTALL_DATA) $< $@
 
 # Metarule for generating pandoc rules.
-define GENERATE_PANDOC_RULE
-# $(1) is the target documentation format. $(2) is the source format.
-
-$(1)/%.$(1): %.$(2)
+define GENERATE_PANDOC_RULE_RAW
+$(1): $(2)
 ifneq ($(PANDOC),)
        @$(INSTALL_DIR) $$(@D)
        $(PANDOC) --number-sections --toc --standalone $$< --output $$@
 else
        @echo "pandoc not installed; skipping $$@"
 endif
-
+endef
+define GENERATE_PANDOC_RULE
+# $(1) is the target documentation format. $(2) is the source format.
+$(call GENERATE_PANDOC_RULE_RAW,$(1)/%.$(1),%.$(2))
 endef
 $(eval $(call GENERATE_PANDOC_RULE,pdf,pandoc))   # pdf/%.pdf: %.pandoc
 $(eval $(call GENERATE_PANDOC_RULE,txt,pandoc))   # txt/%.txt: %.pandoc