diff options
Diffstat (limited to 'Documentation/Makefile')
| -rw-r--r-- | Documentation/Makefile | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile index 758897c..99a1362 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile | |||
| @@ -2,6 +2,24 @@ | |||
| 2 | obj := $(obj)/Documentation | 2 | obj := $(obj)/Documentation |
| 3 | src := $(src)/Documentation | 3 | src := $(src)/Documentation |
| 4 | 4 | ||
| 5 | ifeq ($(VERBOSE),1) | ||
| 6 | Q = | ||
| 7 | print_asciidoc = | ||
| 8 | print_xsltproc = | ||
| 9 | else | ||
| 10 | Q = @ | ||
| 11 | print_asciidoc = echo ' ASCIIDOC '`basename $@`; | ||
| 12 | print_xsltproc = echo ' XSLTPROC '`basename $@`; | ||
| 13 | endif | ||
| 14 | |||
| 15 | do_asciidoc_build = \ | ||
| 16 | ($(print_asciidoc) \ | ||
| 17 | asciidoc -d manpage -b docbook -o $@ $<) | ||
| 18 | |||
| 19 | do_xsltproc_build = \ | ||
| 20 | ($(print_xsltproc) \ | ||
| 21 | xsltproc --nonet -o $@ ${MANPAGE_DOCBOOK_XSL} $<) | ||
| 22 | |||
| 5 | # | 23 | # |
| 6 | # Most likely a docbook.xsl is already installed on the users system | 24 | # Most likely a docbook.xsl is already installed on the users system |
| 7 | # instead of creating a new wheel, lets reuse what's already there. | 25 | # instead of creating a new wheel, lets reuse what's already there. |
| @@ -9,11 +27,12 @@ src := $(src)/Documentation | |||
| 9 | MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1) | 27 | MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1) |
| 10 | 28 | ||
| 11 | $(obj)/%.xml: $(src)/%.txt | 29 | $(obj)/%.xml: $(src)/%.txt |
| 12 | mkdir -p $(obj) | 30 | $(Q)mkdir -p $(obj) |
| 13 | asciidoc -d manpage -b docbook -o $@ $< | 31 | $(Q)$(do_asciidoc_build) |
| 32 | |||
| 14 | 33 | ||
| 15 | $(obj)/%.1: $(obj)/%.xml manpage.xsl | 34 | $(obj)/%.1: $(obj)/%.xml manpage.xsl |
| 16 | xsltproc --nonet -o $@ ${MANPAGE_DOCBOOK_XSL} $< | 35 | $(Q)$(do_xsltproc_build) |
| 17 | 36 | ||
| 18 | TEXT = $(wildcard *.txt) | 37 | TEXT = $(wildcard *.txt) |
| 19 | XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT}) | 38 | XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT}) |
