Macro in project's environement

CodeLite installation/troubleshooting forum
VRH
CodeLite Curious
Posts: 2
Joined: Wed Sep 07, 2011 10:35 pm
Genuine User: Yes
IDE Question: C++
Contact:

Macro in project's environement

Post by VRH » Wed Sep 07, 2011 10:45 pm

Hi,

I use Codelite 3.0.5051, self build on a linux (x86_64) workstation

I have a custom makefile project

I would like to define an environnement variable in the project, using a macro.

so I try this :

Code: Select all

MYVAR=$(ProjectName)-$(ConfigurationName)
but when I build the project, the value of MYVAR is -

Setting a variable without macro is working fine.
Also, if a try :

Code: Select all

MYVAR=$(ANOTHERVAR)
where ANOTHERVAR is defined in codelite environement, MYVAR has the good value.

Did I make something wrong ?
Is there a bug ?

User avatar
eranif
CodeLite Plugin
Posts: 6056
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Macro in project's environement

Post by eranif » Wed Sep 07, 2011 11:57 pm

Atm, the project macros and environment variables are two different entities
If you need the macros to be accessible in the project environment variable text area, please submit a feature request

Eran
Make sure you have read the HOW TO POST thread

josee
CodeLite Enthusiast
Posts: 37
Joined: Fri Feb 05, 2010 10:57 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Macro in project's environement

Post by josee » Thu Sep 08, 2011 2:05 pm

Hi,

I'm also using a custom makefile.
And to build the correct version I enter into 'project settings -> Custom Build' something like 'make $(ProjectName)_$(ConfigurationName)'.
So there is no need for an environment variable.

See also the picture:
Bildschirmfoto-testunit Project Settings.png
You do not have the required permissions to view the files attached to this post.

VRH
CodeLite Curious
Posts: 2
Joined: Wed Sep 07, 2011 10:35 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Macro in project's environement

Post by VRH » Fri Sep 09, 2011 11:00 pm

Ok, so macro in environnement form are not supported, i will post a demand as soon as I will have time.

@josee
I understand what you proposed, but I really need that to build my project.
I post only an example, environnement variables are used a lot in my makefiles, build scripts.
I can't define a specific rules for doing what I need, and other member of the project use different IDE, so it's hard to rewrite every thing for my need.

Post Reply