|
Boost-Build : |
Subject: Re: [Boost-build] Advanced globbing
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2010-12-14 04:29:41
Emil Dotchevski wrote:
> How can I use glob to get all .cpp and .hpp files in a directory but
> treat file names that contain a dash like follows: if the name is in
> the form *-$(platform)* then I want it included in the glob output
> just like dash-less file names; all other file names with dashes I
> want to be excluded.
>
> For example, if $(platform) expands to "posix", I want files like
> foo.cpp and foo-posix.cpp included in the glob output -- but not
> foo-windows.cpp.
Something like this
import set : difference ;
local platform = posix ;
local sources = [ difference [ glob *.cpp ] : [ glob *-*.cpp ] ] [ glob
*-$(platform)*.cpp ] ;
echo $(sources) ;
?
> Thanks,
> Emil
HTH,
Gevorg
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