Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT6.0 container_loc
CDT6.0 container_loc [message #235648] Fri, 10 July 2009 19:16 Go to next message
Thundernail is currently offline ThundernailFriend
Messages: 2
Registered: July 2009
Junior Member
Hey all,

have I seen this correct, that the variable 'container_loc' of the build
command is not usable any more?

I have seen this solution
<http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg14567.html> with
${container_loc} is ${selected_resource_loc}/..

but this does not work for me. Perhaps because it is on Linux and a path
like
/home/thundernail/workspace/projectA/path/to/source/source.c pp/.. is not
valid.

Is there any solution to set the workdirectory of the make command to the
directory of the active file?

thanks
Thundernail
Re: CDT6.0 container_loc [message #235657 is a reply to message #235648] Fri, 10 July 2009 20:42 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew GvozdevFriend
Messages: 257
Registered: July 2009
Senior Member
Thundernail wrote:
> have I seen this correct, that the variable 'container_loc' of the build
> command is not usable any more?
> I have seen this solution
> <http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg14567.html> with
> ${container_loc} is ${selected_resource_loc}/..

The problem with these variables is that the build plugin is independent
of UI plugins and so it cannot expand UI variables. The best you can do is
to use build variables like ${ProjDirPath}.

> but this does not work for me. Perhaps because it is on Linux and a path
> like
> /home/thundernail/workspace/projectA/path/to/source/source.c pp/.. is not
> valid.

> Is there any solution to set the workdirectory of the make command to the
> directory of the active file?

If you use "Build Project" command it is always executed in project build
directory. As an alternative you could try Make Target view. If you create
its target in a subfolder the working directory will be that subfolder.
This holds true for not managed build only.

> thanks
> Thundernail

Andrew
Re: CDT6.0 container_loc [message #235667 is a reply to message #235657] Sat, 11 July 2009 10:19 Go to previous message
Thundernail is currently offline ThundernailFriend
Messages: 2
Registered: July 2009
Junior Member
Thanks for the reply,

Andrew Gvozdev wrote:

> Thundernail wrote:
>> have I seen this correct, that the variable 'container_loc' of the build
>> command is not usable any more?

> The problem with these variables is that the build plugin is independent
> of UI plugins and so it cannot expand UI variables. The best you can do is
> to use build variables like ${ProjDirPath}.

The build plugin has the ${selected_resource_loc} variable, so it should
be possible to give the path of the directory.

>> Is there any solution to set the workdirectory of the make command to the
>> directory of the active file?

> If you use "Build Project" command it is always executed in project build
> directory. As an alternative you could try Make Target view. If you create
> its target in a subfolder the working directory will be that subfolder.
> This holds true for not managed build only.

I don't linke the idea to set up the Make Targets for around 100
directorys ;-)


My solution at the moment is a Makefile at the protject root, that
forwards to the Makefile in the directory of the ressource.

My build command:
make RESOURCE_LOC=${selected_resource_loc}

The Makefile in the project root directory:
CONTAINER_LOC:=$(shell dirname "${RESOURCE_LOC}")

all:
@$(MAKE) -C ${CONTAINER_LOC}/ all;
Previous Topic:CDT 6.0: Scanner Discovery
Next Topic:MinGW Windows, Slow Builds
Goto Forum:
  


Current Time: Wed Jan 15 08:58:15 GMT 2025

Powered by FUDForum. Page generated in 0.05524 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top