[KDev4] buildtools/builder API suggestion.
Andreas Pakulat
apaku at gmx.de
Sun Apr 29 17:39:26 UTC 2007
On 29.04.07 13:27:00, dukju ahn wrote:
> 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.
Uh, right. It should be part of the project manager (because he knows
about this, not the project itself). I'm not sure though if we have a
method for that already.
> > If a project manager wants to allow building of a specific
> > target it should do so by additions to the context menu.
>
> ProjectBaseItem can be into either ProjectItem or ProjectTargetItem.
> But neither doesn't have any interfaces related with target.
Why should it need one. I'd expect the text of a target item to be the
right thing to use.
> 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()??
clean() is already a part of the IProjectBuilder interface. If the
project manager provides the targets then the builder should use text()
IMHO.
Andreas
--
Abandon the search for Truth; settle for a good fantasy.
More information about the KDevelop-devel
mailing list