|
Boost-Build : |
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-12-06 06:26:35
Vladimir Prus wrote:
> Thanks for explaining. A bugfix and a testcase were just committed. Please let
> me know if it works for you.
Euhh, no ;-(
I get following problem (in attach bjam_error.txt) when I launch bjam
now. The problem is with the 'convert' rule. I'm not sure which
'convert' targets.jam wants to call there. Apparantly the one of the
'convert-target-class' in the convert.jam (attached). I'm not sure if
that is correct.
--------------060900050200050908020509 Content-Type: text/plain;
name="bjam_error.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="bjam_error.txt"
/home/tk/cvstop/boost/tools/build/v2/build/targets.jam:1065: in object(convert-target-class)@1.generate
*** argument error
* rule construct ( source-targets * : property-set )
* called with: ( my_objects : object(file-target)@1 : object(property-set)@38 )
* extra argument object(property-set)@38
/home/tk/tmp/bjam_test/convert.jam:34:see definition of rule 'construct' being called
/home/tk/cvstop/boost/tools/build/v2/build/targets.jam:689: in generate-really
/home/tk/cvstop/boost/tools/build/v2/build/targets.jam:662: in object(main-target)@1.generate
/home/tk/cvstop/boost/tools/build/v2/build/targets.jam:215: in object(project-target)@2.generate
/home/tk/cvstop/boost/tools/build/v2/build-system.jam:154: in load
/home/tk/cvstop/boost/tools/build/v2/kernel/modules.jam:259: in import
/home/tk/cvstop/boost/tools/build/v2/kernel/bootstrap.jam:120: in boost-build
/home/tk/tmp/bjam_test/boost-build.jam:1: in module scope
--------------060900050200050908020509 Content-Type: text/plain;
name="convert.jam"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="convert.jam"
# Copyright 2004 Vladimir Prus.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Defines a 'convert' main target rule, which can be used to convert
# a collection of sources into a desired type. A typical use is
#
# convert objects OBJ : a.cpp b.cpp ;
#
# The difference from
#
# OBJ x : a.cpp b.cpp ;
#
# Is that the latter asks to produce OBJ file is a specific name 'x',
# so won't work with two sources.
import project type targets ;
import "class" : new ;
class convert-target-class : typed-target
{
# import generators property-set ;
rule __init__ ( name : project : type
: sources * : requirements * : default-build * : usage-requirements * )
{
typed-target.__init__ $(name) : $(project) : $(type)
: $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ;
}
rule construct ( source-targets * : property-set )
{
local r = [ generators.construct $(self.project) : $(self.type)
: [ property-set.create [ $(property-set).raw ] # [ feature.expand
<main-target-type>$(self.type) ]
# ]
: $(source-targets) : * ] ;
if ! $(r)
{
errors.error "unable to construct" [ full-name ] ;
}
for local t in $(r[2-])
{
$(t).set-intermediate ;
}
return $(r) ;
}
}
rule convert ( name type : sources * : requirements * : default-build *
: usage-requirements * )
{
local project = [ project.current ] ;
# This is a circular module dependency, so it must be imported here
import targets ;
targets.main-target-alternative
[ new convert-target-class $(name) : $(project) : [ type.type-from-rule-name $(type) ]
: [ targets.main-target-sources $(sources) : $(name) ]
: [ targets.main-target-requirements $(requirements) : $(project) ]
: [ targets.main-target-default-build $(default-build) : $(project) ]
: [ targets.main-target-usage-requirements $(usage-requirements) : $(project) ]
] ;
}
IMPORT $(__name__) : convert : : convert ;
--------------060900050200050908020509--
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