Development/Build System

From The Document Foundation Wiki
Jump to: navigation, search

This page is about the build system workflow and using it. To learn about the build system in itself, see the gbuild page.

High level build overview

  1. make (in top level) possibly reruns ./ (if any of configure dependencies changed) and calls make -f
  2. includes generated from configure step above
  3. TODO: describe gnu make process
  4. ooinstall creates installation set

Tools involved in build

  • concat-deps.c
  • TODO

Module dependencies

Generated with the new and shiny module-deps script (master has the latest):

digraph G {
node [shape="Mrecord", color="#BBBBBB"];
node  [fontname=Verdana, color="#BBBBBB", fontsize=10, height=0.02, width=0.02];
edge  [color="#31CEF0", len=0.4];
edge  [fontname=Arial, fontsize=10, fontcolor="#31CEF0"];
UnoControls -> tools;
accessibility -> svtools;
animations -> cppuhelper;
avmedia -> sfx2;
avmedia -> vcl;
basctl -> svx;
basebmp -> basegfx;
basegfx -> cppuhelper;
basic -> svtools;
basic -> xmlscript;
binaryurp -> cppuhelper;
bridges -> jvmaccess;
canvas -> cppuhelper;
canvas -> svtools;
chart2 -> svx;
comphelper -> ucbhelper;
configmgr -> comphelper;
connectivity -> jvmaccess;
connectivity -> svl;
cppcanvas -> canvas;
cppu -> salhelper;
cppuhelper -> unoidl;
cppuhelper -> xmlreader;
cui -> svx;
dbaccess -> connectivity;
dbaccess -> xmloff;
dbaccess -> svx;
desktop -> helpcompiler;
desktop -> svx;
drawinglayer -> cppcanvas;
dtrans -> cppuhelper;
editeng -> linguistic;
editeng -> svtools;
embeddedobj -> vcl;
eventattacher -> comphelper;
extensions -> svx;
extensions -> connectivity;
fileaccess -> unotools;
filter -> svx;
filter -> xmloff;
filter -> package;
forms -> connectivity;
forms -> svx;
formula -> sfx2;
fpicker -> svtools;
framework -> svtools;
helpcompiler -> comphelper;
hwpfilter -> comphelper;
i18npool -> sal;
i18npool -> i18nutil;
i18nutil -> comphelper;
io -> cppuhelper;
javaunohelper -> sal;
javaunohelper -> cppuhelper;
javaunohelper -> jvmaccess;
jurt -> sal;
jvmaccess -> cppu;
jvmfwk -> cppuhelper;
lingucomponent -> unotools;
lingucomponent -> linguistic;
linguistic -> xmloff;
lotuswordpro -> svx;
oox -> filter;
package -> sax;
padmin -> svtools;
pyuno -> cppuhelper;
registry -> store;
remotebridges -> cppuhelper;
reportdesign -> dbaccess;
reportdesign -> formula;
salhelper -> sal;
sax -> comphelper;
sc -> formula;
sc -> vbahelper;
sc -> oox;
scaddins -> tools;
sccomp -> tools;
scripting -> vbahelper;
scripting -> tools;
sd -> oox;
sd -> xmlsecurity;
sdext -> basegfx;
sfx2 -> drawinglayer;
sfx2 -> framework;
sfx2 -> sax;
sfx2 -> basic;
shell -> cppuhelper;
shell -> sal;
slideshow -> avmedia;
slideshow -> cppcanvas;
smoketest -> unotest;
sot -> unotools;
starmath -> oox;
stoc -> jvmaccess;
stoc -> jvmfwk;
store -> sal;
svgio -> drawinglayer;
svgio -> sax;
svl -> i18nutil;
svl -> jvmfwk;
svl -> sot;
svtools -> toolkit;
svx -> avmedia;
svx -> editeng;
sw -> oox;
sw -> vbahelper;
test -> svtools;
test -> unotest;
toolkit -> vcl;
tools -> basegfx;
tools -> i18npool;
ucb -> tools;
ucbhelper -> cppuhelper;
unoidl -> registry;
unoidl -> salhelper;
unotest -> comphelper;
unotools -> tools;
unoxml -> sax;
uui -> svtools;
vbahelper -> filter;
vcl -> svl;
vcl -> jvmaccess;
vcl -> basebmp;
writerfilter -> oox;
writerperfect -> xmloff;
writerperfect -> sfx2;
xmlhelp -> unotools;
xmlhelp -> helpcompiler;
xmloff -> sax;
xmloff -> vcl;
xmlreader -> cppu;
xmlscript -> comphelper;
xmlsecurity -> svx;
xmlsecurity -> xmloff;}

Build diagnostic

There are some useful command-line options for debugging:

  • --just-print (-n)
  • --print-data-base (-p)
  • --debug

This option is supposed to suppress all command execution.


This executes the makefile, displaying commands as they are run by make, then it will dump its internal database.


This provides the most detailed information available without running the debugger. There are five native debugging options and two more added in patched make 3.82 version from dev-tools repository:

  1. basic is the least detailed information. When enabled, make prints each target that is found to be out-of-date and the status of update action;
  2. verbose set the basic option and includes additional information about which files were parsed, prerequisites that did not need to be rebuilt;
  3. implicit sets the basic and includes additional information about implicit rule searches for each target;
  4. jobs prints the details of subprocesses invoked by make;
  5. all all options and is default, when -d is used;
  6. makefile (m) includes updating any included files, such as lists of dependencies;
  7. call (c) expands all calls and shows their results; and
  8. eval (v) will tell you about all targets that are being updated and what recipes are run.

If the debugging option specified as --debug, basic debugging is used. If the debugging option is given as -d, all is used. To select other combinations of options, comma separated list --debug=options1,options2 is used, where the option can be one of the previous options (actually, make looks only at the first letter), i.e.

make --debug=c,v


Q. Why the term "class" is used in gbuild context?

A. See Classes are composed from structural and behavioral constituents.⁠Wikipedia logo v3.svg

Q. How can I build one module from tail_build and honor the dependency?

A. Something like the following should work:

cd tail_build && make <absolute-path-to-workdir>/Module/<module-name>

Q. How to shorten the make call for specific targets?

A. Instead of:

make /home/david/libo/workdir/unxlngx6/CppunitTest/sw_macros_test.test

you can just say:

make CppunitTest_sw_macros_test

iow for all these classes


you can just say:

make <class>_<target>

or even

make <class>

which builds the given class for all targets.

Q. What are the three letter codes that appear when I run make?

A. An (incomplete) list of codes are:

  • [CXX] - build C++ file
  • [C ] - build C file
  • [LNK] - linker
  • [OCX] - build Objective-C++ file
  • [CUT] - C/C++ unit test
  • [GPF] - gperf

This should hint at the rest of the abbreviations: