# request for pre-generated git.info pages

6 messages from 2008-10-29 to 2008-10-31. Participants: Leo Razoumov, Mike Ralphson, Miklos Vajna, Kalle Olavi Niemitalo.
Thread: https://gitlist.dev/t/16087

## Leo Razoumov, 2008-10-29 22:00

Subject: request for pre-generated git.info pages
Message-ID: <ee2a733e0810291500o67b3f94fibef63e0a173e8cc1@mail.gmail.com>
URL: https://gitlist.dev/e/ee2a733e0810291500o67b3f94fibef63e0a173e8cc1%40mail.gmail.com

```
I am an emacs user but with my current setup I have difficulties
generating git.info pages. Main Git repo already provides
pre-generated man and html  documentation in "man" and "html"
branches. I would kindly beg to extend this privilege to "info" pages
to benefit all the emacs users out there.

--Leo--

```

## Mike Ralphson, 2008-10-30 09:06

Subject: Re: request for pre-generated git.info pages
Message-ID: <e2b179460810300206g79e06c63m2060092fa654b18b@mail.gmail.com>
URL: https://gitlist.dev/e/e2b179460810300206g79e06c63m2060092fa654b18b%40mail.gmail.com
In-Reply-To: <ee2a733e0810291500o67b3f94fibef63e0a173e8cc1@mail.gmail.com>

```
2008/10/29 Leo Razoumov <slonik.az@gmail.com>:
> I am an emacs user but with my current setup I have difficulties
> generating git.info pages. Main Git repo already provides
> pre-generated man and html  documentation in "man" and "html"
> branches. I would kindly beg to extend this privilege to "info" pages
> to benefit all the emacs users out there.

Unfortunately I don't have a working asciidoc etc toolchain either
(though I will take a look at getting it working on my central git box
which is Linux based). As I'm not an emacs or Info user I probably
wouldn't know if they were building correctly anyway.

However, if anyone can do the above, I'll be happy to help them get
set up to push an 'info' branch to gitbuild.git
(http://repo.or.cz/w/git/gitbuild.git).

How often would you want the info pages rebuilt? Just the versions
which Junio tags? Or would you only want them built from one branch
(e.g. maint)?

Mike

```

## Miklos Vajna, 2008-10-30 09:33

Subject: Re: request for pre-generated git.info pages
Message-ID: <20081030093335.GM24201@genesis.frugalware.org>
URL: https://gitlist.dev/e/20081030093335.GM24201%40genesis.frugalware.org
In-Reply-To: <e2b179460810300206g79e06c63m2060092fa654b18b@mail.gmail.com>

```
On Thu, Oct 30, 2008 at 09:06:35AM +0000, Mike Ralphson <mike.ralphson@gmail.com> wrote:
> How often would you want the info pages rebuilt? Just the versions
> which Junio tags? Or would you only want them built from one branch
> (e.g. maint)?

Probably it could be done in a similar way to the html and the man pages
(each time master is updated + for tags).

```

## Mike Ralphson, 2008-10-30 12:01

Subject: Re: request for pre-generated git.info pages
Message-ID: <e2b179460810300501s5569b03ej56616a8ab1c8c28e@mail.gmail.com>
URL: https://gitlist.dev/e/e2b179460810300501s5569b03ej56616a8ab1c8c28e%40mail.gmail.com
In-Reply-To: <e2b179460810300206g79e06c63m2060092fa654b18b@mail.gmail.com>

```
2008/10/30 Mike Ralphson <mike.ralphson@gmail.com>:
> Unfortunately I don't have a working asciidoc etc toolchain either
> (though I will take a look at getting it working on my central git box
> which is Linux based). As I'm not an emacs or Info user I probably
> wouldn't know if they were building correctly anyway.

The only machine at my disposal with a working Python installation
(and I'm afraid I don't feel inclined to install it anywhere else,
Python on AIX is painful, and obviously if I was a Python nut, I'd be
running mercurial anyway, right?) is my desktop cygwin installation.

At least there obtaining asciidoc was no problem, but I think I'm
stuck in some docbook2x dependency hell with lots of twisty turny
prerequisities, all alike.

Now deep in a dark cave with a sign saying "Can't locate
XML/Handler/SGMLSpl.pm in @INC", which is where my adventure ends.
Score 0/100.

So a volunteer would still be appreciated.

Mike

```

## Kalle Olavi Niemitalo, 2008-10-30 23:06

Subject: Re: request for pre-generated git.info pages
Message-ID: <8763n98yz7.fsf@Astalo.kon.iki.fi>
URL: https://gitlist.dev/e/8763n98yz7.fsf%40Astalo.kon.iki.fi
In-Reply-To: <ee2a733e0810291500o67b3f94fibef63e0a173e8cc1@mail.gmail.com>

```
"Leo Razoumov" <slonik.az@gmail.com> writes:

> I am an emacs user but with my current setup I have difficulties
> generating git.info pages.

This bug in docbook2x 0.8.8 can result in empty *.texi files:
http://sourceforge.net/tracker/index.php?func=detail&aid=1912754&group_id=7856&atid=107856
`db2x_teximl' does not honor `--to-stdout'

With docbook2x 0.8.3, I successfully built git.info and gitman.info.
However, the Info browser does not recognize cross-references
between them.  I am playing with some patches to fix those.

```

## Kalle Olavi Niemitalo, 2008-10-31 00:19

Subject: Re: request for pre-generated git.info pages
Message-ID: <871vxx8vkg.fsf@Astalo.kon.iki.fi>
URL: https://gitlist.dev/e/871vxx8vkg.fsf%40Astalo.kon.iki.fi
In-Reply-To: <8763n98yz7.fsf@Astalo.kon.iki.fi>

```
Kalle Olavi Niemitalo <kon@iki.fi> writes:

> However, the Info browser does not recognize cross-references
> between them.  I am playing with some patches to fix those.

This seems to fix it, although the result isn't pretty.
Not signed off.

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 62269e3..56e1cf5 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -184,12 +184,12 @@ git.info: user-manual.texi
 
 user-manual.texi: user-manual.xml
 	$(RM) $@+ $@
-	$(DOCBOOK2X_TEXI) user-manual.xml --to-stdout | $(PERL_PATH) fix-texi.perl >$@+
+	$(DOCBOOK2X_TEXI) -s texi.xsl user-manual.xml --to-stdout | $(PERL_PATH) fix-texi.perl >$@+
 	mv $@+ $@
 
 gitman.texi: $(MAN_XML) cat-texi.perl
 	$(RM) $@+ $@
-	($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) --to-stdout $(xml);)) | \
+	($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) -s texi.xsl --to-stdout $(xml);)) | \
 	$(PERL_PATH) cat-texi.perl $@ >$@+
 	mv $@+ $@
 
diff --git a/Documentation/texi.xsl b/Documentation/texi.xsl
new file mode 100644
index 0000000..5c6f4cd
--- /dev/null
+++ b/Documentation/texi.xsl
@@ -0,0 +1,17 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://docbook2x.sourceforge.net/xmlns/Texi-XML"
+                version="1.0">
+  <!-- docbook2x 0.8.3 recognizes sf.net but not sourceforge.net.  -->
+  <xsl:import href="http://docbook2x.sf.net/latest/xslt/texi/docbook.xsl"/>
+
+  <!-- In a man page, asciidoc.conf expands linkgit to citerefentry.
+       Each man page goes in gitman.texi so ref/@file is not needed.  -->
+  <xsl:template match="citerefentry[starts-with(refentrytitle, 'git')]">
+    <ref node="{refentrytitle}" />
+  </xsl:template>
+
+  <!-- In Git User's Manual, user-manual.conf expands linkgit to ulink.  -->
+  <xsl:template match="ulink[starts-with(@url, 'git') and substring(@url, string-length(@url) - 4) = '.html']">
+    <ref node="{substring(@url, 1, string-length(@url) - 5)}" file="gitman.info" />
+  </xsl:template>
+</xsl:stylesheet>

```
