Boost logo

Boost-Build :

From: Craig Rodrigues (rodrigc_at_[hidden])
Date: 2005-04-05 12:52:03


On Tue, Apr 05, 2005 at 05:36:54PM +0400, Vladimir Prus wrote:
> Well, the code you're using would not even work with Perforce Jam,
> because the
> real names of the targets that jam see are not plain "hello.cpp" but
> have so
> called 'grist', that identifies the directory name.
> With Boost.Build things are even more complex. We have a code that
> explicitly
> checks for file existence and produces the above error. So, even with
> the
> right "grist" you'd still get the error. I find it's more clearer than
> "cannot find file" message from Perforce Jam.
> If you had one directory, you could write:
> project : source-location /tmp/foo1 ;
> exe hello : hello.cpp ;
> For the case of several directories, you need the 'glob' rule:
> SRC = hello.cpp hello2.cpp ;
> DIRS = /tmp/foo1 /tmp/foo2 ;
> exe hello : [ glob $(DIRS)/$(SRC) ] ;

Hi,

I tried your example, and it did not work.

I am using the Boost Build nightly snapshot from
last night under Linux:

bjam --version
Boost.Build V2 (Milestone 10)
Boost.Jam 03.01.10

Here is my modified Jamroot file:

SRC = hello.cpp ;
DIRS = /tmp/foo1 ;

exe hello : [ glob /tmp/foo1/*.cpp ] ;
#exe hello : [ glob $(DIRS)/$(SRC) ] ;

bjam just seems to spin around forever,
without actually doing anything.
I need to forcibly kill the bjam process.

I tried looking at the output of bjam -d10
to see what is going on. It looks like
the glob function is infinitely recursing
with this sequence:

set p = /
expand 'globbed-dirs'
list > globbed-dirs <
expand '$(dirs)'
expand 'dirs'
list > dirs <
get dirs = .
list > . <
expanded to .
expand '$(p:D)'
expand 'pD'
list > pD <
get p = /
build file: dir = '/' list > / <
expanded to /
expand 'glob'
list > glob <
/home/crodrigu/boost-build/util/path.jam:214:
list > . <
list > / <
set patterns = /
set dirs = .
expand 'result'
list > result <
/home/crodrigu/boost-build/util/path.jam:206:
set result =
expand '$(patterns:D)'
expand 'patternsD'
list > patternsD <
get patterns = /
build file: dir = '/' list > / <
expanded to /
/home/crodrigu/boost-build/util/path.jam:208:
expand '$(patterns)'
expand 'patterns'
list > patterns <
get patterns = /
list > / <
expanded to /
set p =
list > / <
set p = /
expand 'globbed-dirs'
list > globbed-dirs <
expand '$(dirs)'
expand 'dirs'
list > dirs <
get dirs = .
list > . <
expanded to .
expand '$(p:D)'
expand 'pD'
list > pD <
get p = /
build file: dir = '/' list > / <
expanded to /
expand 'glob'
list > glob <
/home/crodrigu/boost-build/util/path.jam:214:
list > . <
list > / <
set patterns = /
set dirs = .
expand 'result'
list > result <
/home/crodrigu/boost-build/util/path.jam:206:
set result =
expand '$(patterns:D)'
expand 'patternsD'
list > patternsD <
get patterns = /
build file: dir = '/' list > / <
expanded to /
/home/crodrigu/boost-build/util/path.jam:208:
expand '$(patterns)'
expand 'patterns'
list > patterns <
get patterns = /
list > / <
expanded to /
set p =
list > / <
set p = /
expand 'globbed-dirs'
list > globbed-dirs <
expand '$(dirs)'
expand 'dirs'
list > dirs <
get dirs = .
list > . <
expanded to .
expand '$(p:D)'
expand 'pD'
list > pD <
get p = /
build file: dir = '/' list > / <
expanded to /
expand 'glob'
list > glob <
/home/crodrigu/boost-build/util/path.jam:214:

-- 
Craig Rodrigues        
rodrigc_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