2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-17 13:42:14 +00:00

Fixed MATCH rule port

Changed regex.split to work with MATCH
Fixed build-system.jam so command-line JAMFILE specification works


[SVN r13326]
This commit is contained in:
Dave Abrahams
2002-04-01 02:59:53 +00:00
parent d9923a4f9a
commit ae97068e36
5 changed files with 9 additions and 2 deletions

View File

@@ -354,6 +354,7 @@ builtin_match(
{
string_append_range( buf, re->startp[i], re->endp[i] );
result = list_new( result, newstr( buf->value ) );
string_truncate( buf, 0 );
}
string_free( buf );

View File

@@ -354,6 +354,7 @@ builtin_match(
{
string_append_range( buf, re->startp[i], re->endp[i] );
result = list_new( result, newstr( buf->value ) );
string_truncate( buf, 0 );
}
string_free( buf );

View File

@@ -13,6 +13,9 @@ rule construct ( module-name )
# Default patterns to search for the Jamfiles to use for build
# declarations.
#
import modules ;
JAMFILE = [ modules.peek : JAMFILE ] ;
JAMFILE ?= [Jj]amfile [Jj]amfile.jam ;
# Load a Jamfile at the given directory. Will attempt to load

View File

@@ -19,8 +19,9 @@ rule split ( string separator )
local match = 1 ;
while $(match)
{
match = [ SUBST $(s) ^(.*)($(separator))(.*) $1 $2 $3 ] ;
match = [ MATCH ^(.*)($(separator))(.*) : $(s) ] ;
if $(match) {
match += "" ; # in case 3rd item was empty - works around MATCH bug
result = $(match[3]) $(result) ;
s = $(match[1]) ;
}

View File

@@ -19,8 +19,9 @@ rule split ( string separator )
local match = 1 ;
while $(match)
{
match = [ SUBST $(s) ^(.*)($(separator))(.*) $1 $2 $3 ] ;
match = [ MATCH ^(.*)($(separator))(.*) : $(s) ] ;
if $(match) {
match += "" ; # in case 3rd item was empty - works around MATCH bug
result = $(match[3]) $(result) ;
s = $(match[1]) ;
}