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