gbuild: Eyecandy for developers
This is the fourth post in a short series of blog posts about the new GNU make based build system that will soon be integrated into the DEV300 codeline. It is covering getting nice output from gbuild.
Welcome back to the little blog series about the new GNU make build system. After talking about the dry topic of repositories, this post is a just a short post about the output of the new build system. It tries to keep the output calm and clean by default. When you start a build with:
you will get an kbuild-like output:
[ build CXX ] tools/source/misc/pathutils
[ build LOG ] tools
[ build LNK ] Library/libtllx.so
[ build MOD ] tools
[ build ALL ] top level modules: tools
[ build ALL ] loaded modules: tools
A make clean command result in the same clean output but with "clean" instead of "build". When setting some variables:
export gb_TITLES=T gb_COLOR=T
The output gets a little more attractive:
The left column shows a make clean, the middle column a make/make all (top: with color, bottom: without color). The .oO and Xx. ASCII art represent my best attempt at symbolizing a building/cleaning target. If you have a better idea, give me a note. Please note that the colored output will also help when using a verbose build as it will stick out between all the other output and allows easier orientation in the output. The gb_TITLES=T enables that the progress is also shown in the terminal title. Screenshots are not very good at conveying that, unfortunately.
The two terminal windows on the right show some of the verbose error messages that the gbuild system issues when it deems something wrong. Please note that these errors are reported early (before starting to really build anything) and not late (when trying to actually compile/link something that does not exist).
Here are a few conditions, that gbuild will try to detect and complain about:
- initial makefile outside of the source repositories
- no call to gb_Helper_register_repository in the Repository.mk
- adding an executable/library to an invalid group in gb_Helper_register_* (The error message will report the valid groups.)
- corrupted module stacks
- adding a object to a library which has no C/C++ source file in any of the repositories
- generating a component file which has no source file in any of the repositories
- generating resource for which there is no source file in any of the repositories
- linking against a library that was not registered in Repository.mk
- defining a library that was not registered in Repository.mk
- unknown platform
(This is a very raw mirror of the original blog post made to blogs.sun.com on 21 Dec 2010. As per http://web.archive.org/web/2009062714425
This was originally published at 2011-07-26 10:24:00/2011-07-26 08:24:55 on livejournal.