2006-03-05 09:36:33 +00:00
|
|
|
MAN1_TXT= \
|
|
|
|
$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
|
|
|
|
$(wildcard git-*.txt)) \
|
|
|
|
gitk.txt
|
2005-05-22 18:44:15 +01:00
|
|
|
MAN7_TXT=git.txt
|
2005-05-10 22:32:39 +01:00
|
|
|
|
2005-08-23 15:28:34 -07:00
|
|
|
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
|
2005-08-30 13:51:01 -07:00
|
|
|
|
2005-09-01 16:56:13 -07:00
|
|
|
ARTICLES = tutorial
|
2006-05-21 19:49:34 -04:00
|
|
|
ARTICLES += tutorial-2
|
2006-01-22 22:43:59 -08:00
|
|
|
ARTICLES += core-tutorial
|
2005-09-01 16:56:13 -07:00
|
|
|
ARTICLES += cvs-migration
|
|
|
|
ARTICLES += diffcore
|
|
|
|
ARTICLES += howto-index
|
|
|
|
ARTICLES += repository-layout
|
2005-09-02 21:19:26 -07:00
|
|
|
ARTICLES += hooks
|
2005-12-09 23:07:29 -08:00
|
|
|
ARTICLES += everyday
|
2006-03-05 09:36:33 +00:00
|
|
|
ARTICLES += git-tools
|
2007-03-18 17:02:37 -04:00
|
|
|
ARTICLES += glossary
|
2005-08-30 13:51:01 -07:00
|
|
|
# with their own formatting rules.
|
2007-03-18 17:02:37 -04:00
|
|
|
SP_ARTICLES = howto/revert-branch-rebase user-manual
|
2005-08-30 13:51:01 -07:00
|
|
|
|
|
|
|
DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
|
2005-08-29 23:09:22 -07:00
|
|
|
|
2005-05-22 18:44:15 +01:00
|
|
|
DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
|
|
|
|
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
|
|
|
|
|
2005-10-08 15:54:37 -07:00
|
|
|
prefix?=$(HOME)
|
2006-06-29 22:11:25 +02:00
|
|
|
bindir?=$(prefix)/bin
|
|
|
|
mandir?=$(prefix)/man
|
2006-06-29 23:26:54 +02:00
|
|
|
man1dir=$(mandir)/man1
|
|
|
|
man7dir=$(mandir)/man7
|
2005-08-05 01:56:38 +02:00
|
|
|
# DESTDIR=
|
2005-07-14 19:21:57 -06:00
|
|
|
|
2007-02-11 17:54:40 +02:00
|
|
|
ASCIIDOC=asciidoc
|
2007-02-13 15:15:05 -08:00
|
|
|
ASCIIDOC_EXTRA =
|
2005-10-08 15:54:37 -07:00
|
|
|
INSTALL?=install
|
2006-12-23 08:26:09 -08:00
|
|
|
DOC_REF = origin/man
|
2005-07-14 19:21:57 -06:00
|
|
|
|
2006-09-01 00:31:08 +02:00
|
|
|
-include ../config.mak.autogen
|
2007-02-28 21:57:42 +01:00
|
|
|
-include ../config.mak
|
2006-09-01 00:31:08 +02:00
|
|
|
|
2005-05-22 18:44:15 +01: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-10 22:32:39 +01:00
|
|
|
|
|
|
|
html: $(DOC_HTML)
|
|
|
|
|
2006-07-14 16:32:38 -07:00
|
|
|
$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf
|
2005-05-22 18:44:15 +01:00
|
|
|
|
|
|
|
man: man1 man7
|
|
|
|
man1: $(DOC_MAN1)
|
|
|
|
man7: $(DOC_MAN7)
|
2005-05-10 22:32:39 +01:00
|
|
|
|
2005-09-21 12:29:59 -07:00
|
|
|
install: man
|
2006-06-29 23:26:54 +02:00
|
|
|
$(INSTALL) -d -m755 $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir)
|
2006-12-10 23:39:32 -08:00
|
|
|
$(INSTALL) -m644 $(DOC_MAN1) $(DESTDIR)$(man1dir)
|
|
|
|
$(INSTALL) -m644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
|
2005-07-14 19:21:57 -06:00
|
|
|
|
2005-11-04 00:06:20 -08:00
|
|
|
|
2005-11-06 23:30:56 -06:00
|
|
|
#
|
|
|
|
# Determine "include::" file references in asciidoc files.
|
|
|
|
#
|
2005-11-07 22:21:21 -08:00
|
|
|
doc.dep : $(wildcard *.txt) build-docdep.perl
|
2005-11-07 18:21:51 -08:00
|
|
|
rm -f $@+ $@
|
|
|
|
perl ./build-docdep.perl >$@+
|
|
|
|
mv $@+ $@
|
2005-11-06 23:30:56 -06:00
|
|
|
|
2005-11-07 18:21:51 -08:00
|
|
|
-include doc.dep
|
2005-11-04 00:06:20 -08:00
|
|
|
|
2007-01-18 16:02:13 -08:00
|
|
|
cmds_txt = cmds-ancillaryinterrogators.txt \
|
|
|
|
cmds-ancillarymanipulators.txt \
|
|
|
|
cmds-mainporcelain.txt \
|
|
|
|
cmds-plumbinginterrogators.txt \
|
|
|
|
cmds-plumbingmanipulators.txt \
|
2007-01-18 22:32:38 -08:00
|
|
|
cmds-synchingrepositories.txt \
|
|
|
|
cmds-synchelpers.txt \
|
|
|
|
cmds-purehelpers.txt \
|
|
|
|
cmds-foreignscminterface.txt
|
2007-01-18 16:02:13 -08:00
|
|
|
|
2007-01-19 11:33:27 -08:00
|
|
|
$(cmds_txt): cmd-list.perl $(MAN1_TXT)
|
2007-01-18 16:02:13 -08:00
|
|
|
perl ./cmd-list.perl
|
2005-05-10 22:32:39 +01:00
|
|
|
|
2007-01-18 16:02:13 -08:00
|
|
|
git.7 git.html: git.txt core-intro.txt
|
2005-11-06 23:30:56 -06:00
|
|
|
|
2005-05-10 22:32:39 +01:00
|
|
|
clean:
|
2007-01-17 13:04:39 -05:00
|
|
|
rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep
|
2007-01-18 16:02:13 -08:00
|
|
|
rm -f $(cmds_txt)
|
2005-05-10 22:32:39 +01:00
|
|
|
|
|
|
|
%.html : %.txt
|
2007-02-13 15:15:05 -08:00
|
|
|
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf $(ASCIIDOC_EXTRA) $<
|
2005-05-10 22:32:39 +01:00
|
|
|
|
2005-05-19 10:24:54 -06:00
|
|
|
%.1 %.7 : %.xml
|
2006-04-28 09:15:06 -04:00
|
|
|
xmlto -m callouts.xsl man $<
|
2005-05-10 22:32:39 +01:00
|
|
|
|
|
|
|
%.xml : %.txt
|
2007-02-11 17:54:40 +02:00
|
|
|
$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf $<
|
2005-08-14 17:24:36 -07:00
|
|
|
|
2007-01-07 19:23:49 -05:00
|
|
|
user-manual.xml: user-manual.txt user-manual.conf
|
2007-02-11 17:54:40 +02:00
|
|
|
$(ASCIIDOC) -b docbook -d book $<
|
2007-01-07 19:23:49 -05:00
|
|
|
|
2007-03-03 13:33:48 -05:00
|
|
|
XSLT = http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
|
2007-03-16 11:45:29 -04:00
|
|
|
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
|
2007-03-03 13:33:48 -05:00
|
|
|
|
2007-01-07 19:23:49 -05:00
|
|
|
user-manual.html: user-manual.xml
|
2007-03-03 13:33:48 -05:00
|
|
|
xsltproc $(XSLTOPTS) -o $@ $(XSLT) $<
|
2007-01-07 19:23:49 -05:00
|
|
|
|
2005-08-25 00:28:18 -07:00
|
|
|
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
|
|
|
|
rm -f $@+ $@
|
|
|
|
sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
|
|
|
|
mv $@+ $@
|
|
|
|
|
2005-08-30 13:51:01 -07:00
|
|
|
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
|
2007-02-11 17:54:40 +02:00
|
|
|
$(ASCIIDOC) -b xhtml11 $*.txt
|
2005-08-25 00:28:18 -07:00
|
|
|
|
|
|
|
WEBDOC_DEST = /pub/software/scm/git/docs
|
|
|
|
|
2005-08-29 22:38:12 -07:00
|
|
|
$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
|
|
|
|
rm -f $@+ $@
|
2007-02-11 17:54:40 +02:00
|
|
|
sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b xhtml11 - >$@+
|
2005-08-29 22:38:12 -07:00
|
|
|
mv $@+ $@
|
|
|
|
|
2005-08-25 00:28:18 -07:00
|
|
|
install-webdoc : html
|
|
|
|
sh ./install-webdoc.sh $(WEBDOC_DEST)
|
2006-12-23 08:26:09 -08:00
|
|
|
|
|
|
|
quick-install:
|
|
|
|
sh ./install-doc-quick.sh $(DOC_REF) $(mandir)
|