Skip to content

Commit 9c6be8b

Browse files
committed
Merge branch 'ss/contrib-subtree-contacts'
* ss/contrib-subtree-contacts: contacts: add a Makefile to generate docs and install subtree: add an install-html target
2 parents b946576 + 2ea40f0 commit 9c6be8b

File tree

4 files changed

+83
-3
lines changed

4 files changed

+83
-3
lines changed

contrib/contacts/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
git-contacts.1
2+
git-contacts.html
3+
git-contacts.xml

contrib/contacts/Makefile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# The default target of this Makefile is...
2+
all::
3+
4+
-include ../../config.mak.autogen
5+
-include ../../config.mak
6+
7+
prefix ?= /usr/local
8+
gitexecdir ?= $(prefix)/libexec/git-core
9+
mandir ?= $(prefix)/share/man
10+
man1dir ?= $(mandir)/man1
11+
htmldir ?= $(prefix)/share/doc/git-doc
12+
13+
../../GIT-VERSION-FILE: FORCE
14+
$(MAKE) -C ../../ GIT-VERSION-FILE
15+
16+
-include ../../GIT-VERSION-FILE
17+
18+
# this should be set to a 'standard' bsd-type install program
19+
INSTALL ?= install
20+
RM ?= rm -f
21+
22+
ASCIIDOC = asciidoc
23+
XMLTO = xmlto
24+
25+
ifndef SHELL_PATH
26+
SHELL_PATH = /bin/sh
27+
endif
28+
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
29+
30+
ASCIIDOC_CONF = ../../Documentation/asciidoc.conf
31+
MANPAGE_XSL = ../../Documentation/manpage-normal.xsl
32+
33+
GIT_CONTACTS := git-contacts
34+
35+
GIT_CONTACTS_DOC := git-contacts.1
36+
GIT_CONTACTS_XML := git-contacts.xml
37+
GIT_CONTACTS_TXT := git-contacts.txt
38+
GIT_CONTACTS_HTML := git-contacts.html
39+
40+
doc: $(GIT_CONTACTS_DOC) $(GIT_CONTACTS_HTML)
41+
42+
install: $(GIT_CONTACTS)
43+
$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
44+
$(INSTALL) -m 755 $(GIT_CONTACTS) $(DESTDIR)$(gitexecdir)
45+
46+
install-doc: install-man install-html
47+
48+
install-man: $(GIT_CONTACTS_DOC)
49+
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
50+
$(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
51+
52+
install-html: $(GIT_CONTACTS_HTML)
53+
$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
54+
$(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)
55+
56+
$(GIT_CONTACTS_DOC): $(GIT_CONTACTS_XML)
57+
$(XMLTO) -m $(MANPAGE_XSL) man $^
58+
59+
$(GIT_CONTACTS_XML): $(GIT_CONTACTS_TXT)
60+
$(ASCIIDOC) -b docbook -d manpage -f $(ASCIIDOC_CONF) \
61+
-agit_version=$(GIT_VERSION) $^
62+
63+
$(GIT_CONTACTS_HTML): $(GIT_CONTACTS_TXT)
64+
$(ASCIIDOC) -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
65+
-agit_version=$(GIT_VERSION) $^
66+
67+
clean:
68+
$(RM) $(GIT_CONTACTS)
69+
$(RM) *.xml *.html *.1
70+
71+
.PHONY: FORCE

contrib/subtree/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*~
22
git-subtree
3-
git-subtree.xml
43
git-subtree.1
4+
git-subtree.html
5+
git-subtree.xml
56
mainline
67
subproj

contrib/subtree/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ all::
55
-include ../../config.mak
66

77
prefix ?= /usr/local
8-
mandir ?= $(prefix)/share/man
98
gitexecdir ?= $(prefix)/libexec/git-core
9+
mandir ?= $(prefix)/share/man
1010
man1dir ?= $(mandir)/man1
11+
htmldir ?= $(prefix)/share/doc/git-doc
1112

1213
../../GIT-VERSION-FILE: FORCE
1314
$(MAKE) -C ../../ GIT-VERSION-FILE
@@ -49,12 +50,16 @@ install: $(GIT_SUBTREE)
4950
$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
5051
$(INSTALL) -m 755 $(GIT_SUBTREE) $(DESTDIR)$(gitexecdir)
5152

52-
install-doc: install-man
53+
install-doc: install-man install-html
5354

5455
install-man: $(GIT_SUBTREE_DOC)
5556
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
5657
$(INSTALL) -m 644 $^ $(DESTDIR)$(man1dir)
5758

59+
install-html: $(GIT_SUBTREE_HTML)
60+
$(INSTALL) -d -m 755 $(DESTDIR)$(htmldir)
61+
$(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir)
62+
5863
$(GIT_SUBTREE_DOC): $(GIT_SUBTREE_XML)
5964
$(XMLTO) -m $(MANPAGE_XSL) man $^
6065

0 commit comments

Comments
 (0)