Boost logo

Boost-Build :

Subject: Re: [Boost-build] glob-tree question
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2015-06-05 10:41:57


On Fri, Jun 5, 2015 at 8:18 AM, Vladimir Prus <vladimir.prus_at_[hidden]>
wrote:

>
> I don't doubt that you have a valid use case, what I'm pointing out that
> between 'glob-tree' and 'path.glob',
> having yet another way to glob for stuff seems a tad confusing. Could not
> your usecases be expressed with path.glob? Or you disagree that having
> glob-tree and glob-tree-ex is potentially confusing?
>

I do admit it is a bit confusing.. But I couldn't think of a better name,
or better way to do this. And no I can't use path.glob* as a direct
replacement. For example (1)..

####
ECHO >>> [ path.glob ../src/AntTweakBar : *.c *.cpp : *Direct3D*.* ] ;
ECHO <<< [ glob-ex ../src/AntTweakBar : *.c *.cpp : *Direct3D*.* ] ;
local qqq-project = [ project.current ] ;
local qqq-source-location = [ path.root [ $(qqq-project).get
source-location ] [ path.pwd ] ] ;
local qqq-search-paths = [ sequence.transform project.glob-path-root
$(qqq-source-location) : ../src/AntTweakBar ] ;
ECHO === [ sequence.transform path.relative-to $(qqq-source-location) : [
path.glob $(qqq-search-paths) : *.c *.cpp : *Direct3D*.* ] ] ;
####

Results in:

####
>>>
<<< ../src/AntTweakBar/LoadOGL.cpp ../src/AntTweakBar/LoadOGLCore.cpp
../src/AntTweakBar/TwBar.cpp ../src/AntTweakBar/TwColors.cpp
../src/AntTweakBar/TwFonts.cpp ../src/AntTweakBar/TwMgr.cpp
../src/AntTweakBar/TwOpenGL.cpp ../src/AntTweakBar/TwOpenGLCore.cpp
../src/AntTweakBar/TwPrecomp.cpp
=== ../src/AntTweakBar/LoadOGL.cpp ../src/AntTweakBar/LoadOGLCore.cpp
../src/AntTweakBar/TwBar.cpp ../src/AntTweakBar/TwColors.cpp
../src/AntTweakBar/TwFonts.cpp ../src/AntTweakBar/TwMgr.cpp
../src/AntTweakBar/TwOpenGL.cpp ../src/AntTweakBar/TwOpenGLCore.cpp
../src/AntTweakBar/TwPrecomp.cpp
####

So I either replicated the code from glob-*ex in my project or use put it
in BB in some form.

(1) And for those that don't see it, the key difference is that the project
glob rules take into account project relative source paths, while path.glob
doesn't.

-- 
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail


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