blob: 468196c96b202125bf91c7311721e6c335047fef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
$(eval $(call import.MODULE.defs,DOC,doc))
DOC.in/ = $(PROJECT/)doc/
DOC.out/ = $(BUILD/)doc/
DOC.out.api/ = $(DOC.out/)api/
DOC.out.articles/ = $(DOC.out/)articles/
###############################################################################
DOC.m4.srcs = \
texi/base/handbrake.texi.m4
DOC.m4.in = $(foreach n,$(DOC.m4.srcs),$(DOC.in/)$n)
DOC.m4.out = $(patsubst $(DOC.in/)%.m4,$(DOC.out/)%,$(DOC.m4.in))
DOC.texi.includes = $(wildcard $(DOC.in/)texi/*/*.texi)
DOC.texi.articles = $(wildcard $(DOC.in/)texi/*.texi)
DOC.texi2html.out = $(patsubst $(DOC.in/)texi/%.texi,$(DOC.out.articles/)html/%.html,$(DOC.texi.articles))
DOC.texi2txt.out = $(patsubst $(DOC.in/)texi/%.texi,$(DOC.out.articles/)txt/%.txt,$(DOC.texi.articles))
DOC.texi2xml.out = $(patsubst $(DOC.in/)texi/%.texi,$(DOC.out.articles/)xml/%.xml,$(DOC.texi.articles))
DOC.xml2wiki.out = $(DOC.texi2xml.out:$(DOC.out.articles/)xml/%.xml=$(DOC.out.articles/)wiki/%.wiki)
BUILD.out += $(DOC.m4.out)
BUILD.out += $(DOC.texi2html.out)
BUILD.out += $(DOC.texi2txt.out)
BUILD.out += $(DOC.texi2xml.out)
BUILD.out += $(DOC.xml2wiki.out)
###############################################################################
DOC.M4.exe = $(M4.exe)
DOC.M4.flags = -I$(BUILD/)project
DOC.M4.deps = $(BUILD/)project/handbrake.m4
DOC.M4 = $(DOC.M4.exe) $(DOC.M4.flags) $(2) > $(1)
MAKEINFO.exe = makeinfo
MAKEINFO.flags = -I$(DOC.out/)texi -I$(DOC.in/)texi
MAKEINFO.flags.html = --html --no-headers --no-split
MAKEINFO.flags.txt = --plaintext --no-headers
MAKEINFO.flags.xml = --xml --output-indent=4
MAKEINFO = $(MAKEINFO.exe) $(MAKEINFO.flags) $(MAKEINFO.flags.$(1)) $(2) -o $(3)
XML2WIKI.exe = python3.0 $(DOC.in/)xml2wiki.py
XML2WIKI.flags = --date --toc
XML2WIKI = $(XML2WIKI.exe) $(XML2WIKI.flags) $(1) > $(2)
|