2 $(filter-out $(addsuffix .txt
, $(ARTICLES
) $(SP_ARTICLES
)), \
3 $(wildcard git-
*.txt
)) \
5 MAN5_TXT
=gitattributes.txt gitignore.txt gitmodules.txt
8 MAN_TXT
= $(MAN1_TXT
) $(MAN5_TXT
) $(MAN7_TXT
)
9 MAN_XML
=$(patsubst %.txt
,%.xml
,$(MAN_TXT
))
10 MAN_HTML
=$(patsubst %.txt
,%.html
,$(MAN_TXT
))
15 ARTICLES
+= tutorial-2
16 ARTICLES
+= core-tutorial
17 ARTICLES
+= cvs-migration
19 ARTICLES
+= howto-index
20 ARTICLES
+= repository-layout
25 # with their own formatting rules.
26 SP_ARTICLES
= howto
/revert-branch-rebase user-manual
28 DOC_HTML
+= $(patsubst %,%.html
,$(ARTICLES
) $(SP_ARTICLES
))
30 DOC_MAN1
=$(patsubst %.txt
,%.1,$(MAN1_TXT
))
31 DOC_MAN5
=$(patsubst %.txt
,%.5,$(MAN5_TXT
))
32 DOC_MAN7
=$(patsubst %.txt
,%.7,$(MAN7_TXT
))
36 htmldir?
=$(prefix)/share
/doc
/git-doc
37 mandir?
=$(prefix)/share
/man
38 man1dir=$(mandir)/man1
39 man5dir=$(mandir)/man5
40 man7dir=$(mandir)/man7
49 infodir?
=$(prefix)/share
/info
51 INSTALL_INFO
=install-info
52 DOCBOOK2X_TEXI
=docbook2x-texi
54 PERL_PATH
= /usr
/bin
/perl
57 -include ..
/config.mak.autogen
58 -include ..
/config.mak
61 ASCIIDOC_EXTRA
+= -a asciidoc7compatible
64 ASCIIDOC_EXTRA
+= -a docbook-xsl-172
68 # Please note that there is a minor bug in asciidoc.
69 # The version after 6.0.3 _will_ include the patch found here:
70 # http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
72 # Until that version is released you may have to apply the patch
73 # yourself - yes, all 6 characters of it!
80 $(DOC_HTML
) $(DOC_MAN1
) $(DOC_MAN5
) $(DOC_MAN7
): asciidoc.conf
87 info: git.
info gitman.
info
90 $(INSTALL
) -d
-m
755 $(DESTDIR
)$(man1dir)
91 $(INSTALL
) -d
-m
755 $(DESTDIR
)$(man5dir)
92 $(INSTALL
) -d
-m
755 $(DESTDIR
)$(man7dir)
93 $(INSTALL
) -m
644 $(DOC_MAN1
) $(DESTDIR
)$(man1dir)
94 $(INSTALL
) -m
644 $(DOC_MAN5
) $(DESTDIR
)$(man5dir)
95 $(INSTALL
) -m
644 $(DOC_MAN7
) $(DESTDIR
)$(man7dir)
98 $(INSTALL
) -d
-m
755 $(DESTDIR
)$(infodir)
99 $(INSTALL
) -m
644 git.
info gitman.
info $(DESTDIR
)$(infodir)
100 if
test -r
$(DESTDIR
)$(infodir)/dir; then \
101 $(INSTALL_INFO
) --info-dir
=$(DESTDIR
)$(infodir) git.
info ;\
102 $(INSTALL_INFO
) --info-dir
=$(DESTDIR
)$(infodir) gitman.
info ;\
104 echo
"No directory found in $(DESTDIR)$(infodir)" >&2 ; \
108 sh .
/install-webdoc.sh
$(DESTDIR
)$(htmldir
)
110 ..
/GIT-VERSION-FILE
: .FORCE-GIT-VERSION-FILE
111 $(MAKE
) -C ..
/ GIT-VERSION-FILE
113 -include ..
/GIT-VERSION-FILE
116 # Determine "include::" file references in asciidoc files.
118 doc.dep
: $(wildcard *.txt
) build-docdep.perl
120 $(PERL_PATH
) .
/build-docdep.perl
>$@
+
125 cmds_txt
= cmds-ancillaryinterrogators.txt \
126 cmds-ancillarymanipulators.txt \
127 cmds-mainporcelain.txt \
128 cmds-plumbinginterrogators.txt \
129 cmds-plumbingmanipulators.txt \
130 cmds-synchingrepositories.txt \
131 cmds-synchelpers.txt \
132 cmds-purehelpers.txt \
133 cmds-foreignscminterface.txt
135 $(cmds_txt
): cmd-list.made
137 cmd-list.made
: cmd-list.perl ..
/command-list.txt
$(MAN1_TXT
)
139 $(PERL_PATH
) .
/cmd-list.perl ..
/command-list.txt
142 git
.7 git.html
: git.txt
145 $(RM
) *.xml
*.xml
+ *.html
*.html
+ *.1 *.5 *.7 *.texi
*.texi
+ howto-index.txt howto
/*.html doc.dep
146 $(RM
) $(cmds_txt
) *.made
150 $(ASCIIDOC
) -b xhtml11
-d manpage
-f asciidoc.conf \
151 $(ASCIIDOC_EXTRA
) -agit_version
=$(GIT_VERSION
) -o
$@
+ $<
156 xmlto
-m callouts.xsl man
$<
160 $(ASCIIDOC
) -b docbook
-d manpage
-f asciidoc.conf \
161 $(ASCIIDOC_EXTRA
) -agit_version
=$(GIT_VERSION
) -o
$@
+ $<
164 user-manual.xml
: user-manual.txt user-manual.conf
165 $(ASCIIDOC
) -b docbook
-d book
$<
168 XSLTOPTS
= --xinclude
--stringparam html.stylesheet docbook-xsl.css
170 user-manual.html
: user-manual.xml
171 xsltproc
$(XSLTOPTS
) -o
$@
$(XSLT
) $<
173 git.
info: user-manual.texi
174 $(MAKEINFO
) --no-split
-o
$@ user-manual.texi
176 user-manual.texi
: user-manual.xml
178 $(DOCBOOK2X_TEXI
) user-manual.xml
--to-stdout |
$(PERL_PATH
) fix-texi.perl
>$@
+
181 gitman.texi
: $(MAN_XML
) cat-texi.perl
183 ($(foreach xml
,$(MAN_XML
),$(DOCBOOK2X_TEXI
) --to-stdout
$(xml
);)) | \
184 $(PERL_PATH
) cat-texi.perl
$@
>$@
+
187 gitman.
info: gitman.texi
188 $(MAKEINFO
) --no-split
$*.texi
190 $(patsubst %.txt
,%.texi
,$(MAN_TXT
)): %.texi
: %.xml
192 $(DOCBOOK2X_TEXI
) --to-stdout
$*.xml
>$@
+
195 howto-index.txt
: howto-index.sh
$(wildcard howto
/*.txt
)
197 sh .
/howto-index.sh
$(wildcard howto
/*.txt
) >$@
+
200 $(patsubst %,%.html
,$(ARTICLES
)) : %.html
: %.txt
201 $(ASCIIDOC
) -b xhtml11
$*.txt
203 WEBDOC_DEST
= /pub
/software
/scm
/git
/docs
205 $(patsubst %.txt
,%.html
,$(wildcard howto
/*.txt
)): %.html
: %.txt
207 sed
-e
'1,/^$$/d' $< |
$(ASCIIDOC
) -b xhtml11
- >$@
+
210 install-webdoc
: html
211 sh .
/install-webdoc.sh
$(WEBDOC_DEST
)
214 sh .
/install-doc-quick.sh
$(DOC_REF
) $(mandir)
216 .PHONY
: .FORCE-GIT-VERSION-FILE