aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/Makefile24
-rwxr-xr-xDocumentation/fix-texi.perl15
-rw-r--r--Makefile6
3 files changed, 44 insertions, 1 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 443114b04..76a15ff52 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -44,6 +44,11 @@ INSTALL?=install
RM ?= rm -f
DOC_REF = origin/man
+infodir?=$(prefix)/share/info
+MAKEINFO=makeinfo
+INSTALL_INFO=install-info
+DOCBOOK2X_TEXI=docbook2x-texi
+
-include ../config.mak.autogen
-include ../config.mak
@@ -67,6 +72,8 @@ man1: $(DOC_MAN1)
man5: $(DOC_MAN5)
man7: $(DOC_MAN7)
+info: git.info
+
install: man
$(INSTALL) -d -m755 $(DESTDIR)$(man1dir)
$(INSTALL) -d -m755 $(DESTDIR)$(man5dir)
@@ -75,6 +82,14 @@ install: man
$(INSTALL) -m644 $(DOC_MAN5) $(DESTDIR)$(man5dir)
$(INSTALL) -m644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
+install-info: info
+ $(INSTALL) -d -m755 $(DESTDIR)$(infodir)
+ $(INSTALL) -m644 git.info $(DESTDIR)$(infodir)
+ if test -r $(DESTDIR)$(infodir)/dir; then \
+ $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) git.info ;\
+ else \
+ echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \
+ fi
../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
$(MAKE) -C ../ GIT-VERSION-FILE
@@ -110,7 +125,7 @@ cmd-list.made: cmd-list.perl $(MAN1_TXT)
git.7 git.html: git.txt core-intro.txt
clean:
- $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 howto-index.txt howto/*.html doc.dep
+ $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 *.texi *.texi+ howto-index.txt howto/*.html doc.dep
$(RM) $(cmds_txt) *.made
%.html : %.txt
@@ -138,6 +153,13 @@ XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
user-manual.html: user-manual.xml
xsltproc $(XSLTOPTS) -o $@ $(XSLT) $<
+git.info: user-manual.xml
+ $(RM) $@ $*.texi $*.texi+
+ $(DOCBOOK2X_TEXI) user-manual.xml --to-stdout >$*.texi+
+ perl fix-texi.perl <$*.texi+ >$*.texi
+ $(MAKEINFO) --no-split $*.texi
+ $(RM) $*.texi $*.texi+
+
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
$(RM) $@+ $@
sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
diff --git a/Documentation/fix-texi.perl b/Documentation/fix-texi.perl
new file mode 100755
index 000000000..ff7d78f62
--- /dev/null
+++ b/Documentation/fix-texi.perl
@@ -0,0 +1,15 @@
+#!/usr/bin/perl -w
+
+while (<>) {
+ if (/^\@setfilename/) {
+ $_ = "\@setfilename git.info\n";
+ } elsif (/^\@direntry/) {
+ print '@dircategory Development
+@direntry
+* Git: (git). A fast distributed revision control system
+@end direntry
+'; }
+ unless (/^\@direntry/../^\@end direntry/) {
+ print;
+ }
+}
diff --git a/Makefile b/Makefile
index 2f3b9b23e..b685c7e39 100644
--- a/Makefile
+++ b/Makefile
@@ -913,6 +913,9 @@ perl/Makefile: perl/Git.pm perl/Makefile.PL GIT-CFLAGS
doc:
$(MAKE) -C Documentation all
+info:
+ $(MAKE) -C Documentation info
+
TAGS:
$(RM) TAGS
$(FIND) . -name '*.[hcS]' -print | xargs etags -a
@@ -1005,6 +1008,9 @@ endif
install-doc:
$(MAKE) -C Documentation install
+install-info:
+ $(MAKE) -C Documentation install-info
+
quick-install-doc:
$(MAKE) -C Documentation quick-install