{"thread":{"id":"9405","subject":"[PATCH] Add support for an info version of the user manual","startedAt":"2007-08-06T09:41:48Z","lastAt":"2007-08-06T10:19:43Z","messageCount":2,"participants":["David Kastrup"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"50006","messageId":"86r6mhc6k7.fsf@lola.quinscape.zz","threadId":"9405","inReplyTo":null,"subject":"[PATCH] Add support for an info version of the user manual","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-08-06T09:41:48Z","receivedAt":"2007-08-06T09:41:48Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"\nThese patches use docbook2x in order to create an info version of the\ngit user manual.  No existing Makefile targets (including \"all\") are\ntouched, so you need to explicitly say\n\nmake info\nsudo make install-info\n\nto get git.info created and installed.  If the info target directory\ndoes not already contain a \"dir\" file, no directory entry is created.\nThis facilitates $(DESTDIR)-based installations.  The same could be\nachieved with\n\nsudo make INSTALL_INFO=: install-info\n\nexplicitly.\n\nawk is used for patching up sub-par file and directory information in\nthe Texinfo file.  It would be cleaner to place the respective info\nstraight into user-manual.txt or the conversion configurations, but I\nfind myself unable to find out how to do this with Asciidoc/Texinfo.\n\nSigned-off-by: David Kastrup <dak@gnu.org>\n---\n Documentation/Makefile |   28 ++++++++++++++++++++++++++++\n Makefile               |    6 ++++++\n 2 files changed, 34 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex 443114b..5a5961b 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -44,6 +44,11 @@ INSTALL?=install\n RM ?= rm -f\n DOC_REF = origin/man\n \n+infodir?=$(prefix)/share/info\n+MAKEINFO=makeinfo\n+INSTALL_INFO=install-info\n+DOCBOOK2X_TEXI=docbook2x-texi\n+\n -include ../config.mak.autogen\n -include ../config.mak\n \n@@ -67,6 +72,8 @@ man1: $(DOC_MAN1)\n man5: $(DOC_MAN5)\n man7: $(DOC_MAN7)\n \n+info: git.info\n+\n install: man\n \t$(INSTALL) -d -m755 $(DESTDIR)$(man1dir)\n \t$(INSTALL) -d -m755 $(DESTDIR)$(man5dir)\n@@ -75,6 +82,14 @@ install: man\n \t$(INSTALL) -m644 $(DOC_MAN5) $(DESTDIR)$(man5dir)\n \t$(INSTALL) -m644 $(DOC_MAN7) $(DESTDIR)$(man7dir)\n \n+install-info: info\n+\t$(INSTALL) -d -m755 $(DESTDIR)$(infodir)\n+\tif test -r $(DESTDIR)$(infodir)/dir; then \\\n+\t  $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) git.info ;\\\n+\telse \\\n+\t  $(INSTALL) -m644 git.info $(DESTDIR)$(infodir) ; \\\n+\t  echo \"No directory found in $(DESTDIR)$(infodir)\" >&2 ; \\\n+\tfi\n \n ../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n \t$(MAKE) -C ../ GIT-VERSION-FILE\n@@ -138,6 +153,19 @@ XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css\n user-manual.html: user-manual.xml\n \txsltproc $(XSLTOPTS) -o $@ $(XSLT) $<\n \n+git.info: user-manual.xml\n+\t$(RM) $@ $*.texi\n+\t$(DOCBOOK2X_TEXI) user-manual.xml --to-stdout | \\\n+\tawk '/^@setfilename/{$$2=\"git.info\"};\\\n+\t     /^@direntry/{print \"@dircategory Development\"; \\\n+\t                  print \"@direntry\"; \\\n+\t                  print \"* Git: (git).           A fast distributed revision control system\"; \\\n+\t\t\t  print \"@end direntry\"}; \\\n+\t     /^@direntry/,/^@end direntry/ { next }; \\\n+\t     {print}' > $*.texi\n+\t$(MAKEINFO) --no-split $*.texi\n+\t$(RM) $*.texi\n+\n howto-index.txt: howto-index.sh $(wildcard howto/*.txt)\n \t$(RM) $@+ $@\n \tsh ./howto-index.sh $(wildcard howto/*.txt) >$@+\ndiff --git a/Makefile b/Makefile\nindex 2f3b9b2..b685c7e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -913,6 +913,9 @@ perl/Makefile: perl/Git.pm perl/Makefile.PL GIT-CFLAGS\n doc:\n \t$(MAKE) -C Documentation all\n \n+info:\n+\t$(MAKE) -C Documentation info\n+\n TAGS:\n \t$(RM) TAGS\n \t$(FIND) . -name '*.[hcS]' -print | xargs etags -a\n@@ -1005,6 +1008,9 @@ endif\n install-doc:\n \t$(MAKE) -C Documentation install\n \n+install-info:\n+\t$(MAKE) -C Documentation install-info\n+\n quick-install-doc:\n \t$(MAKE) -C Documentation quick-install\n \n-- \n1.5.3.rc4.21.ga63eb\n"},{"id":"50007","messageId":"86myx5c6dc.fsf@lola.quinscape.zz","threadId":"9405","inReplyTo":"86r6mhc6k7.fsf@lola.quinscape.zz","subject":"Re: [PATCH] Add support for an info version of the user manual","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-08-06T10:19:43Z","receivedAt":"2007-08-06T10:19:43Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"David Kastrup <dak@gnu.org> writes:\n\n> These patches use docbook2x in order to create an info version of the\n> git user manual.  No existing Makefile targets (including \"all\") are\n> touched, so you need to explicitly say\n\nScrap that.  The installation case where install-info is used does not\nwork properly yet.  Another version coming up.\n\n-- \nDavid Kastrup\n"}]}