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
29 $(DOC_HTML
) $(DOC_MAN1
) $(DOC_MAN7
): asciidoc.conf
36 $(INSTALL
) -d
-m755
$(DESTDIR
)$(man1dir) $(DESTDIR
)$(man7dir)
37 $(INSTALL
) -m644
$(DOC_MAN1
) $(DESTDIR
)$(man1dir)
38 $(INSTALL
) -m644
$(DOC_MAN7
) $(DESTDIR
)$(man7dir)
41 $(INSTALL
) -m644
$(DOC_HTML
) $(DESTDIR
)$(htmldir
)
44 # Determine "include::" file references in asciidoc files.
46 doc.dep
: $(wildcard *.txt
) build-docdep.perl
48 perl .
/build-docdep.perl
>$@
+
54 echo
"(Generated for Guilt $(VERSION))" > version.txt
56 cmds.txt
: cmd-list.sh
$(MAN1_TXT
)
59 guilt
.7 guilt.html
: guilt.txt footer.txt version.txt
62 rm -f
*.xml
*.html
*.1 *.7 doc.dep
67 usage-
%.txt
: $(MAN1_TXT
) usage.sh
70 %.html
: %.txt footer.txt version.txt
71 $(ASCIIDOC
) -b xhtml11
-d manpage
-f asciidoc.conf
$(ASCIIDOC_EXTRA
) $<
74 xmlto
-m callouts.xsl man
$<
76 %.xml
: %.txt footer.txt version.txt
77 $(ASCIIDOC
) -b docbook
-a version
=$(VERSION
) -d manpage
-f asciidoc.conf
$<