Artem Zolochevskiy d7ae341550 add Makefile
2009-10-23 12:24:06 +03:00

45 lines
1.3 KiB
Makefile

PROJECT = VARIANT
TOPLEVEL_DOC = index.txt
HTMLPAGE = $(TOPLEVEL_DOC:.txt=.html)
docdir = /usr/local/share/doc/$(PROJECT)
DESTDIR =
A2X = a2x
INSTALL = install
INSTALL_DATA = $(INSTALL) -m 644
.PHONY: all install clean
all: $(HTMLPAGE)
%.html: %.txt
$(A2X) -d book -f xhtml -a lang=ru \
--icons -r /etc/asciidoc/ -r ./ \
--xsltproc-opts='--stringparam toc.max.depth 2' \
$<
chunked: $(TOPLEVEL_DOC)
$(A2X) -d book -f chunked -a lang=ru \
--icons -r /etc/asciidoc/ -r ./ \
--xsltproc-opts='--stringparam toc.max.depth 2' \
$<
pdf: $(TOPLEVEL_DOC)
$(A2X) --fop --fop-opts='-c fop.xconf' -d book -f pdf -a lang=ru \
--xsltproc-opts='--stringparam toc.max.depth 2' \
--xsltproc-opts='--stringparam title.font.family "Liberation Sans"' \
--xsltproc-opts='--stringparam body.font.family "Liberation Sans"' \
--xsltproc-opts='--stringparam monospace.font.family "Liberation Mono"' \
$<
install: all
$(INSTALL_DATA) -D $(HTMLPAGE) $(DESTDIR)$(docdir)/$(HTMLPAGE)
$(INSTALL) -d $(DESTDIR)$(docdir)/images/icons
$(INSTALL_DATA) -D docbook-xsl.css $(DESTDIR)$(docdir)/
$(INSTALL_DATA) -D images/*.png $(DESTDIR)$(docdir)/images/
$(INSTALL_DATA) -D images/icons/* $(DESTDIR)$(docdir)/images/icons/
clean:
$(RM) -r index.xml $(HTMLPAGE) docbook-xsl.css images index.chunked index.fo index.pdf *~