The first part of the talk will describe the OpenOffice build system with its five parts: configuration, building of individual modules with the legacy dmake and the new gbuild system is controlled by the Perl script build.pl. A final step created installation steps.
The second part will point out problems with the existing system and show some ways to improve it.
Apache OpenOffice has a very heterogeneous and non-standard build system that consists of five parts.
Configuration is mostly done by autoconf but does not use automake. Building the modules is done two different versions of make: dmake and GNU make. Both use a non-standard way to separate data from recipes. The modules only contain lists of files that have to be compiled and linked into libraries. A collection of makefiles in solenv contains the logic of how to compile and link on different platforms. The newer gbuild system even defines its own language on top of GNU make macros.
Both the legacy dmake and the new gbuild are controlled by build.pl and a number of Perl modules. Dependencies between modules, defined by build.lst file, specify the order in which build.pl calls dmake for individual directories or GNU make for whole modules. It interprets d.lst files for delivering headers and libraries into the central output tree.
In the final step make_installer.pl creates platform specific installation sets. It is the head of a large collection of Perl modules that use information from scp2 about which files are to be included. All files that have been compiled, linked, copied or otherwise created are copied again to a temporary directory tree that resembles the file structure of the installed office. Archives that have been created in previous steps are unpacked.
The build system is optimized to run on Linux, MacOSX is a bit slower, on Windows it runs considerably slower. This is probably caused by two things: the file system caching that works not so well on Windows as it does on Linux and the frequent calls of external executables (like awk, perl, dmake). Process creation is fast on Linux but slow on Windows.
There are several ways to make building OpenOffice faster. As we can not make the actual compilation faster we have to reduce the time that is wasted in between: copying files unnecessarily from A to B to C to D, first packing files into archives and later unpacking them, translate files into languages for which no installation set will be built, creating unnecessary processes for things that could be done in-process.