1 COMMANDS
= $(shell ..
/stg-build
--commands
)
2 COMMANDS_TXT
= $(patsubst %,stg-
%.txt
,$(COMMANDS
))
4 MAN1_TXT
= stg.txt
$(COMMANDS_TXT
)
6 DOC_HTML
=$(patsubst %.txt
,%.html
,$(MAN1_TXT
))
10 DOC_HTML
+= $(patsubst %,%.html
,$(ARTICLES
))
11 DOC_PDF
+= $(patsubst %,%.pdf
,$(ARTICLES
))
13 DOC_MAN1
=$(patsubst %.txt
,%.1,$(MAN1_TXT
))
16 htmldir?
=$(prefix)/share
/doc
/stgit
17 mandir?
=$(prefix)/share
/man
18 man1dir=$(mandir)/man1
21 ASCIIDOC
=asciidoc
--unsafe
26 # Please note that there is a minor bug in asciidoc.
27 # The version after 6.0.3 _will_ include the patch found here:
28 # http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
30 # Until that version is released you may have to apply the patch
31 # yourself - yes, all 6 characters of it!
39 $(DOC_HTML
) $(DOC_MAN1
): asciidoc.conf
44 $(INSTALL
) -d
-m755
$(DESTDIR
)$(man1dir)
45 $(INSTALL
) -m644
$(DOC_MAN1
) $(DESTDIR
)$(man1dir)
48 $(INSTALL
) -d
-m755
$(DESTDIR
)$(htmldir
)
49 $(INSTALL
) -m644
$(DOC_HTML
) $(DESTDIR
)$(htmldir
)
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 doc.dep
$(COMMANDS_TXT
) command-list.txt
63 ALL_PY
= $(shell find ..
/stgit
-name
'*.py')
65 $(COMMANDS_TXT
): $(ALL_PY
)
66 ..
/stg-build
--asciidoc
$(basename $(subst stg-
,,$@
)) > $@
68 command-list.txt
: $(ALL_PY
)
69 ..
/stg-build
--cmd-list
> $@
72 $(ASCIIDOC
) -b xhtml11
-d manpage
-f asciidoc.conf
$(ASCIIDOC_EXTRA
) $<
75 xmlto
-m callouts.xsl man
$<
78 $(ASCIIDOC
) -b docbook
-d manpage
-f asciidoc.conf
$<
83 # special formatting rules
84 tutorial.html
: %.html
: %.txt
85 $(ASCIIDOC
) -b xhtml11
-d article
-a toc
-f tutorial.conf \
87 tutorial.xml
: %.xml
: %.txt
88 $(ASCIIDOC
) -b docbook
-d article
-f tutorial.conf
$<