View previous topic :: View next topic |
Author |
Message |
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Sat Dec 02, 2006 1:47 am Post subject: Patch to support environment variables |
|
|
I made a patch that adds support for environment variables in .brf "response" files. So in your response file you can have something like:
Code: |
-release
-I$(HOME)\D
-I$(DMDDIR)\baxissimo
-I$(DMDDIR)\ext
example1
$(DMDDIR)\Derelict\lib\DerelictGL.lib
$(DMDDIR)\Derelict\lib\DerelictGLU.lib
$(DMDDIR)\Derelict\lib\DerelictUtil.lib
|
The patch is here:
http://www.dsource.org/projects/build/ticket/42
Is this of any interest to anyone else?
Hard coded paths really give me trouble because I move code back and forth between a few machines where D isn't necessarily installed in the same place. |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Sat Dec 02, 2006 11:35 am Post subject: Re: Patch to support environment variables |
|
|
baxissimo wrote: | I made a patch that adds support for environment variables in .brf "response" files. |
Thanks. However I have already coded the enhancement into my copy of the source. It supports symbols in the forms ...
?SYM?
$SYM
${SYM}
${SYM=default}
$(SYM)
I'm just finalizing the testing before this and a few other goodies are released. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Sat Dec 02, 2006 3:41 pm Post subject: Re: Patch to support environment variables |
|
|
Derek Parnell wrote: | baxissimo wrote: | I made a patch that adds support for environment variables in .brf "response" files. |
Thanks. However I have already coded the enhancement into my copy of the source. It supports symbols in the forms ...
?SYM?
$SYM
${SYM}
${SYM=default}
$(SYM)
I'm just finalizing the testing before this and a few other goodies are released. |
Wonderful! I can live without the multiple args per line that my patch added as long as environment variables work.
What's the recommended approach when you outgrow the capabilities of brf files and need real per-platform conditionals and things like that. My first reaction would be to use good old make to call bud, but maybe there's something simpler which doesn't require a dependency on make? |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Sat Dec 02, 2006 4:41 pm Post subject: Re: Patch to support environment variables |
|
|
baxissimo wrote: | What's the recommended approach when you outgrow the capabilities of brf files and need real per-platform conditionals and things like that. My first reaction would be to use good old make to call bud, but maybe there's something simpler which doesn't require a dependency on make? |
The method I used for Configuration files is to have 'sections' inside the file. For example, to have some options that only apply in the Windows platform and others in Linux ...
Code: |
[Windows]
CMD=some toption
[Linux]
CMD=something else
|
Is this the sort of issue you were thinking about? _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Sat Dec 02, 2006 7:11 pm Post subject: Re: Patch to support environment variables |
|
|
Derek Parnell wrote: |
The method I used for Configuration files is to have 'sections' inside the file. For example, to have some options that only apply in the Windows platform and others in Linux ...
Code: |
[Windows]
CMD=some toption
[Linux]
CMD=something else
|
Is this the sort of issue you were thinking about? |
Yeh, that sounds good.
--bb |
|
Back to top |
|
|
baxissimo
Joined: 23 Oct 2006 Posts: 241 Location: Tokyo, Japan
|
Posted: Sat Feb 17, 2007 12:46 am Post subject: Re: Patch to support environment variables |
|
|
Derek Parnell wrote: | baxissimo wrote: | I made a patch that adds support for environment variables in .brf "response" files. |
Thanks. However I have already coded the enhancement into my copy of the source. It supports symbols in the forms ...
?SYM?
$SYM
${SYM}
${SYM=default}
$(SYM)
I'm just finalizing the testing before this and a few other goodies are released. |
Any word on when this super-duper enhanced version of Bud of yours is going to hit the streets? Or at least the SVN repository?
Thanks. |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Sat Feb 17, 2007 6:34 pm Post subject: Re: Patch to support environment variables |
|
|
Derek Parnell wrote: | baxissimo wrote: | I made a patch that adds support for environment variables in .brf "response" files. |
Thanks. However I have already coded the enhancement into my copy of the source. It supports symbols in the forms ...
?SYM?
$SYM
${SYM}
${SYM=default}
$(SYM)
I'm just finalizing the testing before this and a few other goodies are released. |
I have completed most things I wanted to do this round, and I was expecting to finish off this weekend, so if the heat here doesn't prevent me thinking (another day over 100) ... _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
|