|
Boost-Build : |
From: Phillip Seaver (phil_at_[hidden])
Date: 2008-06-25 14:20:15
Vladimir Prus wrote:
> Phillip Seaver wrote:
>
>
>>> src/misc/boost-build/build\generators.jam:841: in try-one-generator-really
>>> *** argument error
>>> * rule object(linking-generator)@25.run ( project name ? :
>>> property-set : sources + )
>>>
>
> This means that you're trying to produce an EXE target from no sources. I'm not
> sure which EXE target is been built. Can you post a minimal example reproducing this?
>
>
>> rule init ( )
>> {
>> if ! $(.initialized) {
>> .initialized = true ;
>> exe bin2c_exe : [ GLOB bin2c.c ] : <variant>release
>> <threading>single ;
>>
>
> Are you sure this GLOB expands to anything? Can you add
>
> ECHO "XXX" [ GLOB bin2c.c ] ;
>
> right before this 'exe' declaration. Does your module declares itself as
> a project? Err, in fact, even if a module declare itself as a project, it
> typically does not have a source location, so this will find no sources.
> Where you want this bin2c.c to be located?
>
I've got it in the same directory as bin2c.jam. You were right -- the
GLOB didn't find anything, so I imagine it's looking in the directory
where I'm trying to use bin2c.
>> rule bin2c ( target : source + )
>> {
>> return [ make $(target) : bin2c_exe $(source) : bin2c_run ] ;
>> }
>>
>
> BTW, this is not 100% right either -- nothing here tells that you produce
> C files, so you won't be able to use the results to build exe, or lib.
> The 'customization' example shows to do this using a generator. That example
> users a Python script for transformation, so it has to be adjusted, but
> first we need to figure where you want the C file to be located, and where
> the binary should be built to.
>
> - Volodya
I'll take a look at the customization example, since I do want to
generate files to be compiled. I'd like to have one executable used by
all the projects -- I don't really care where bin2c.exe ends up (maybe
the root of the build tree?). Leaving the output C file in the build
tree instead of the source tree is fine.
Thanks,
Phillip
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