Generic Makefile for CMT projects
History
CMT is a tool that moves away from the de-facto standards in the Open Source and Linux communities, making the usage of standard tools (like
eclipse
) difficult to use. In some cases the tools are configurable enough to allow, with some efforts, to enable them to build our software.
Instead of configuring different tools to understand CMT, we can take another route: add a layer of wrapping around CMT that adheres to the santards mentioned above, for example by a
Makefile
that embed calls to the
cmt
program.
I started to write such a Makefile avoiding as much as possible LHCb-specific conventions to have a single file that could be used in any CMT project to simply call "make" "make clean" and have the project built in the correct way (you should know that the safest way to build a CMT project iis a call to
cmt broadcast cmt make
from the "main" package of the project). Along the way I discovered that the Makefile I was writing allowed to build a project using several processes in a way that has never been possible even combining
tbroadcast
and
cmt make -j
.
After some time, the generic Makefile was included in the project
LbScripts
How to get it
You may not have noticed, but you already have it. It is automatically added to each new local project created with
SetupProject --build-env
(or the shortcut
setenvProject
) and to each project checked out with
getpack --project
.
Actually, the Makefile created points simply to the one in the version of
LbScripts you are using, so that you will automatically pick up the new features whenever a new release of
LbScripts is put in production.
Usage
--
MarcoClemencic - 20-Nov-2009