Source-code repositories

As briefly introduced in Section Source-tree structure, Genode's source tree is organized in the form of several source-code repositories. This coarse-grained modularization of the source code has the following benefits:

The build-directory configuration defines the set of repositories to incorporate into the build process. At build time, the build system overlays the directory structures of all selected repositories to form a single logical source tree. The selection of source-code repositories ultimately defines the view of the build system on the source tree.

Note that the order of the repositories as configured in the build configuration (in etc/build.conf) is important. Front-most repositories shadow subsequent repositories. This makes the repository mechanism a powerful tool for tweaking existing repositories: By adding a custom repository in front of another one, customized versions of single files (e.g., header files or target description files) can be supplied to the build system without changing the original repository.

Each source-code repository has the principle structure shown in Table 1.

Directory Description
doc/ Documentation, specific for the repository
etc/ Default configuration for the build process
mk/ Build-system supplements
include/ Globally visible header files
src/ Source codes and target build descriptions
lib/mk/ Library build descriptions
lib/import/ Library import descriptions
ports/ Port descriptions of 3rd-party software

Table 1: Structure of a source-code repository. Depending on the repository, only a subset of those directories may be present.