5.3 Package Dependencies

To resolve inter-package dependencies basically two mechanisms are used. The first one is an explicit notation in the l4/pkg/Makefile: each package is separated into three parts: headers, lib, and bin. The headers parts consists of the idl and include subdirectories of the package. The lib part contains the lib subdirectory and the bin part does contain the server and examples subdirectories. Usually the L4 packages are build in the order of first building all headers sections, then all lib sections and finally all bin sections. The packages belonging to the L4 Environment are here preferred above the rest: so first all of the above steps for the L4 Environment, later the same steps for the rest.

You will find several of explicit dependencies between the parts of different packages specified in l4/pkg/Makefile. These are respected by make during the build process and will ensure the correct order of building the packages. However, this mechanism fails if a package is not present in your source tree. Then make will silently ignore that dependency and you will probably see errors of missing include files during compile or unresolved symbols when linking binaries. This is where the second mechanism comes into play.

In your Makefiles you may specify the Variable DEPENDS_PKGS with a list of other packages that have to be present for this package to compile. Whenever the build systems finds this variable it will check in the l4/pkg directory for package directories with that names. If a package from the list is missing in the directory, an error is printed and the make run is aborted. Thus, you can specify inter-package dependencies.

L4 Checker 2012-04-11