1 MAN1_TXT
=$(wildcard stg
*.txt
)
3 DOC_HTML
=$(patsubst %.txt
,%.html
,$(MAN1_TXT
))
6 # with their own formatting rules.
9 DOC_HTML
+= $(patsubst %,%.html
,$(ARTICLES
) $(SP_ARTICLES
))
10 DOC_PDF
+= $(patsubst %,%.pdf
,$(ARTICLES
) $(SP_ARTICLES
))
12 DOC_MAN1
=$(patsubst %.txt
,%.1,$(MAN1_TXT
))
15 htmldir?
=$(prefix)/share
/doc
/stgit
16 mandir?
=$(prefix)/share
/man
17 man1dir=$(mandir)/man1
20 ASCIIDOC
=asciidoc
--unsafe
25 # Please note that there is a minor bug in asciidoc.
26 # The version after 6.0.3 _will_ include the patch found here:
27 # http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
29 # Until that version is released you may have to apply the patch
30 # yourself - yes, all 6 characters of it!
38 $(DOC_HTML
) $(DOC_MAN1
): asciidoc.conf
43 $(INSTALL
) -d
-m755
$(DESTDIR
)$(man1dir)
44 $(INSTALL
) -m644
$(DOC_MAN1
) $(DESTDIR
)$(man1dir)
47 $(INSTALL
) -d
-m755
$(DESTDIR
)$(htmldir
)
48 $(INSTALL
) -m644
$(DOC_HTML
) $(DESTDIR
)$(htmldir
)
50 # Determine "include::" file references in asciidoc files.
52 doc.dep
: $(wildcard *.txt
) build-docdep.perl
54 perl .
/build-docdep.perl
>$@
+
60 rm -f
*.xml
*.html
*.pdf
*.1 doc.dep
63 $(ASCIIDOC
) -b xhtml11
-d manpage
-f asciidoc.conf
$(ASCIIDOC_EXTRA
) $<
66 xmlto
-m callouts.xsl man
$<
69 $(ASCIIDOC
) -b docbook
-d manpage
-f asciidoc.conf
$<
74 # special formatting rules
75 tutorial.html
: %.html
: %.txt
76 $(ASCIIDOC
) -b xhtml11
-d article
-f tutorial.conf
$(ASCIIDOC_EXTRA
) $<
77 tutorial.xml
: %.xml
: %.txt
78 $(ASCIIDOC
) -b docbook
-d article
-f tutorial.conf
$<