Boost logo

Boost-Build :

Subject: Re: [Boost-build] Get full source path in generator rule
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-03-31 09:47:59


On Tuesday 31 March 2009 06:55:43 Алексей Бадяев wrote:

> local headers ;
> for src in $(sources) {
> local src-dir = [ $(src).path ] ;
> local src-name = [ $(src).name ] ;
> local path-const src-path = [ path.join $(src-dir)
> $(src-name) ] ;
> headers += $(src-path) ;
> ECHO "src-path: $(src-path)" ;
> }
> BUT! Here is output when I build my project with that generator
> (see ECHO for debug purpose):
>
> src-path: test/main.cpp

> It is relative path's - but I need absolute path's.
> How I can get full (absolute) path's to source files?

Please see the path.root and path.pwd functions (in path.jam module)

HTH,
Volodya
 


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