diff -ru a/boost_1_54_0/tools/build/v2/engine/builtins.c b/boost_1_54_0/tools/build/v2/engine/builtins.c --- a/boost_1_54_0/tools/build/v2/engine/builtins.c 2013-05-20 21:14:18.000000000 -0700 +++ b/boost_1_54_0/tools/build/v2/engine/builtins.c 2013-11-01 13:24:05.990717300 -0700 @@ -635,6 +635,8 @@ LISTITER iter; LISTITER end; + printf("builtin_glob_back(%s)\n", object_str(file)); + /* Null out directory for matching. We wish we had file_dirscan() pass up a * PATHNAME. */ @@ -648,6 +650,7 @@ */ if ( !strcmp( f.f_base.ptr, "." ) || !strcmp( f.f_base.ptr, ".." ) ) { + printf("skipping %s\n", f.f_base.ptr); PROFILE_EXIT( BUILTIN_GLOB_BACK ); return; } @@ -666,7 +669,11 @@ { globbing->results = list_push_back( globbing->results, object_copy( file ) ); + printf("%s matched\n", object_str(list_item(iter))); break; + } else + { + printf("%s did not match\n", object_str(list_item(iter))); } } @@ -744,6 +751,7 @@ static LIST * append_if_exists( LIST * list, OBJECT * file ) { + printf("testing existence of %s\n", object_str(file)); return file_query( file ) ? list_push_back( list, object_copy( file ) ) : list ; @@ -755,6 +763,9 @@ LIST * const plist = list_new( object_copy( pattern ) ); struct globbing globbing; + + printf("glob1(%s, %s)\n", object_str(dirname), object_str(pattern)); + globbing.results = L0; globbing.patterns = plist; @@ -775,6 +786,10 @@ list_free( plist ); + printf("glob1 returns "); + list_print(globbing.results); + printf("\n"); + return globbing.results; } @@ -783,6 +798,8 @@ { LIST * result = L0; + printf("glob_recursive(%s)\n", pattern); + /* Check if there's metacharacters in pattern */ if ( !has_wildcards( pattern ) ) { @@ -790,6 +807,7 @@ OBJECT * const p = object_new( pattern ); result = append_if_exists( result, p ); object_free( p ); + printf("no wild cards\n"); } else { @@ -818,6 +836,10 @@ ? glob_recursive( dirname->value ) : list_push_back( dirs, object_new( dirname->value ) ); + printf("searching dirs: "); + list_print(dirs); + printf("\n"); + if ( has_wildcards( basename->value ) ) { OBJECT * const b = object_new( basename->value ); @@ -869,6 +891,10 @@ } } + printf("glob_recursive returns "); + list_print(result); + printf("\n"); + return result; }