Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Eclipse and custom build commands

Hey

I'm not sure if this is the right place to post something like this, but I'm having some difficulties getting CDT to run with our in-house build system. It's a pretty traditional setup, with a master Makefile, which in turn calls all sorts of sub-Makefiles located in subdirectories (one for each package typically).

Today, I downloaded Eclipse Genymede RC4 and CDT 5 (June 06 release) and thought it was time to give CDT another go at integrating with our own buildsystem. Previously, I have been using an ANT script wrapper, with a custom ANT logger (to not confuse the Make Error Parser), but this seems to be problematic with CDT 5.

The core of my problem is that we have a script that must be run before any calls to "make", which sets up a number of environment variables etc. I can't seem to find how to do this in Eclipse, because simply adding a new "Builder" (Program) won't preserve environment variables for the execution of "make", it seems.

My next try was to manually add each and every of the environment variables in Eclipse (C/C++ build -> Environment). This isn't exactly ideal, since different projects have different setup-files, and ideally I'd like Eclipse to simply always run it prior to "make". Anyway, it didn't work either :) The make process seems to run, but this time the problem is with the I/O streams. If I run the make files from within Eclipse, I get this error:

make
...
yes: standard output: Broken pipe
yes: write error

This does not occur if I run it from a traditional console. If you look inside the make script, the line causing this is most likely

a:=$(shell yes '' | $(MAKE) oldconfig)

(Kernel config stuff). For some reason, "yes" is unable to function correctly when run from inside Eclipse. I found a related problem here: http://mail.python.org/pipermail/tutor/2007-October/058044.html (not related to Eclipse though), but I can't really make sense on how to fix it.

Any thoughts on this?
begin:vcard
fn:Magnus Olsson
n:Olsson;Magnus
org:Axis Communications AB;Product Platforms
adr;quoted-printable;quoted-printable:;;Emdalav=C3=A4gen 14;Lund;Sk=C3=A5ne;22369;Sweden
email;internet:magnus.olsson@xxxxxxxx
title:Software Engineer
tel;work:+46 462722160
x-mozilla-html:FALSE
url:http://www.axis.se/
version:2.1
end:vcard


Back to the top