[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pre-post actions ?
From: |
Gary Oberbrunner |
Subject: |
Re: pre-post actions ? |
Date: |
Mon, 17 Dec 2001 10:22:54 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.6) Gecko/20011120 |
Steven Knight wrote:
Redefine the CCCOM construction variable. The modern way to do this
would be as an array reference for the separate commands:
$env = new cons(CCCOM =>
["%ECHO_COLOR blue on white ----- Compiling c %<",
"%CC %CFLAGS %_IFLAGS -c %< -o %>",
"@%LINT -os\(%DST/%<_lint.txt\) %LINTFLAGS %<",
"@perl /iris/rtos/bin/lint/lint_post.pl %DST/%<_lint.txt"],
LINT => 'lint',
LINTFLAGS => '',
DST => '/appopriate/directory',
ECHO_COLOR => '');
Thanks for mentioning the command array stuff, Steven -- that's a nice
new feature. Nadim: If you want to make the PRE/POST actions more
explicit, you can put them in as placeholder variables, then define them
as desired in derived environments:
$env = new cons(CCCOM =>
["%PRE_CCCOM",
"%CC %CFLAGS %_IFLAGS -c %< -o %>",
"%POST_CCCOM],
LINT => 'lint',
LINTFLAGS => '',
DST => '/appropriate/directory',
ECHO_COLOR => '');
$carefulenv = $env->clone(POST_CCCOM => '@perl lint_post.pl');
and season to taste. (Undefined construction variables will expand to
the null string.)
One thing about this is that it makes the build OS-specific since NT
uses a different default CCCOM. You could, with a little more work, get
around this:
$default_env = new cons();
$env = new cons(CCCOM => ["%PRE_CCCOM",
$default_env->{CCCOM},
"%POST_CCCOM",
...);
I think it ought to work.
-- Gary Oberbrunner
- Cons not working as advertized and other remarks, Nadim Khemir, 2001/12/14
- Re: Cons not working as advertized and other remarks, Brad Garcia, 2001/12/14
- RE: Cons not working as advertized and other remarks and boddy new commers, Nadim Khemir, 2001/12/14
- RE: Cons not working as advertized and other remarks and boddy new commers, Steven Knight, 2001/12/14
- Evolution, Bob Sidebotham, 2001/12/14
- Re: Evolution, Gary Oberbrunner, 2001/12/14
- RE: Evolution, Charles Crain, 2001/12/14
- pre-post actions ?, Nadim Khemir, 2001/12/17
- Re: pre-post actions ?, Steven Knight, 2001/12/17
- Re: pre-post actions ?,
Gary Oberbrunner <=
- Re: Evolution, Brad Garcia, 2001/12/16
- RE: Evolution, Alex Jacques, 2001/12/17
- RE: Evolution, Siu-Tong Hui, 2001/12/17
RE: Cons not working as advertized and other remarks, Charles Crain, 2001/12/14