Hi Till,
On 2011-09-02 Till Straumann wrote:
> I process a bunch of templates with MSI but would like the final
> .db file to still contain macros which are to defined when the
> .db file is loaded. Of course, this works for macros without
> a definition but I'd like to prevent MSI from expanding a macro
> that gives a default value:
>
> $(dont_expand=my_default)
>
> Is there a way to prevent MSI from expanding this?
The obvious way is to use something other than MSI to do this particular
expansion, but I expect it's possible to do it using MSI somehow.
Maybe instead of spelling them like you do above, you would spell those macros
like this:
$(dont_expand$(equals)my_default)
When you run MSI it will convert that string to this:
$(dont_expand$(equals,undefined)my_default,undefined)
But that's Ok and still legal. When you're finally ready to expand the
dont_expand variable you also set equals='=' and you'll get this as a partial
result:
$(dont_expand=my_default,undefined)
which should then properly expand the dont_expand variable and or set it to
my_default if it's not defined.
Not tested, and probably rather brittle...
- Andrew
--
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham
- Replies:
- Re: how can I prevent MSI from expanding just some macros? Ned Arnold
- References:
- how can I prevent MSI from expanding just some macros? Till Straumann
- Navigate by Date:
- Prev:
how can I prevent MSI from expanding just some macros? Till Straumann
- Next:
Re: how can I prevent MSI from expanding just some macros? Ned Arnold
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
how can I prevent MSI from expanding just some macros? Till Straumann
- Next:
Re: how can I prevent MSI from expanding just some macros? Ned Arnold
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|