Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Setting dynamically build environment
Setting dynamically build environment [message #901730] Tue, 14 August 2012 11:39 Go to next message
jonathan ponroy is currently offline jonathan ponroyFriend
Messages: 12
Registered: April 2012
Junior Member
Hi all,

My makefile needs some environment variables which are defined by bash script:
. set_variables.sh  //script setting variables
make //makefile using variables setting above


I try to reproduce this process on Eclipse CDT using external tools to execute "set_variables.sh" before build in project build properties. But each time, i lose variables setting in script when make is carried out. I know we can set build environment variable statically but i can't use it.

So, is there a way to set dynamically build environment?
Re: Setting dynamically build environment [message #901928 is a reply to message #901730] Wed, 15 August 2012 06:45 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
External tools have their own "universe" of environment variables and do not share it with the build command. You can change your build command to
. set_variables.sh && make


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Setting dynamically build environment [message #903911 is a reply to message #901928] Mon, 27 August 2012 08:56 Go to previous message
jonathan ponroy is currently offline jonathan ponroyFriend
Messages: 12
Registered: April 2012
Junior Member
Unfortunately, nothing occurs. The set_variable.sh is not executed.
Previous Topic:Selecting the application to run according to the current active build configuration
Next Topic:Can't start Indigo
Goto Forum:
  


Current Time: Sun Nov 03 09:59:56 GMT 2024

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

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

Back to the top