2 $(filter-out $(addsuffix .txt
, $(ARTICLES
) $(SP_ARTICLES
)), \
3 $(wildcard git-
*.txt
)) \
5 MAN5_TXT
=gitattributes.txt gitignore.txt gitmodules.txt
8 DOC_HTML
=$(patsubst %.txt
,%.html
,$(MAN1_TXT
) $(MAN5_TXT
) $(MAN7_TXT
))
11 ARTICLES
+= tutorial-2
12 ARTICLES
+= core-tutorial
13 ARTICLES
+= cvs-migration
15 ARTICLES
+= howto-index
16 ARTICLES
+= repository-layout
21 # with their own formatting rules.
22 SP_ARTICLES
= howto
/revert-branch-rebase user-manual
24 DOC_HTML
+= $(patsubst %,%.html
,$(ARTICLES
) $(SP_ARTICLES
))
26 DOC_MAN1
=$(patsubst %.txt
,%.1,$(MAN1_TXT
))
27 DOC_MAN5
=$(patsubst %.txt
,%.5,$(MAN5_TXT
))
28 DOC_MAN7
=$(patsubst %.txt
,%.7,$(MAN7_TXT
))
32 mandir?
=$(prefix)/share
/man
33 man1dir=$(mandir)/man1
34 man5dir=$(mandir)/man5
35 man7dir=$(mandir)/man7
41 ASCIIDOC_EXTRA
+= -a asciidoc7compatible
46 -include ..
/config.mak.autogen
47 -include ..
/config.mak
50 # Please note that there is a minor bug in asciidoc.
51 # The version after 6.0.3 _will_ include the patch found here:
52 # http://marc.theaimsgroup.com/?l=git&m=111558757202243&w=2
54 # Until that version is released you may have to apply the patch
55 # yourself - yes, all 6 characters of it!
62 $(DOC_HTML
) $(DOC_MAN1
) $(DOC_MAN5
) $(DOC_MAN7
): asciidoc.conf
70 $(INSTALL
) -d
-m755
$(DESTDIR
)$(man1dir)
71 $(INSTALL
) -d
-m755
$(DESTDIR
)$(man5dir)
72 $(INSTALL
) -d
-m755
$(DESTDIR
)$(man7dir)
73 $(INSTALL
) -m644
$(DOC_MAN1
) $(DESTDIR
)$(man1dir)
74 $(INSTALL
) -m644
$(DOC_MAN5
) $(DESTDIR
)$(man5dir)
75 $(INSTALL
) -m644
$(DOC_MAN7
) $(DESTDIR
)$(man7dir)
78 ..
/GIT-VERSION-FILE
: .FORCE-GIT-VERSION-FILE
79 $(MAKE
) -C ..
/ GIT-VERSION-FILE
81 -include ..
/GIT-VERSION-FILE
84 # Determine "include::" file references in asciidoc files.
86 doc.dep
: $(wildcard *.txt
) build-docdep.perl
88 perl .
/build-docdep.perl
>$@
+
93 cmds_txt
= cmds-ancillaryinterrogators.txt \
94 cmds-ancillarymanipulators.txt \
95 cmds-mainporcelain.txt \
96 cmds-plumbinginterrogators.txt \
97 cmds-plumbingmanipulators.txt \
98 cmds-synchingrepositories.txt \
99 cmds-synchelpers.txt \
100 cmds-purehelpers.txt \
101 cmds-foreignscminterface.txt
103 $(cmds_txt
): cmd-list.made
105 cmd-list.made
: cmd-list.perl
$(MAN1_TXT
)
109 git
.7 git.html
: git.txt core-intro.txt
112 rm -f
*.xml
*.xml
+ *.html
*.html
+ *.1 *.5 *.7 howto-index.txt howto
/*.html doc.dep
113 rm -f
$(cmds_txt
) *.made
117 $(ASCIIDOC
) -b xhtml11
-d manpage
-f asciidoc.conf \
118 $(ASCIIDOC_EXTRA
) -agit_version
=$(GIT_VERSION
) -o
$@
+ $<
122 xmlto
-m callouts.xsl man
$<
126 $(ASCIIDOC
) -b docbook
-d manpage
-f asciidoc.conf \
127 $(ASCIIDOC_EXTRA
) -agit_version
=$(GIT_VERSION
) -o
$@
+ $<
130 user-manual.xml
: user-manual.txt user-manual.conf
131 $(ASCIIDOC
) -b docbook
-d book
$<
133 XSLT
= http
://docbook.sourceforge.net
/release
/xsl
/current
/html
/docbook.xsl
134 XSLTOPTS
= --xinclude
--stringparam html.stylesheet docbook-xsl.css
136 user-manual.html
: user-manual.xml
137 xsltproc
$(XSLTOPTS
) -o
$@
$(XSLT
) $<
139 howto-index.txt
: howto-index.sh
$(wildcard howto
/*.txt
)
141 sh .
/howto-index.sh
$(wildcard howto
/*.txt
) >$@
+
144 $(patsubst %,%.html
,$(ARTICLES
)) : %.html
: %.txt
145 $(ASCIIDOC
) -b xhtml11
$*.txt
147 WEBDOC_DEST
= /pub
/software
/scm
/git
/docs
149 $(patsubst %.txt
,%.html
,$(wildcard howto
/*.txt
)): %.html
: %.txt
151 sed
-e
'1,/^$$/d' $< |
$(ASCIIDOC
) -b xhtml11
- >$@
+
154 install-webdoc
: html
155 sh .
/install-webdoc.sh
$(WEBDOC_DEST
)
158 sh .
/install-doc-quick.sh
$(DOC_REF
) $(mandir)
160 .PHONY
: .FORCE-GIT-VERSION-FILE