Boost logo

Boost-Build :

Subject: Re: [Boost-build] User-defined options
From: Phil Bass (Phil.Bass_at_[hidden])
Date: 2008-10-16 11:08:16


Steven Watanabe wrote:
> AMDG
>
> Phil Bass wrote:
>> flags sql.make-SQL-file CAL_CONFIG <cal-config> ;
>>
>> <snip>
>>
>> generators.register-standard make-SQL-file : CONFIG_SRC : SQL ;
>>
>> The value of the CAL_CONFIG variable in the make-SQL-file action is
>> always empty. What am I doing wrong?
>
> Shouldn't the argument to flags be exactly the same as the
> argument to generators.register-standard?
You mean like this?

    flags sql.make-SQL-file CAL_CONFIG <cal-config> ;
          ^^^^^^^^^^^^^^^^^
    . . .

    generators.register-standard sql.make-SQL-file : CONFIG_SRC : SQL ;
                                 ^^^^^^^^^^^^^^^^^

Thank you! I was thinking the generator ID was 'make-SQL-file' and the
'sql' was a module ID that could be omitted in the scope of the sql
module. I now see the error of my ways. ;-)

For the benefit of the list, this mistake isn't as daft as it sounds.
The Boost Build docs use the following example:

import generators ;
generators.register-standard verbatim.inline-file : VERBATIM : CPP ;
actions inline-file
{
    "./inline-file.py" $(<) $(>)
}

And the text says, "By convention, generators use the same name of the
action block as their own id."

-- 
Phil Bass (phil_at_[hidden])

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk