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
) -d
-m755
$(DESTDIR
)$(htmldir
)
44 $(INSTALL
) -m644
$(DOC_HTML
) $(DESTDIR
)$(htmldir
)
47 # Determine "include::" file references in asciidoc files.
49 doc.dep
: $(wildcard *.txt
) build-docdep.perl
51 $(PERL
) .
/build-docdep.perl
>$@
+
57 echo
"(Generated for Guilt $(VERSION))" > version.txt
59 cmds.txt
: cmd-list.sh
$(MAN1_TXT
)
62 guilt
.7 guilt.html
: guilt.txt footer.txt version.txt
67 rm -f
*.xml
*.html
*.1 *.7 doc.dep
72 usage-guilt-
%.txt
: ..
/guilt-
% usage.sh
75 %.html
: %.txt footer.txt version.txt
76 $(ASCIIDOC
) -b xhtml11
-d manpage
-f asciidoc.conf
$(ASCIIDOC_EXTRA
) $<
79 $(XMLTO
) -m callouts.xsl
$(XMLTO_EXTRA
) man
$<
81 %.xml
: %.txt footer.txt version.txt
82 $(ASCIIDOC
) -b docbook
-a version
=$(VERSION
) -d manpage
-f asciidoc.conf
$<