mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 13:42:14 +00:00
Remove SEARCH_FOR_TARGET.
[SVN r75967]
This commit is contained in:
@@ -282,12 +282,6 @@ void load_builtins()
|
||||
builtin_pwd, 0, args );
|
||||
}
|
||||
|
||||
{
|
||||
const char * args[] = { "target", "*", ":", "path", "*", 0 };
|
||||
bind_builtin( "SEARCH_FOR_TARGET",
|
||||
builtin_search_for_target, 0, args );
|
||||
}
|
||||
|
||||
{
|
||||
const char * args[] = { "modules_to_import", "+", ":", "target_module", "?", 0 };
|
||||
bind_builtin( "IMPORT_MODULE",
|
||||
@@ -1424,14 +1418,6 @@ LIST * builtin_update_now( FRAME * frame, int flags )
|
||||
return L0;
|
||||
}
|
||||
|
||||
LIST * builtin_search_for_target( FRAME * frame, int flags )
|
||||
{
|
||||
LIST * arg1 = lol_get( frame->args, 0 );
|
||||
LIST * arg2 = lol_get( frame->args, 1 );
|
||||
TARGET * t = search_for_target( arg1->value, arg2 );
|
||||
return list_new( L0, object_copy( t->name ) );
|
||||
}
|
||||
|
||||
|
||||
LIST * builtin_import_module( FRAME * frame, int flags )
|
||||
{
|
||||
|
||||
@@ -43,7 +43,6 @@ LIST *builtin_backtrace( FRAME * frame, int flags );
|
||||
LIST *builtin_pwd( FRAME * frame, int flags );
|
||||
LIST *builtin_update( FRAME * frame, int flags );
|
||||
LIST *builtin_update_now( FRAME * frame, int flags );
|
||||
LIST *builtin_search_for_target( FRAME * frame, int flags );
|
||||
LIST *builtin_import_module( FRAME * frame, int flags );
|
||||
LIST *builtin_imported_modules( FRAME * frame, int flags );
|
||||
LIST *builtin_instance( FRAME * frame, int flags );
|
||||
|
||||
@@ -49,15 +49,6 @@ static void set_rule_body ( RULE *, argument_list *, FUNCTION * procedure );
|
||||
|
||||
static struct hash * targethash = 0;
|
||||
|
||||
struct _located_target
|
||||
{
|
||||
OBJECT * file_name;
|
||||
TARGET * target;
|
||||
};
|
||||
typedef struct _located_target LOCATED_TARGET ;
|
||||
|
||||
static struct hash * located_targets = 0;
|
||||
|
||||
|
||||
/*
|
||||
* target_include() - adds the 'included' TARGET to the list of targets included
|
||||
@@ -209,88 +200,6 @@ void bind_explicitly_located_targets()
|
||||
}
|
||||
|
||||
|
||||
/* TODO: It is probably not a good idea to use functions in other modules like
|
||||
this. */
|
||||
void call_bind_rule( OBJECT * target, OBJECT * boundname );
|
||||
|
||||
|
||||
TARGET * search_for_target ( OBJECT * name, LIST * search_path )
|
||||
{
|
||||
PATHNAME f[1];
|
||||
string buf[1];
|
||||
LOCATED_TARGET lt;
|
||||
LOCATED_TARGET * lta = <
|
||||
time_t time;
|
||||
int found = 0;
|
||||
TARGET * result;
|
||||
|
||||
string_new( buf );
|
||||
|
||||
path_parse( object_str( name ), f );
|
||||
|
||||
f->f_grist.ptr = 0;
|
||||
f->f_grist.len = 0;
|
||||
|
||||
while ( search_path )
|
||||
{
|
||||
OBJECT * key;
|
||||
f->f_root.ptr = object_str( search_path->value );
|
||||
f->f_root.len = strlen( object_str( search_path->value ) );
|
||||
|
||||
string_truncate( buf, 0 );
|
||||
path_build( f, buf, 1 );
|
||||
|
||||
lt.file_name = key = object_new( buf->value ) ;
|
||||
|
||||
if ( !located_targets )
|
||||
located_targets = hashinit( sizeof(LOCATED_TARGET),
|
||||
"located targets" );
|
||||
|
||||
if ( hashcheck( located_targets, (HASHDATA * *)<a ) )
|
||||
{
|
||||
object_free( key );
|
||||
string_free( buf );
|
||||
return lta->target;
|
||||
}
|
||||
|
||||
timestamp( key, &time );
|
||||
object_free( key );
|
||||
if ( time )
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
search_path = list_next( search_path );
|
||||
}
|
||||
|
||||
if ( !found )
|
||||
{
|
||||
OBJECT * key;
|
||||
f->f_root.ptr = 0;
|
||||
f->f_root.len = 0;
|
||||
|
||||
string_truncate( buf, 0 );
|
||||
path_build( f, buf, 1 );
|
||||
|
||||
key = object_new( buf->value );
|
||||
timestamp( key, &time );
|
||||
object_free( key );
|
||||
}
|
||||
|
||||
result = bindtarget( name );
|
||||
result->boundname = object_new( buf->value );
|
||||
result->time = time;
|
||||
result->binding = time ? T_BIND_EXISTS : T_BIND_MISSING;
|
||||
|
||||
call_bind_rule( result->name, result->boundname );
|
||||
|
||||
string_free( buf );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* copytarget() - make a new target with the old target's name.
|
||||
*
|
||||
|
||||
@@ -221,6 +221,7 @@ struct _target
|
||||
#define T_MAKE_ACTIVE 2 /* make1(target) in make1b() */
|
||||
#define T_MAKE_RUNNING 3 /* make1(target) running commands */
|
||||
#define T_MAKE_DONE 4 /* make1(target) done */
|
||||
#define T_MAKE_NOEXEC_DONE 5 /* make1(target) done with -n in effect */
|
||||
|
||||
#ifdef OPT_SEMAPHORE
|
||||
#define T_MAKE_SEMAPHORE 5 /* Special target type for semaphores */
|
||||
@@ -269,7 +270,6 @@ void bind_explicitly_located_targets();
|
||||
TARGET * bindtarget ( OBJECT * target_name );
|
||||
TARGET * copytarget ( TARGET const * t );
|
||||
void freetargets ( TARGETS * );
|
||||
TARGET * search_for_target ( OBJECT * name, LIST * search_path );
|
||||
TARGETS * targetchain ( TARGETS * chain, TARGETS * );
|
||||
TARGETS * targetentry ( TARGETS * chain, TARGET * );
|
||||
void target_include ( TARGET * including, TARGET * included );
|
||||
|
||||
Reference in New Issue
Block a user