summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fa54870)
raw | patch | inline | side by side (parent: fa54870)
author | David Kastrup <dak@gnu.org> | |
Mon, 6 Aug 2007 10:22:57 +0000 (12:22 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 11 Aug 2007 06:16:18 +0000 (23:16 -0700) |
These patches use docbook2x in order to create an info version of the
git user manual. No existing Makefile targets (including "all") are
touched, so you need to explicitly say
make info
sudo make install-info
to get git.info created and installed. If the info target directory
does not already contain a "dir" file, no directory entry is created.
This facilitates $(DESTDIR)-based installations. The same could be
achieved with
sudo make INSTALL_INFO=: install-info
explicitly.
perl is used for patching up sub-par file and directory information in
the Texinfo file. It would be cleaner to place the respective info
straight into user-manual.txt or the conversion configurations, but I
find myself unable to find out how to do this with Asciidoc/Texinfo.
Signed-off-by: David Kastrup <dak@gnu.org>
git user manual. No existing Makefile targets (including "all") are
touched, so you need to explicitly say
make info
sudo make install-info
to get git.info created and installed. If the info target directory
does not already contain a "dir" file, no directory entry is created.
This facilitates $(DESTDIR)-based installations. The same could be
achieved with
sudo make INSTALL_INFO=: install-info
explicitly.
perl is used for patching up sub-par file and directory information in
the Texinfo file. It would be cleaner to place the respective info
straight into user-manual.txt or the conversion configurations, but I
find myself unable to find out how to do this with Asciidoc/Texinfo.
Signed-off-by: David Kastrup <dak@gnu.org>
Documentation/Makefile | patch | blob | history | |
Documentation/fix-texi.perl | [new file with mode: 0755] | patch | blob |
Makefile | patch | blob | history |
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 443114b0463e9c9ca7e99720e78d938049a1ea4b..76a15ff520fe444fe41c46dc17cac7b5df7731d5 100644 (file)
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
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
man5: $(DOC_MAN5)
man7: $(DOC_MAN7)
+info: git.info
+
install: man
$(INSTALL) -d -m755 $(DESTDIR)$(man1dir)
$(INSTALL) -d -m755 $(DESTDIR)$(man5dir)
$(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
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
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
--- /dev/null
@@ -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 2f3b9b23e3bffda6d97a7be83e6758e145ccb773..b685c7e39ef56513714c8b723f9fef055271780c 100644 (file)
--- a/Makefile
+++ b/Makefile
doc:
$(MAKE) -C Documentation all
+info:
+ $(MAKE) -C Documentation info
+
TAGS:
$(RM) TAGS
$(FIND) . -name '*.[hcS]' -print | xargs etags -a
install-doc:
$(MAKE) -C Documentation install
+install-info:
+ $(MAKE) -C Documentation install-info
+
quick-install-doc:
$(MAKE) -C Documentation quick-install