This allows users to modify the DocBook stylesheet settings, such as the paper size. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
34 lines
681 B
Makefile
34 lines
681 B
Makefile
SRC := manual.adoc
|
|
OBJ := $(SRC:.adoc=.pdf) $(SRC:.adoc=.html) $(SRC:.adoc=.ps)
|
|
EXTRA_OBJ := $(SRC:.adoc=.xhtml)
|
|
EXTRA_OBJ += $(SRC:.adoc=.xml) $(SRC:.adoc=.fo)
|
|
ASCIIDOC := asciidoctor
|
|
FOP := fop
|
|
XSLTPROC := xsltproc
|
|
XSLT_PARAMS ?=
|
|
DOCBOOK_XSL := /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
|
|
DOCBOOK_FO := $(DOCBOOK_XSL)/fo/docbook.xsl
|
|
|
|
all: $(OBJ)
|
|
|
|
clean:
|
|
$(RM) $(OBJ)
|
|
$(RM) $(EXTRA_OBJ)
|
|
|
|
%.html: %.adoc
|
|
$(ASCIIDOC) -b html5 -o $@ $<
|
|
|
|
%.xhtml: %.adoc
|
|
$(ASCIIDOC) -b xhtml5 -o $@ $<
|
|
|
|
%.xml: %.adoc
|
|
$(ASCIIDOC) -b docbook5 -o $@ $<
|
|
|
|
%.fo: %.xml
|
|
$(XSLTPROC) $(XSLT_PARAMS) -o $@ $(DOCBOOK_FO) $<
|
|
|
|
%.pdf: %.fo
|
|
$(FOP) -fo $< -pdf $@
|
|
|
|
%.ps: %.fo
|
|
$(FOP) -fo $< -ps $@
|