3 # This processes DocBook XML to produce html and plain text output
6 # $(SOURCE) - The documents to use
8 # All output is written to files in the build doc directory
10 # See defaults.mak for information about LOCAL
12 # Some local definitions
13 LOCAL
:= docbook-
$(firstword $(SOURCE
))
14 $(LOCAL
)-HTML
:= $(addsuffix .html
,$(addprefix $(DOC
)/,$(basename $(SOURCE
))))
15 $(LOCAL
)-TEXT
:= $(addsuffix .text
,$(addprefix $(DOC
)/,$(basename $(SOURCE
))))
16 INCLUDES
= apt.ent apt-verbatim.ent apt-vendor.ent
23 # Rules to build HTML documentations
26 DOCBOOK_HTML_STYLESHEET
:= docbook-html-style.xsl
28 # Install generation hooks
29 docbook
: $($(LOCAL
)-HTML
)
30 veryclean
: veryclean
/html
/$(LOCAL
)
32 vpath
%.dbk
$(SUBDIRS
)
33 vpath
$(DOCBOOK_HTML_STYLESHEET
) $(SUBDIRS
)
34 $(DOC
)/%.html
: %.dbk
$(DOCBOOK_HTML_STYLESHEET
) $(INCLUDES
)
35 echo Creating html for
$< to
$@
39 --stringparam base.
dir $@
/ \
40 --stringparam l10n.gentext.default.language
$(LC
) \
41 $(<D
)/$(DOCBOOK_HTML_STYLESHEET
) $< || exit
199
44 .PHONY
: veryclean
/html
/$(LOCAL
)
45 veryclean
/html
/$(LOCAL
):
52 # Rules to build Text documentations
55 DOCBOOK_TEXT_STYLESHEET
:= docbook-text-style.xsl
57 # Install generation hooks
58 docbook
: $($(LOCAL
)-TEXT
)
59 veryclean
: veryclean
/text
/$(LOCAL
)
61 vpath
%.dbk
$(SUBDIRS
)
62 vpath
$(DOCBOOK_TEXT_STYLESHEET
) $(SUBDIRS
)
63 $(DOC
)/%.text
: %.dbk
$(DOCBOOK_TEXT_STYLESHEET
) $(INCLUDES
)
64 echo Creating text for
$< to
$@
66 --stringparam l10n.gentext.default.language
$(LC
) \
67 $(<D
)/$(DOCBOOK_TEXT_STYLESHEET
) $< | \
68 LC_ALL
=C.UTF-8
$(DOCBOOK2TEXT
) > $@ || exit
198
71 .PHONY
: veryclean
/text
/$(LOCAL
)
72 veryclean
/text
/$(LOCAL
):