[KDev4] buildtools/builder API suggestion.

dukju ahn dukjuahn at gmail.com
Sun Apr 29 12:52:54 UTC 2007


2007/4/29, dukju ahn <dukjuahn at gmail.com>:
> I'm working on CustomMakeManager. The problem is that
> IProjectBuilder::build() api is not reusable for CustomMakeManager
>
> in IProjectBuilder, the only interfaces are
>
>     virtual bool build(ProjectBaseItem *dom) = 0;
>     virtual bool clean(ProjectBaseItem *dom) = 0;
>
> The problem is that we cannot specify build target or
> build directory using ProjectBaseItem. If we see the implementation
> in MakeBuilder::build(), dom is casted into ProjectItem, which
> doesn't contain any information of target or build directory. So
> MakeBuilder just executes "make" with no target in top project dir.
>
> Why don't we specify targets as an additional argument?

Currently every managers subclass ProjectItem for their private use.
Because these classes are not part of interfaces, these cannot be
used to specify more detailed information or instructions.
( IMakeBuilder just treats its argument as ProjectItem )
Thus, I think that informations contained in CMakeTargetItem should
become an interfaces, and enforce automake, cmake, custommake
managers should use it to invoke build process.

At least IMakeBuilder::build() should take more subclassed
item as an arguement. For ex, it can take CppProjectItem.
class CppProjectItem : public Projectitem
{
targets, includes, defines, ...
}




More information about the KDevelop-devel mailing list