[KDev4] buildtools/builder API suggestion.

dukju ahn dukjuahn at gmail.com
Sun Apr 29 17:27:00 UTC 2007


2007/4/29, Andreas Pakulat <apaku at gmx.de>:
> On 29.04.07 08:30:54, dukju ahn wrote:
> > 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.
>
> So? From the project base item you can fetch the project and find the
> builddir.

I reviewed IProject and there is no method to return the building
directory. Although project directory can be retreived by IProject,
it is not always the case to invoke "make" at top_src_dir.

> If a project manager wants to allow building of a specific
> target it should do so by additions to the context menu.

I'm not talking about user interface. My question is how does the
MakeBuilder know which target to build?

ProjectBaseItem can be into either ProjectItem or ProjectTargetItem.
But neither doesn't have any interfaces related with target.

For example, I want to "make clean". How the "clean" target
can be fetched _inside_ MakeBuilder just using ProjectTargetItem or
ProjectItem? Do we use QStandardItem::data() or QStdItem::text()?
Or should we add one more method in TargetItem such as
QString targetName()??

> > 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.
>
> Of course, because nobody made it more intelligent yet.

I am asking these questions to make him more intelligent.




More information about the KDevelop-devel mailing list