2005-05-23 01:44:15 +08:00
|
|
|
MAN1_TXT=$(wildcard git-*.txt)
|
|
|
|
MAN7_TXT=git.txt
|
2005-05-11 05:32:39 +08:00
|
|
|
|
2005-05-23 01:44:15 +08:00
|
|
|
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
|
|
|
|
|
|
|
|
DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
|
|
|
|
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
|
|
|
|
|
2005-07-15 09:21:57 +08:00
|
|
|
prefix=$(HOME)
|
|
|
|
bin=$(prefix)/bin
|
|
|
|
mandir=$(prefix)/man
|
|
|
|
man1=$(mandir)/man1
|
|
|
|
man7=$(mandir)/man7
|
2005-08-05 07:56:38 +08:00
|
|
|
# DESTDIR=
|
2005-07-15 09:21:57 +08:00
|
|
|
|
|
|
|
INSTALL=install
|
|
|
|
|
2005-05-23 01:44:15 +08:00
|
|
|
#
|
|
|
|
# Please note that there is a minor bug in asciidoc.
|
|
|
|
# The version after 6.0.3 _will_ include the patch found here:
|
|
|
|
# http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
|
|
|
|
#
|
|
|
|
# Until that version is released you may have to apply the patch
|
|
|
|
# yourself - yes, all 6 characters of it!
|
|
|
|
#
|
|
|
|
|
|
|
|
all: html man
|
2005-05-11 05:32:39 +08:00
|
|
|
|
|
|
|
html: $(DOC_HTML)
|
|
|
|
|
2005-05-23 01:44:15 +08:00
|
|
|
|
|
|
|
man: man1 man7
|
|
|
|
man1: $(DOC_MAN1)
|
|
|
|
man7: $(DOC_MAN7)
|
2005-05-11 05:32:39 +08:00
|
|
|
|
2005-07-15 09:21:57 +08:00
|
|
|
install:
|
2005-08-05 07:56:38 +08:00
|
|
|
$(INSTALL) -m755 -d $(DESTDIR)/$(man1) $(DESTDIR)/$(man7)
|
|
|
|
$(INSTALL) $(DOC_MAN1) $(DESTDIR)/$(man1)
|
|
|
|
$(INSTALL) $(DOC_MAN7) $(DESTDIR)/$(man7)
|
2005-07-15 09:21:57 +08:00
|
|
|
|
2005-05-13 05:31:05 +08:00
|
|
|
# 'include' dependencies
|
2005-07-14 03:52:35 +08:00
|
|
|
git-diff-%.txt: diff-format.txt diff-options.txt
|
2005-05-13 05:31:05 +08:00
|
|
|
touch $@
|
2005-05-11 05:32:39 +08:00
|
|
|
|
|
|
|
clean:
|
2005-05-20 00:24:54 +08:00
|
|
|
rm -f *.xml *.html *.1 *.7
|
2005-05-11 05:32:39 +08:00
|
|
|
|
|
|
|
%.html : %.txt
|
2005-07-16 05:57:09 +08:00
|
|
|
asciidoc -b xhtml11 -d manpage $<
|
2005-05-11 05:32:39 +08:00
|
|
|
|
2005-05-20 00:24:54 +08:00
|
|
|
%.1 %.7 : %.xml
|
2005-05-11 05:32:39 +08:00
|
|
|
xmlto man $<
|
|
|
|
|
|
|
|
%.xml : %.txt
|
|
|
|
asciidoc -b docbook -d manpage $<
|
2005-08-15 08:24:36 +08:00
|
|
|
|