Update Makefile to build AsciiDoc documentation.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
parent
4d42153bdf
commit
cbbe8ce0a7
2 changed files with 33 additions and 8 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -3,6 +3,10 @@ __pycache__
|
|||
*.pyc
|
||||
*.pyo
|
||||
tags
|
||||
*.xml
|
||||
*.fo
|
||||
*.html
|
||||
*.xhtml
|
||||
*.ps
|
||||
*.pdf
|
||||
*~
|
||||
|
|
|
|||
37
doc/Makefile
37
doc/Makefile
|
|
@ -1,12 +1,33 @@
|
|||
SRC := manual.me
|
||||
OBJ := $(SRC:.me=.pdf)
|
||||
GROFF := groff
|
||||
PS2PDF := ps2pdf
|
||||
SRC := manual.adoc
|
||||
OBJ := $(SRC:.adoc=.pdf) $(SRC:.adoc=.html)
|
||||
EXTRA_OBJ := $(SRC:.adoc=.ps) $(SRC:.adoc=.xhtml)
|
||||
EXTRA_OBJ += $(SRC:.adoc=.xml) $(SRC:.adoc=.fo)
|
||||
ASCIIDOC := asciidoctor
|
||||
XSLTPROC := xsltproc
|
||||
FOP := fop
|
||||
DOCBOOK_XSL := /usr/share/xml/docbook/stylesheet/docbook-xsl-ns
|
||||
DOCBOOK_FO := $(DOCBOOK_XSL)/fo/docbook.xsl
|
||||
|
||||
all: $(OBJ)
|
||||
|
||||
%.ps: %.me
|
||||
$(GROFF) -me -Tps $< > $@
|
||||
clean:
|
||||
$(RM) $(OBJ)
|
||||
$(RM) $(EXTRA_OBJ)
|
||||
|
||||
%.pdf: %.ps
|
||||
$(PS2PDF) $^ $@
|
||||
%.html: %.adoc
|
||||
$(ASCIIDOC) -b html5 -o $@ $<
|
||||
|
||||
%.xhtml: %.adoc
|
||||
$(ASCIIDOC) -b xhtml5 -o $@ $<
|
||||
|
||||
%.xml: %.adoc
|
||||
$(ASCIIDOC) -b docbook5 -o $@ $<
|
||||
|
||||
%.fo: %.xml
|
||||
$(XSLTPROC) -o $@ $(DOCBOOK_FO) $<
|
||||
|
||||
%.pdf: %.fo
|
||||
$(FOP) -fo $< -pdf $@
|
||||
|
||||
%.ps: %.fo
|
||||
$(FOP) -fo $< -ps $@
|
||||
|
|
|
|||
Loading…
Reference in a new issue