Sunday, April 10, 2005

Setting up a DocBook build environment on OS X

In my work with m0n0wall and pfSense, I work with DocBook XML sources frequently. I currently run my builds on a Pentium 4 1.6 GHz FreeBSD 5.3 box, but figured it would be easy to set up on OS X and should run quite a bit faster on my Mac. I was correct on one of those two.

Prerequisite Components
You need to install three things from Darwin ports before doing a build.
port install docbook-xml
port install docbook-xsl
port install libxslt
Then you just need a script to build the sources. The script I use is available here.

Speed Comparison
I posted earlier that StatCVS is dramatically faster on my 1.42 GHz G4 as compared to a FreeBSD 5.3 Pentium 4 1.6 GHz system. I was shocked to see that xsltproc is actually a decent amount slower on my Mac than it is on my P4 1.6 when building the m0n0wall Users Guide. FreeBSD takes 39 seconds, the Mac takes 58 seconds. These results are repeatable, +/- 3 seconds on each. It's CPU-bound, with xsltproc taking up 100% CPU while running on both.

If anyone knows why this is the case, or how to improve the performance on the Mac, please email me.


Post a Comment

<< Home