Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2006-03-18 12:54:03


Noel Belcourt wrote:
> Hi,
>
> We've got a couple of source directories that we depend on but cannot
> otherwise modify. Our problem is that there are ~500 source files in
> this directory and I want to glob all the files but one. Is there some
> notation to allow me to exclude one or more files from a glob? I'd
> really hate to have to enumerate each source file in the Jamfile.

Assuming BBv2 for this example... Something like this should work:

import set ;
import path ;

local files =
   [ set.difference
     [ path.glob /path/ : *.cpp ] : [ path.glob /path/ : special.cpp ]
     ] ;

Of course adjust for your context :-)

--
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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