Professional Documents
Culture Documents
Setting Up The Git Documentation Build Chain On Mac Os X Leopard
Setting Up The Git Documentation Build Chain On Mac Os X Leopard
Home » Wiki » Setting up the Git documentation build chain on Mac OS X Leopard
Installing the documentation build chain on Mac OS X is quite tedious, as it involves a lengthy dependency chain. For an alternative that does not involve
installing the tools, see "Installing pre-built Git documentation from the Git repo".
These notes are an updated version of "Installing Git 1.5.2.3 on Mac OS X Tiger".
Installing AsciiDoc
Since my last experience with AsciiDoc it has been updated from version 8.2.1 to 8.2.5.
wget http://www.methods.co.nz/asciidoc/asciidoc-8.2.5.tar.gz
tar xzvf asciidoc-8.2.5.tar.gz
cd asciidoc-8.2.5
sudo ./install.sh
# test
rm doc/asciidoc.html
asciidoc doc/asciidoc.txt
open doc/asciidoc.html
Note that the Git documentation expects AsciiDoc 7, not 8, so when building the Git documentation you need to pass an additional flag:
I later found that at least with the current version of AsciiDoc the produced documentation is flawed. The most significant problem is that all internal links are
broken, but there may be others. I spent an hour trying to work around this, without success. In the end the only solution was to uninstall 8 and overwrite it
with 7:
sudo rm -r /etc/asciidoc
1 de 5 28/11/10 11:29
wincent.com: Setting up the Git documentation build chain o... https://wincent.com/wiki/Setting_up_the_Git_documentation...
Since I originally wrote this article I understand that Git itself has been patched to workaround the regression in AsciiDoc 8. See 5162e69 in the main Git
repository. I haven't bothered to change my AsciiDoc install again, however.
Installing xmlto
If you now retry building the Git doc target:
You'll get somewhat farther; now the HTML version of the documentation will build but it may still choke on the user manual because of what I presume are
network connectivity issues:
But the build continued, yielding many warnings (screenfuls) like these:
So:
cd ..
wget http://software.frodo.looijaard.name/getopt/files/getopt-1.1.4.tar.gz
tar xzvf getopt-1.1.4.tar.gz
cd getopt-1.1.4
less README
make
Dies as follows:
2 de 5 28/11/10 11:29
wincent.com: Setting up the Git documentation build chain o... https://wincent.com/wiki/Setting_up_the_Git_documentation...
cd ..
wget http://mirrors.kernel.org/gnu/gettext/gettext-0.17.tar.gz
tar xzvf gettext-0.17.tar.gz
cd gettext-0.17
./configure
make
make check
FAIL: lang-librep
tr: Illegal byte sequence
FAIL: lang-guile
tr: Illegal byte sequence
FAIL: lang-smalltalk
tr: Illegal byte sequence
FAIL: lang-java
Skipping test: C# compiler not found
SKIP: lang-csharp
tr: Illegal byte sequence
FAIL: lang-gawk
Skipping test: ppc386 compiler not found
SKIP: lang-pascal
tr: Illegal byte sequence
FAIL: lang-ycp
tr: Illegal byte sequence
FAIL: lang-tcl
tr: Illegal byte sequence
FAIL: lang-perl-1
tr: Illegal byte sequence
FAIL: lang-perl-2
tr: Illegal byte sequence
FAIL: lang-php
tr: Illegal byte sequence
FAIL: lang-po
PASS: lang-rst
=======================
56 of 316 tests failed
(11 tests were not run)
=======================
make[3]: *** [check-TESTS] Error 1
make[2]: *** [check-am] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1
Given that the previous version of gettext had built successfully on Tiger (see "Installing Git 1.5.2.3 on Mac OS X Tiger") I decided to try it out on Leopard:
cd ..
wget http://mirrors.kernel.org/gnu/gettext/gettext-0.16.1.tar.gz
tar xzvf gettext-0.16.1.tar.gz
cd gettext-0.16.1
./configure
make
make check
1c1
< «Votre commande, s'il vous plait», dit le garçon.
---
> ?Votre commande, s'il vous plait?, dit le gar?on.
FAIL: lang-bash
cd ../getopt-1.1.4
make
3 de 5 28/11/10 11:29
wincent.com: Setting up the Git documentation build chain o... https://wincent.com/wiki/Setting_up_the_Git_documentation...
This is similar to what happened in Tiger; the solution is to modify the Makefile, changing
LDFLAGS=
To:
LDFLAGS=-lintl
make
sudo make install
cd ../xmlto-0.0.18
./configure
make
make check
sudo make install
As was the case with Tiger, installation also fails on Leopard, although the message is slightly different:
So:
4 de 5 28/11/10 11:29
wincent.com: Setting up the Git documentation build chain o... https://wincent.com/wiki/Setting_up_the_Git_documentation...
# would have liked to install this in /usr/local/etc, but only /etc works
sudo xmlcatalog --noout --add 'nextCatalog' '' 'file:///usr/local/share/docbook/docbook-xsl-1.73.2/catalog.xml' --create /etc/xml/catalog
With these changes we now see errors like the following in the make of xmlto:
cd /usr/local/share/docbook
sudo wget http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip
sudo unzip docbook-xml-4.2.zip -d docbook-xml-4.2
sudo xmlcatalog --noout --add nextCatalog '' file:///usr/local/share/docbook/docbook-xml-4.2/catalog.xml --create /etc/xml/catalog
cd path_to_xmlto
make clean
./configure
make
make check
sudo make install
cd path_to_git
make prefix=/usr/local doc
sudo make prefix=/usr/local install-doc
Tags
Comments
Add a comment
add a comment
contact
legal
5 de 5 28/11/10 11:29