1 MAN1_TXT
= $(wildcard guilt-
*.txt
)
4 DOC_HTML
=$(patsubst %.txt
,%.html
,$(MAN1_TXT
) $(MAN7_TXT
))
6 DOC_MAN1
=$(patsubst %.txt
,%.1,$(MAN1_TXT
))
7 DOC_MAN7
=$(patsubst %.txt
,%.7,$(MAN7_TXT
))
9 USAGE
=$(patsubst %.txt
,usage-
%.txt
,$(MAN1_TXT
))
10 VERSION
=$(shell git describe
2> /dev
/null || sed
-n
-e
'/^GUILT_VERSION=/ { s/^GUILT_VERSION="/v/; s/"//; p; q; }' ..
/guilt
)
14 htmldir?
=$(prefix)/html
16 man1dir=$(mandir)/man1
17 man7dir=$(mandir)/man7
24 XMLTO_EXTRA
= --skip-validation
31 $(DOC_HTML
) $(DOC_MAN1
) $(DOC_MAN7
): asciidoc.conf
38 $(INSTALL
) -d
-m755
$(DESTDIR
)$(man1dir) $(DESTDIR
)$(man7dir)
39 $(INSTALL
) -m644
$(DOC_MAN1
) $(DESTDIR
)$(man1dir)
40 $(INSTALL
) -m644
$(DOC_MAN7
) $(DESTDIR
)$(man7dir)
43 $(INSTALL
) -m644
$(DOC_HTML
) $(DESTDIR
)$(htmldir
)
46 # Determine "include::" file references in asciidoc files.
48 doc.dep
: $(wildcard *.txt
) build-docdep.perl
50 $(PERL
) .
/build-docdep.perl
>$@
+
56 echo
"(Generated for Guilt $(VERSION))" > version.txt
58 cmds.txt
: cmd-list.sh
$(MAN1_TXT
)
61 guilt
.7 guilt.html
: guilt.txt footer.txt version.txt
64 rm -f
*.xml
*.html
*.1 *.7 doc.dep
69 usage-
%.txt
: $(MAN1_TXT
) usage.sh
72 %.html
: %.txt footer.txt version.txt
73 $(ASCIIDOC
) -b xhtml11
-d manpage
-f asciidoc.conf
$(ASCIIDOC_EXTRA
) $<
76 $(XMLTO
) -m callouts.xsl
$(XMLTO_EXTRA
) man
$<
78 %.xml
: %.txt footer.txt version.txt
79 $(ASCIIDOC
) -b docbook
-a version
=$(VERSION
) -d manpage
-f asciidoc.conf
$<