kbuild dependency help
I am working on a module which is built in multiple stages. Two of these stages rely on objects within the same sub directory (and sometimes you might want to skip the one of the stages...). To break this up the authors of the module decided to create two targets, both using different links to the directory where the source files are stored.
The result is that kbuild tries to build the same object files twice. The problem is because the link name differs between the two stages, the command line used to build the objects differs on the two stages. And because Kbuild uses the command line as a dependency, it ends up always rebuilding the object files twice for every single build.
Is there an elegant way around this (make kbuild ignore the command-line part of the dependency)?
If not, is it possible to put a dependency on each of the .o files that could run sed on the .cmd file, and replace the link names in the command line so the command line is always consistent?
Any comments appreciated
Thanks,
John
|