1 MAN1_TXT=$(wildcard stg-*.txt)
4 DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
7 # with their own formatting rules.
10 DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
11 DOC_PDF += $(patsubst %,%.pdf,$(ARTICLES) $(SP_ARTICLES))
13 DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
14 DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
18 man1dir=$(mandir)/man1
19 man7dir=$(mandir)/man7
22 ASCIIDOC=asciidoc --unsafe
27 # Please note that there is a minor bug in asciidoc.
28 # The version after 6.0.3 _will_ include the patch found here:
29 # http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
31 # Until that version is released you may have to apply the patch
32 # yourself - yes, all 6 characters of it!
40 $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf
47 $(INSTALL) -d -m755 $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir)
48 $(INSTALL) -m644 $(DOC_MAN1) $(DESTDIR)$(man1dir)
49 $(INSTALL) -m644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
51 # Determine "include::" file references in asciidoc files.
53 doc.dep : $(wildcard *.txt) build-docdep.perl
55 perl ./build-docdep.perl >$@+
61 rm -f *.xml *.html *.pdf *.1 *.7 doc.dep
64 $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<
67 xmlto -m callouts.xsl man $<
70 $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<
75 # special formatting rules
76 tutorial.html : %.html : %.txt
77 $(ASCIIDOC) -b xhtml11 -d article -f tutorial.conf $(ASCIIDOC_EXTRA) $<
78 tutorial.xml : %.xml : %.txt
79 $(ASCIIDOC) -b docbook -d article -f tutorial.conf $<