Next Previous Contents

11. Developer information

This section contains instructions specifically for those wishing to modify the DOMjudge source. If you have any questions about developing DOMjudge, or if you want to share your changes that may be useful to others, please don't hesitate to contact us through our development mailing list.

11.1 Bootstrapping from Git repository sources

The installation steps in this document assume that you are using a downloaded tarball from the DOMjudge website. If you want to install from Git repository sources, because you want to use the bleeding edge code or consider to send a patch to the developers, the configure/build system first has to be bootstrapped.

This requires additional software to be installed:

On Debian(-based) systems, the following apt command should install the additionally required packages (next to the standard set of packages):


sudo apt install autoconf automake git composer

Composer is packaged since Debian Stretch and Ubuntu Xenial. Alternatively, it can be installed by following the documentation located here.

When this software is present, bootstrapping can be done by running make dist, which creates the configure script, downloads and installs the PHP dependencies via composer and generates documentation from SGML/LaTeX sources.

11.2 Maintainer mode installation

Besides the two modes of installation described in section Installation system, DOMjudge provides a special maintainer mode installation. This method does an in-place installation within the source tree. This allows one to immediately see effects when modifying code.

This method requires some special steps which can most easily be run via makefile rules as follows:


sudo apt install acl
make maintainer-conf [CONFIGURE_FLAGS=<extra options for ./configure>]
make maintainer-install

Note that these targets have to be executed separately and they replace the steps described in the section Installation system; also no --prefix flag or other directories have to be specified to configure. In this case the binaries (e.g. judgedaemon and dj_setup_database) can be found in their respective source directories, and are also symlinked in bin.

11.3 Makefile structure

The Makefiles in the source tree use a recursion mechanism to run make targets within the relevant subdirectories. The recursion is handled by the REC_TARGETS and SUBDIRS variables and the recursion step is executed in Makefile.global. Any target added to the REC_TARGETS list will be recursively called in all directories in SUBDIRS. Moreover, a local variant of the target with -l appended is called after recursing into the subdirectories, so recursion is depth-first.

The targets dist, clean, distclean, maintainer-clean are recursive by default, which means that these call their local -l variants in all directories containing a Makefile. This allows for true depth-first traversal, which is necessary to correctly run the *clean targets: otherwise e.g. paths.mk will be deleted before subdirectory *clean targets are called that depend on information in it.


Next Previous Contents