2006-03-05 10:36:33 +01:00
|
|
|
MAN1_TXT= \
|
|
|
|
$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
|
|
|
|
$(wildcard git-*.txt)) \
|
|
|
|
gitk.txt
|
2005-05-22 19:44:15 +02:00
|
|
|
MAN7_TXT=git.txt
|
2005-05-10 23:32:39 +02:00
|
|
|
|
2005-08-24 00:28:34 +02:00
|
|
|
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
|
2005-08-30 22:51:01 +02:00
|
|
|
|
2005-09-02 01:56:13 +02:00
|
|
|
ARTICLES = tutorial
|
2006-05-22 01:49:34 +02:00
|
|
|
ARTICLES += tutorial-2
|
2006-01-23 07:43:59 +01:00
|
|
|
ARTICLES += core-tutorial
|
2005-09-02 01:56:13 +02:00
|
|
|
ARTICLES += cvs-migration
|
|
|
|
ARTICLES += diffcore
|
|
|
|
ARTICLES += howto-index
|
|
|
|
ARTICLES += repository-layout
|
2005-09-03 06:19:26 +02:00
|
|
|
ARTICLES += hooks
|
2005-12-10 08:07:29 +01:00
|
|
|
ARTICLES += everyday
|
2006-03-05 10:36:33 +01:00
|
|
|
ARTICLES += git-tools
|
2005-08-30 22:51:01 +02:00
|
|
|
# with their own formatting rules.
|
|
|
|
SP_ARTICLES = glossary howto/revert-branch-rebase
|
|
|
|
|
|
|
|
DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
|
2005-08-30 08:09:22 +02:00
|
|
|
|
2005-05-22 19:44:15 +02:00
|
|
|
DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
|
|
|
|
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
|
|
|
|
|
2005-10-09 00:54:37 +02:00
|
|
|
prefix?=$(HOME)
|
2005-07-15 03:21:57 +02:00
|
|
|
bin=$(prefix)/bin
|
|
|
|
mandir=$(prefix)/man
|
|
|
|
man1=$(mandir)/man1
|
|
|
|
man7=$(mandir)/man7
|
2005-08-05 01:56:38 +02:00
|
|
|
# DESTDIR=
|
2005-07-15 03:21:57 +02:00
|
|
|
|
2005-10-09 00:54:37 +02:00
|
|
|
INSTALL?=install
|
2005-07-15 03:21:57 +02:00
|
|
|
|
2005-05-22 19:44:15 +02: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 23:32:39 +02:00
|
|
|
|
|
|
|
html: $(DOC_HTML)
|
|
|
|
|
2006-07-15 01:32:38 +02:00
|
|
|
$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf
|
2005-05-22 19:44:15 +02:00
|
|
|
|
|
|
|
man: man1 man7
|
|
|
|
man1: $(DOC_MAN1)
|
|
|
|
man7: $(DOC_MAN7)
|
2005-05-10 23:32:39 +02:00
|
|
|
|
2005-09-21 21:29:59 +02:00
|
|
|
install: man
|
2006-05-25 14:37:46 +02:00
|
|
|
$(INSTALL) -d -m755 $(DESTDIR)$(man1) $(DESTDIR)$(man7)
|
|
|
|
$(INSTALL) $(DOC_MAN1) $(DESTDIR)$(man1)
|
|
|
|
$(INSTALL) $(DOC_MAN7) $(DESTDIR)$(man7)
|
2005-07-15 03:21:57 +02:00
|
|
|
|
2005-11-04 09:06:20 +01:00
|
|
|
|
2005-11-07 06:30:56 +01:00
|
|
|
#
|
|
|
|
# Determine "include::" file references in asciidoc files.
|
|
|
|
#
|
2005-11-08 07:21:21 +01:00
|
|
|
doc.dep : $(wildcard *.txt) build-docdep.perl
|
2005-11-08 03:21:51 +01:00
|
|
|
rm -f $@+ $@
|
|
|
|
perl ./build-docdep.perl >$@+
|
|
|
|
mv $@+ $@
|
2005-11-07 06:30:56 +01:00
|
|
|
|
2005-11-08 03:21:51 +01:00
|
|
|
-include doc.dep
|
2005-11-04 09:06:20 +01:00
|
|
|
|
2006-01-25 07:52:22 +01:00
|
|
|
git.7: README
|
|
|
|
|
|
|
|
README: ../README
|
|
|
|
cp $< $@
|
2005-05-10 23:32:39 +02:00
|
|
|
|
2005-11-07 06:30:56 +01:00
|
|
|
|
2005-05-10 23:32:39 +02:00
|
|
|
clean:
|
2006-01-25 07:52:22 +01:00
|
|
|
rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep README
|
2005-05-10 23:32:39 +02:00
|
|
|
|
|
|
|
%.html : %.txt
|
2005-09-19 12:10:14 +02:00
|
|
|
asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
|
2005-05-10 23:32:39 +02:00
|
|
|
|
2005-05-19 18:24:54 +02:00
|
|
|
%.1 %.7 : %.xml
|
2006-04-28 15:15:06 +02:00
|
|
|
xmlto -m callouts.xsl man $<
|
2005-05-10 23:32:39 +02:00
|
|
|
|
|
|
|
%.xml : %.txt
|
2005-09-19 12:10:14 +02:00
|
|
|
asciidoc -b docbook -d manpage -f asciidoc.conf $<
|
2005-08-15 02:24:36 +02:00
|
|
|
|
2006-01-25 07:52:22 +01:00
|
|
|
git.html: git.txt README
|
2005-08-30 22:51:01 +02:00
|
|
|
|
2005-08-18 17:28:57 +02:00
|
|
|
glossary.html : glossary.txt sort_glossary.pl
|
|
|
|
cat $< | \
|
|
|
|
perl sort_glossary.pl | \
|
|
|
|
asciidoc -b xhtml11 - > glossary.html
|
|
|
|
|
2005-08-25 09:28:18 +02:00
|
|
|
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
|
|
|
|
rm -f $@+ $@
|
|
|
|
sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
|
|
|
|
mv $@+ $@
|
|
|
|
|
2005-08-30 22:51:01 +02:00
|
|
|
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
|
|
|
|
asciidoc -b xhtml11 $*.txt
|
2005-08-25 09:28:18 +02:00
|
|
|
|
|
|
|
WEBDOC_DEST = /pub/software/scm/git/docs
|
|
|
|
|
2005-08-30 07:38:12 +02:00
|
|
|
$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
|
|
|
|
rm -f $@+ $@
|
|
|
|
sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+
|
|
|
|
mv $@+ $@
|
|
|
|
|
2005-08-25 09:28:18 +02:00
|
|
|
install-webdoc : html
|
|
|
|
sh ./install-webdoc.sh $(WEBDOC_DEST)
|