A few questions about project manager

Alexandre Courbot gnurou at gmail.com
Fri Mar 30 07:49:52 UTC 2012


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.

So here I have two issues, well, one and a half actually:
1) IMakeBuilder does not allow to pass multiple targets to make (it if
did, all my problems would be solved)
1.5) IMakeBuilder does not allow to specify an environment profile to
merge with the default one (hat would allow to pass the ARCH and
CROSS_COMPILE settings that are set in my own configuration dialog
instead of setting a custom environment profile, but would not help
with out-of-tree builds).

Hence my suggestion to extend IMakeBuilder a bit and ask if there are
concerns against this. I don't really care for compatibility as the
plugin will likely not be ready before the next major KDevelop
version.

Alex.




More information about the KDevelop-devel mailing list