A few questions about project manager

Andreas Pakulat apaku at gmx.de
Fri Mar 30 08:28:34 UTC 2012

On 30.03.12 16:49:52, Alexandre Courbot wrote:
> On Fri, Mar 30, 2012 at 4:03 PM, Andreas Pakulat <apaku at gmx.de> wrote:
> > While I think it might be good to have a build() API on IMakeBuilder to
> > run multiple jobs, you could for now also just chain the targets
> > yourself. This could be done rather easily with your own
> > composite-build-job which first starts a make-job that builds the kernel
> > and connects to its finished/error signals. Once the first target is
> > built successfully you schedule the next make-job for the next target
> > etc. I know this is not as nice as a multi-target build function, but it
> > won't require any code-changes and makes your plugin usable with
> > currently released kdevelop versions.
> Unfortunately this won't work in this case - all the "targets" (they
> are not really targets - please hang on) must be specified during the
> same make run. Let me explain.
> In order to perform cross-compilation, the Linux kernel requires two
> variables to be defined: ARCH and CROSS_COMPILE. They can either be
> defined as environment variables, or be specified during make's
> invokation, e.g. "make ARCH=arm CROSS_COMPILE=/usr/bin/arm-elf-gcc
> vmlinux". These can be defined in KDevelop by setting up an
> environment profile in make's configuration, in which case I can
> workaround the problem.
> Another often use feature is out-of-tree builds, which can be done
> using "O=/path/to/build/dir". However for some reason this one can
> only be passed as an argument to make and cannot be defined as an
> environment variable.

Ah, so its not about targets, but rather about passing make variables
into the make invocation. That indeed makes even more sense to add, but
should probably be something like a QMap and the make-builder will then
take care of creating the correct commandline. So something like

build( target )
build( target, variables )
build( targetlist )
build( targetlist, variables )

as API, where the single-target function would just be convenience API
calling the list-version with a single-item-list...


More information about the KDevelop-devel mailing list