2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-01 20:32:17 +00:00

Revamp path.glob.

The problem with the previous implementation is that it would iterate
over all elements in a dir even if 'pattern' had no metacharacters. First,
that was slow -- if you handed

  /cygdrive/w/My Documents/boost/test/a.cpp

to it, it would crawl all the way to the top, listing each directory and
checking each file. Second, it would fail, because Cygwin is broken and
does not show 'cygdrive' is the list of directory elements of '/'.

Now we check if a pattern has metacharacters, and if not, just do
a simple 'timestamp' call.

The new glob is implemented as new 'GLOB-RECURSIVELY' builtin. I've decided
to use builtin since otherwise, we'd need 'does this name exist' builtin,
and if we need new builtin, why don't implement all globbing in core.


[SVN r29163]
This commit is contained in:
Vladimir Prus
2005-05-24 07:57:56 +00:00
parent c7bce34d14
commit 4e9af774ce
6 changed files with 195 additions and 86 deletions

View File

@@ -20,9 +20,9 @@ t = Tester(
t.set_tree('startup')
if os.name == 'nt':
t.run_build_system(
status=1, stdout="You didn't set BOOST_ROOT", match = expect_substring)
#if os.name == 'nt':
# t.run_build_system(
# status=1, stdout="You didn't set BOOST_ROOT", match = expect_substring)
t.run_build_system(
extra_args = '-sBOOST_ROOT=.', status=1