Boost logo

Boost-Build :

From: slabman_meathouse (matthew.comi_at_[hidden])
Date: 2005-08-07 05:33:38

I've written a rule to recursively find Jamfiles in a directory structure...

rule find-jamfiles ( dir )
local result ;

# this is actually /all/ items, I only want directories
directories = [ path.glob $(dir) : * ] ;
jamfiles = [ path.glob $(directories) : Jamfile ] ;

for local directory in $(directories)
jamfiles += [ build-components $(directory) ] ;

return $(jamfiles) ;

These jamfiles contain an object target used at a top level to build a lib target, so:

local objects ;
for local j in $(jamfiles)
local dir = $(j:D) ;
objects += $(dir)//object_target ;

This assumes that the obj target is called object_target :)

If I then use $(objects) to build a lib. There are 2 main problems here:

1. find-jamfiles recurses more often than necessary, I want a glob that returns all
directories, not every file/directory.

2. I need to be able to ensure that the Jamfile that find-jamfiles found actually contains
the object_target target. I hacked targets.find to return nothing (rather than asserting out)
if it can't find the requested target. Is this bad behaviour?

If anyone can help with either of the two issues it would be greatly appreciated.




Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at