User forums > Help
Setting of OS variables possible?
thomas:
--- Quote from: MortenMacFly on January 26, 2006, 03:20:18 pm ---...while searching through C::B how the run of a compiler is done I found
[...]
Isn't this something like we are talking about? If I got that right than this statement applies to the instance of C::B. Thus if I run a process (compiler call) afterwards this variable is set because it's inherited from C::B. Am I right?
--- End quote ---
Yes, that's exactly how it is done. I don't know why that specific variable is applied to the environment, either the compiler needs it for some reason, or it is a fossile... as Yiannis ;)
I would add the user variables from inside MacrosManager though.
MortenMacFly:
--- Quote from: thomas on January 26, 2006, 03:42:12 pm ---And here is my proposal:
[...]
How does that sound?
--- End quote ---
That certainly gives a lot of flexibilty. It also makes re-use of variables possible, so I would fully agree.
The only drawback I see that could cause problems is if a compiler doesn't support defines/includes etc. I know this sounds strange, but if you think about languages other that C and C++ (e.g. Fortran) this might happen. Thus passing the variable to the compiler might not make sense or even cause an error. But I may be over-sensible or even wrong... and for example G77 supports defines because it translates Fortran into C and than compiles.
Morten.
thomas:
--- Quote ---The only drawback I see that could cause problems is if a compiler doesn't support defines/includes etc. I know this sounds strange, but if you think about languages other that C and C++ (e.g. Fortran) this might happen.
--- End quote ---
What would it matter? If it is defined, then it is exported, whether you use it on the commandline or not... :)
I only wanted to point out that you could use them for commandline options like every other variable. But you don't need to.
The idea is to apply all variables having an asterisk to the environment whenever switching to a new target (and to look for an asterisk-variable during replacement if no non-asterisk one can be found).
That way, you can still use everything the way everybody is used to.
mandrav:
Would it be a bad time to say I don't agree with the asterisk thing?
thomas:
With the asterisk specifically, or with the idea as such?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version