The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rules.h File Reference

#include "modules.h"
#include "jam.h"

Include dependency graph for rules.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  _action
struct  _actions
struct  _rule
struct  _settings
struct  _target
struct  _targets
struct  argument_list
struct  rule_actions

Defines

#define RULE_EXISTING   0x20
#define RULE_IGNORE   0x04
#define RULE_NEWSRCS   0x01
#define RULE_PIECEMEAL   0x10
#define RULE_QUIETLY   0x08
#define RULE_TOGETHER   0x02
#define T_BIND_EXISTS   3
#define T_BIND_MISSING   1
#define T_BIND_PARENTS   2
#define T_BIND_UNBOUND   0
#define T_FATE_BROKEN   10
#define T_FATE_BUILD   5
#define T_FATE_CANTFIND   10
#define T_FATE_CANTMAKE   11
#define T_FATE_INIT   0
#define T_FATE_ISTMP   4
#define T_FATE_MAKING   1
#define T_FATE_MISSING   6
#define T_FATE_NEEDTMP   7
#define T_FATE_NEWER   3
#define T_FATE_OUTDATED   8
#define T_FATE_SPOIL   4
#define T_FATE_STABLE   2
#define T_FATE_TOUCHED   5
#define T_FATE_UPDATE   9
#define T_FLAG_FAIL_EXPECTED   0x0100
#define T_FLAG_INTERNAL   0x0200
#define T_FLAG_LEAVES   0x0010
#define T_FLAG_NOCARE   0x0002
#define T_FLAG_NOTFILE   0x0004
#define T_FLAG_NOUPDATE   0x0020
#define T_FLAG_RMOLD   0x0080
#define T_FLAG_TEMP   0x0001
#define T_FLAG_TOUCHED   0x0008
#define T_FLAG_VISITED   0x0040
#define T_MAKE_ACTIVE   2
#define T_MAKE_DONE   4
#define T_MAKE_INIT   0
#define T_MAKE_ONSTACK   1
#define T_MAKE_RUNNING   3

Typedefs

typedef _action ACTION
typedef _actions ACTIONS
typedef argument_list argument_list
typedef _rule RULE
typedef rule_actions rule_actions
typedef _settings SETTINGS
typedef _target TARGET
typedef _targets TARGETS

Functions

ACTIONSactionlist (ACTIONS *chain, ACTION *action)
void actions_free (rule_actions *)
void actions_refer (rule_actions *)
SETTINGSaddsettings (SETTINGS *head, int append, char *symbol, LIST *value)
void args_free (argument_list *)
argument_listargs_new ()
void args_refer (argument_list *)
void bind_explicitly_located_targets ()
RULEbindrule (char *rulename, module_t *)
TARGETbindtarget (const char *targetname)
SETTINGScopysettings (SETTINGS *v)
TARGETcopytarget (const TARGET *t)
void donerules ()
void freeactions (ACTIONS *chain)
void freesettings (SETTINGS *v)
void freetargets (TARGETS *chain)
RULEimport_rule (RULE *source, module_t *m, char *name)
RULEnew_rule_actions (module_t *m, char *rulename, char *command, LIST *bindlist, int flags)
RULEnew_rule_body (module_t *m, char *rulename, argument_list *args, PARSE *procedure, int exprt)
void popsettings (SETTINGS *v)
void pushsettings (SETTINGS *v)
void rule_free (RULE *r)
TARGETsearch_for_target (char *name, LIST *search_path)
TARGETStargetchain (TARGETS *chain, TARGETS *targets)
TARGETStargetentry (TARGETS *chain, TARGET *target)
TARGETStargetlist (TARGETS *chain, LIST *targets)
void touchtarget (char *t)


Define Documentation

#define RULE_EXISTING   0x20
 

Definition at line 75 of file rules.h.

Referenced by make1list().

#define RULE_IGNORE   0x04
 

Definition at line 72 of file rules.h.

#define RULE_NEWSRCS   0x01
 

Definition at line 70 of file rules.h.

Referenced by make1cmds().

#define RULE_PIECEMEAL   0x10
 

Definition at line 74 of file rules.h.

#define RULE_QUIETLY   0x08
 

Definition at line 73 of file rules.h.

#define RULE_TOGETHER   0x02
 

Definition at line 71 of file rules.h.

#define T_BIND_EXISTS   3
 

Definition at line 175 of file rules.h.

Referenced by make0(), make1bind(), make1list(), and search_for_target().

#define T_BIND_MISSING   1
 

Definition at line 170 of file rules.h.

Referenced by make0().

#define T_BIND_PARENTS   2
 

Definition at line 174 of file rules.h.

Referenced by make0().

#define T_BIND_UNBOUND   0
 

Definition at line 169 of file rules.h.

Referenced by make0().

#define T_FATE_BROKEN   10
 

Definition at line 203 of file rules.h.

Referenced by make0().

#define T_FATE_BUILD   5
 

Definition at line 196 of file rules.h.

Referenced by make0().

#define T_FATE_CANTFIND   10
 

Definition at line 204 of file rules.h.

Referenced by make1b().

#define T_FATE_CANTMAKE   11
 

Definition at line 205 of file rules.h.

Referenced by make0(), and make1b().

#define T_FATE_INIT   0
 

Definition at line 187 of file rules.h.

Referenced by make1b().

#define T_FATE_ISTMP   4
 

Definition at line 194 of file rules.h.

Referenced by make1b().

#define T_FATE_MAKING   1
 

Definition at line 188 of file rules.h.

Referenced by make0(), and make1b().

#define T_FATE_MISSING   6
 

Definition at line 198 of file rules.h.

Referenced by make0(), make1b(), and make1c().

#define T_FATE_NEEDTMP   7
 

Definition at line 199 of file rules.h.

Referenced by make1b().

#define T_FATE_NEWER   3
 

Definition at line 191 of file rules.h.

Referenced by make1b().

#define T_FATE_OUTDATED   8
 

Definition at line 200 of file rules.h.

Referenced by make1b().

#define T_FATE_SPOIL   4
 

Definition at line 193 of file rules.h.

#define T_FATE_STABLE   2
 

Definition at line 190 of file rules.h.

Referenced by make1b().

#define T_FATE_TOUCHED   5
 

Definition at line 197 of file rules.h.

Referenced by make1b().

#define T_FATE_UPDATE   9
 

Definition at line 201 of file rules.h.

Referenced by make1b().

#define T_FLAG_FAIL_EXPECTED   0x0100
 

Definition at line 156 of file rules.h.

Referenced by load_builtins().

#define T_FLAG_INTERNAL   0x0200
 

Definition at line 158 of file rules.h.

#define T_FLAG_LEAVES   0x0010
 

Definition at line 141 of file rules.h.

Referenced by load_builtins().

#define T_FLAG_NOCARE   0x0002
 

Definition at line 138 of file rules.h.

Referenced by load_builtins().

#define T_FLAG_NOTFILE   0x0004
 

Definition at line 139 of file rules.h.

Referenced by copytarget(), and load_builtins().

#define T_FLAG_NOUPDATE   0x0020
 

Definition at line 142 of file rules.h.

Referenced by load_builtins().

#define T_FLAG_RMOLD   0x0080
 

Definition at line 149 of file rules.h.

Referenced by load_builtins(), and make1b().

#define T_FLAG_TEMP   0x0001
 

Definition at line 137 of file rules.h.

Referenced by load_builtins(), and make0().

#define T_FLAG_TOUCHED   0x0008
 

Definition at line 140 of file rules.h.

Referenced by load_builtins().

#define T_FLAG_VISITED   0x0040
 

Definition at line 143 of file rules.h.

#define T_MAKE_ACTIVE   2
 

Definition at line 211 of file rules.h.

Referenced by make1a().

#define T_MAKE_DONE   4
 

Definition at line 213 of file rules.h.

#define T_MAKE_INIT   0
 

Definition at line 209 of file rules.h.

Referenced by make1a().

#define T_MAKE_ONSTACK   1
 

Definition at line 210 of file rules.h.

#define T_MAKE_RUNNING   3
 

Definition at line 212 of file rules.h.

Referenced by make1a().


Typedef Documentation

typedef struct _action ACTION
 

Definition at line 49 of file rules.h.

Referenced by actionlist(), and evaluate_rule().

typedef struct _actions ACTIONS
 

Definition at line 50 of file rules.h.

Referenced by actionlist(), freeactions(), make1c(), and make1cmds().

typedef struct argument_list argument_list
 

Definition at line 79 of file rules.h.

typedef struct _rule RULE
 

Definition at line 46 of file rules.h.

Referenced by add_rule_name(), argument_error(), bind_builtin(), bindrule(), builtin_export(), builtin_import(), cmd_new(), collect_arguments(), define_rule(), delete_rule_(), demand_rules(), duplicate_rule(), enter_rule(), evaluate_rule(), global_rule(), global_rule_name(), import_base_rule(), import_rule(), lookup_rule(), make1cmds(), new_rule_actions(), new_rule_body(), rule_free(), set_rule_actions(), set_rule_body(), and type_check().

typedef struct rule_actions rule_actions
 

Definition at line 78 of file rules.h.

typedef struct _settings SETTINGS
 

Definition at line 51 of file rules.h.

Referenced by addsettings(), bind_explicitly_located_target(), collect_arguments(), compile_foreach(), compile_local(), copysettings(), donerules(), evaluate_rule(), freesettings(), make0(), make1c(), make1cmds(), make1settings(), popsettings(), and pushsettings().

typedef struct _target TARGET
 

Definition at line 47 of file rules.h.

Referenced by bind_explicitly_located_target(), bindtarget(), builtin_depends(), builtin_hdrmacro(), builtin_search_for_target(), compile_include(), compile_on(), compile_settings(), copytarget(), freetarget(), headers(), macro_headers(), make(), make0(), make1(), make1a(), make1b(), make1bind(), make1c(), make1cmds(), make1d(), make1list(), make1settings(), make_closure(), push_state(), search_for_target(), swap_settings(), and targetentry().

typedef struct _targets TARGETS
 

Definition at line 48 of file rules.h.

Referenced by evaluate_rule(), freetargets(), make0(), make0sort(), make1a(), make1b(), make1c(), make1list(), targetchain(), targetentry(), and targetlist().


Function Documentation

ACTIONS* actionlist ACTIONS chain,
ACTION action
 

Definition at line 362 of file rules.c.

References _actions::action, ACTION, ACTIONS, _actions::next, and _actions::tail.

Referenced by evaluate_rule().

00365 {
00366         ACTIONS *actions = (ACTIONS *)malloc( sizeof( ACTIONS ) );
00367 
00368         actions->action = action;
00369 
00370         if( !chain ) chain = actions;
00371         else chain->tail->next = actions;
00372         chain->tail = actions;
00373         actions->next = 0;
00374 
00375         return chain;
00376 }

void actions_free rule_actions  ) 
 

Definition at line 591 of file rules.c.

References rule_actions::bindlist, rule_actions::command, hash::free, freestr(), list_free(), and rule_actions::reference_count.

Referenced by rule_free(), and set_rule_actions().

00592 {
00593     if (--a->reference_count <= 0)
00594     {
00595         freestr(a->command);
00596         list_free(a->bindlist);
00597         free(a);
00598     }
00599 }

Here is the call graph for this function:

void actions_refer rule_actions  ) 
 

Definition at line 583 of file rules.c.

References rule_actions::reference_count.

Referenced by set_rule_actions().

00584 {
00585     ++a->reference_count;
00586 }

SETTINGS* addsettings SETTINGS head,
int  append,
char *  symbol,
LIST value
 

Definition at line 390 of file rules.c.

References LIST, list_append(), list_free(), newstr(), _list::next, _settings::next, SETTINGS, settings_freelist, _settings::symbol, v, and _settings::value.

Referenced by collect_arguments(), compile_foreach(), compile_local(), compile_settings(), copysettings(), and make1settings().

00395 {
00396         SETTINGS *v;
00397         
00398         /* Look for previous setting */
00399 
00400         for( v = head; v; v = v->next )
00401             if( !strcmp( v->symbol, symbol ) )
00402                 break;
00403 
00404         /* If not previously set, alloc a new. */
00405         /* If appending, do so. */
00406         /* Else free old and set new. */
00407 
00408         if( !v )
00409         {
00410         v = settings_freelist;
00411         
00412         if ( v )
00413             settings_freelist = v->next;
00414         else
00415             v = (SETTINGS *)malloc( sizeof( *v ) );
00416         
00417             v->symbol = newstr( symbol );
00418             v->value = value;
00419             v->next = head;
00420             head = v;
00421         }
00422         else if( append )
00423         {
00424             v->value = list_append( v->value, value );
00425         }
00426         else
00427         {
00428             list_free( v->value );
00429             v->value = value;
00430         } 
00431 
00432         /* Return (new) head of list. */
00433 
00434         return head;
00435 }

Here is the call graph for this function:

void args_free argument_list  ) 
 

Definition at line 571 of file rules.c.

References argument_list::data, hash::free, lol_free(), and argument_list::reference_count.

Referenced by rule_free(), and set_rule_body().

00572 {
00573     if (--a->reference_count <= 0)
00574     {
00575         lol_free(a->data);
00576         free(a);
00577     }
00578 }

Here is the call graph for this function:

argument_list* args_new  ) 
 

Definition at line 552 of file rules.c.

References argument_list::data, lol_init(), r, and argument_list::reference_count.

Referenced by bind_builtin(), and compile_setcomp().

00553 {
00554     argument_list* r = (argument_list*)malloc( sizeof(argument_list) );
00555     r->reference_count = 0;
00556     lol_init(r->data);
00557     return r;
00558 }

Here is the call graph for this function:

void args_refer argument_list  ) 
 

Definition at line 563 of file rules.c.

References argument_list::reference_count.

Referenced by set_rule_body().

00564 {
00565     ++a->reference_count;
00566 }

void bind_explicitly_located_targets  ) 
 

Definition at line 175 of file rules.c.

References bind_explicitly_located_target(), hashenumerate(), and targethash.

Referenced by make().

00176 {
00177     if (targethash)
00178         hashenumerate(targethash, bind_explicitly_located_target, (void*)0);
00179 }

Here is the call graph for this function:

RULE* bindrule char *  rulename,
module_t
 

Definition at line 761 of file rules.c.

References enter_rule(), lookup_rule(), m, root_module(), and RULE.

Referenced by evaluate_rule().

00762 {
00763     RULE *result;
00764 
00765     result = lookup_rule(rulename, m, 0);
00766     if (!result)
00767         result = lookup_rule(rulename, root_module(), 0);
00768     /* We've only one caller, 'evaluate_rule', which will complain about 
00769        calling underfined rule. We could issue the error
00770        here, but we don't have necessary information, such as frame.
00771     */
00772     if (!result)
00773         result = enter_rule( rulename, root_module() );
00774 
00775     return result;
00776 }

Here is the call graph for this function:

TARGET* bindtarget const char *  targetname  ) 
 

Definition at line 131 of file rules.c.

References _target::boundname, HASHDATA, hashenter, hashinit(), _target::name, newstr(), TARGET, and targethash.

Referenced by builtin_depends(), builtin_flags(), builtin_hdrmacro(), compile_include(), compile_on(), compile_settings(), make(), make0(), make1settings(), search_for_target(), targetlist(), and touchtarget().

00132 {
00133         TARGET target, *t = &target;
00134 
00135         if( !targethash )
00136             targethash = hashinit( sizeof( TARGET ), "targets" );
00137 
00138     /* Perforce added const everywhere. No time to merge that change. */
00139         t->name = (char*)targetname;
00140 
00141         if( hashenter( targethash, (HASHDATA **)&t ) )
00142         {
00143             memset( (char *)t, '\0', sizeof( *t ) );
00144             t->name = newstr( (char*)targetname );      /* never freed */
00145             t->boundname = t->name;             /* default for T_FLAG_NOTFILE */
00146         }
00147 
00148         return t;
00149 }

Here is the call graph for this function:

SETTINGS* copysettings SETTINGS v  ) 
 

Definition at line 462 of file rules.c.

References addsettings(), list_copy(), _settings::next, SETTINGS, _settings::symbol, and v.

Referenced by make0(), and make1c().

00463 {
00464     SETTINGS *copy = 0, *v;
00465 
00466     for (v = head; v; v = v->next)
00467         copy = addsettings(copy, 0, v->symbol, list_copy(0, v->value));
00468 
00469     return copy;
00470 }

Here is the call graph for this function:

TARGET* copytarget const TARGET t  ) 
 

Definition at line 262 of file rules.c.

References _target::boundname, copystr(), _target::flags, _target::name, T_FLAG_NOTFILE, and TARGET.

Referenced by builtin_depends(), and make0().

00263 {
00264         TARGET *t;
00265 
00266         t = (TARGET *)malloc( sizeof( *t ) );
00267         memset( (char *)t, '\0', sizeof( *t ) );
00268         t->name = copystr( ot->name );
00269         t->boundname = t->name;
00270 
00271         t->flags |= T_FLAG_NOTFILE | T_FLAG_INTERNAL;
00272 
00273         return t;
00274 }

Here is the call graph for this function:

void donerules  ) 
 

Definition at line 537 of file rules.c.

References hash::free, freetarget(), hashdone(), hashenumerate(), n, _settings::next, SETTINGS, settings_freelist, and targethash.

Referenced by main().

00538 {
00539      hashenumerate( targethash, freetarget, 0 );
00540         hashdone( targethash );
00541     while ( settings_freelist )
00542     {
00543         SETTINGS* n = settings_freelist->next;
00544         free( settings_freelist );
00545         settings_freelist = n;
00546     }
00547 }

Here is the call graph for this function:

void freeactions ACTIONS chain  ) 
 

Definition at line 488 of file rules.c.

References ACTIONS, hash::free, n, and _actions::next.

Referenced by freetarget().

00489 {
00490     while( chain )
00491     {
00492         ACTIONS* n = chain->next;
00493         free( chain );
00494         chain = n;
00495     }
00496 }

void freesettings SETTINGS v  ) 
 

Definition at line 504 of file rules.c.

References freestr(), list_free(), n, _settings::next, SETTINGS, settings_freelist, _settings::symbol, v, and _settings::value.

Referenced by compile_foreach(), compile_local(), evaluate_rule(), freetarget(), make0(), make1c(), and make1cmds().

00505 {
00506         while( v )
00507         {
00508             SETTINGS *n = v->next;
00509 
00510             freestr( v->symbol );
00511             list_free( v->value );
00512         v->next = settings_freelist;
00513         settings_freelist = v;
00514 
00515             v = n;
00516         }
00517 }

Here is the call graph for this function:

void freetargets TARGETS chain  ) 
 

Definition at line 475 of file rules.c.

References hash::free, n, _targets::next, and TARGETS.

Referenced by freetarget().

00476 {
00477     while( chain )
00478     {
00479         TARGETS* n = chain->next;
00480         free( chain );
00481         chain = n;
00482     }
00483 }

RULE* import_rule RULE source,
module_t m,
char *  name
 

Definition at line 778 of file rules.c.

References _rule::actions, _rule::arguments, define_rule(), m, _rule::module, _rule::procedure, RULE, set_rule_actions(), and set_rule_body().

Referenced by builtin_import(), duplicate_rule(), and import_base_rule().

00779 {
00780     RULE* dest = define_rule( source->module, name, m );
00781     set_rule_body( dest, source->arguments, source->procedure );
00782     set_rule_actions( dest, source->actions );
00783     return dest;
00784 }

Here is the call graph for this function:

RULE* new_rule_actions module_t m,
char *  rulename,
char *  command,
LIST bindlist,
int  flags
 

Definition at line 699 of file rules.c.

References _rule::actions, actions_new(), define_rule(), global_rule(), LIST, m, RULE, and set_rule_actions().

Referenced by compile_setexec().

00700 {
00701     RULE* local = define_rule( m, rulename, m );
00702     RULE* global = global_rule( local );
00703     set_rule_actions( local, actions_new( command, bindlist, flags ) );
00704     set_rule_actions( global, local->actions );
00705     return local;
00706 }

Here is the call graph for this function:

RULE* new_rule_body module_t m,
char *  rulename,
argument_list args,
PARSE procedure,
int  exprt
 

Definition at line 661 of file rules.c.

References define_rule(), _rule::exported, global_rule_name(), m, PARSE, RULE, _PARSE::rulename, and set_rule_body().

Referenced by bind_builtin(), and compile_setcomp().

00662 {
00663     RULE* local = define_rule( m, rulename, m );
00664     local->exported = exported;
00665     set_rule_body( local, args, procedure );
00666     
00667     /* Mark the procedure with the global rule name, regardless of
00668      * whether the rule is exported. That gives us something
00669      * reasonably identifiable that we can use, e.g. in profiling
00670      * output. Only do this once, since this could be called multiple
00671      * times with the same procedure.
00672      */
00673     if ( procedure->rulename == 0 )
00674         procedure->rulename = global_rule_name( local );
00675 
00676     return local;
00677 }

Here is the call graph for this function:

void popsettings SETTINGS v  ) 
 

Definition at line 453 of file rules.c.

References pushsettings(), SETTINGS, and v.

Referenced by bind_explicitly_located_target(), compile_foreach(), compile_include(), compile_local(), compile_on(), evaluate_rule(), make0(), make1bind(), make1c(), make1cmds(), and swap_settings().

00454 {
00455         pushsettings( v );      /* just swap again */
00456 }

Here is the call graph for this function:

void pushsettings SETTINGS v  ) 
 

Definition at line 442 of file rules.c.

References _settings::next, SETTINGS, _settings::symbol, v, _settings::value, and var_swap().

Referenced by bind_explicitly_located_target(), compile_foreach(), compile_include(), compile_local(), compile_on(), evaluate_rule(), make0(), make1bind(), make1c(), make1cmds(), popsettings(), and swap_settings().

00443 {
00444         for( ; v; v = v->next )
00445             v->value = var_swap( v->symbol, v->value );
00446 }

Here is the call graph for this function:

void rule_free RULE r  ) 
 

Definition at line 112 of file rules.c.

References _rule::actions, actions_free(), args_free(), _rule::arguments, freestr(), _rule::name, parse_free(), _rule::procedure, r, and RULE.

Referenced by delete_rule_().

00113 {
00114     freestr( r->name );
00115     r->name = "";
00116     parse_free( r->procedure );
00117     r->procedure = 0;
00118         if ( r->arguments )
00119             args_free( r->arguments );
00120     r->arguments = 0;
00121     if ( r->actions )
00122                 actions_free( r->actions );
00123     r->actions = 0;
00124 }

Here is the call graph for this function:

TARGET* search_for_target char *  name,
LIST search_path
 

Definition at line 185 of file rules.c.

References _target::binding, bindtarget(), _target::boundname, call_bind_rule(), f(), _located_target::file_name, hashcheck, HASHDATA, hashinit(), LIST, list_next, LOCATED_TARGET, located_targets, _target::name, newstr(), path_build(), path_parse(), PATHNAME, _list::string, string_free(), string_new(), string_truncate(), T_BIND_EXISTS, TARGET, _target::time, timestamp(), and string::value.

Referenced by builtin_search_for_target().

00186 {
00187     PATHNAME f[1];
00188     string buf[1];
00189     LOCATED_TARGET lt, *lta = &lt;
00190     time_t time;
00191     int found = 0;
00192     TARGET* result;
00193 
00194     string_new( buf );
00195 
00196         path_parse( name, f );
00197 
00198     f->f_grist.ptr = 0;
00199     f->f_grist.len = 0;
00200 
00201     while( search_path )
00202     {
00203         f->f_root.ptr = search_path->string;
00204         f->f_root.len = strlen( search_path->string );
00205 
00206         string_truncate( buf, 0 );
00207         path_build( f, buf, 1 );
00208 
00209         lt.file_name = buf->value ;
00210 
00211         if (! located_targets )
00212             located_targets = hashinit( sizeof(LOCATED_TARGET),
00213                                         "located targets" );
00214 
00215 
00216         if ( hashcheck( located_targets, (HASHDATA **)&lta ) )
00217         {
00218             return lta->target;
00219         }
00220 
00221         timestamp( buf->value, &time );
00222         if (time)
00223         {
00224             found = 1;
00225             break;
00226         }
00227 
00228         search_path = list_next( search_path );
00229     }
00230 
00231     if ( ! found )
00232     {
00233         f->f_root.ptr = 0;
00234         f->f_root.len = 0;
00235 
00236         string_truncate( buf, 0 );
00237         path_build( f, buf, 1 );
00238 
00239         timestamp( buf->value, &time );        
00240     }
00241 
00242     result = bindtarget( name );
00243     result->boundname = newstr( buf->value );
00244     result->time = time;
00245     result->binding = time ? T_BIND_EXISTS : T_BIND_MISSING;
00246 
00247     call_bind_rule( result->name, result->boundname );
00248     
00249     string_free( buf );
00250 
00251     return result;
00252 
00253 }

Here is the call graph for this function:

TARGETS* targetchain TARGETS chain,
TARGETS targets
 

Definition at line 340 of file rules.c.

References _targets::next, _targets::tail, and TARGETS.

Referenced by make0(), and make1a().

00343 {
00344         TARGETS *c;
00345 
00346         if( !targets )
00347             return chain;
00348         else if( !chain )
00349             return targets;
00350 
00351         chain->tail->next = targets;
00352         chain->tail = targets->tail;
00353 
00354         return chain;
00355 }

TARGETS* targetentry TARGETS chain,
TARGET target
 

Definition at line 314 of file rules.c.

References c, _targets::next, _targets::tail, _targets::target, TARGET, and TARGETS.

Referenced by make0(), make1a(), make1b(), make1c(), and targetlist().

00317 {
00318         TARGETS *c;
00319 
00320         c = (TARGETS *)malloc( sizeof( TARGETS ) );
00321         c->target = target;
00322 
00323         if( !chain ) chain = c;
00324         else chain->tail->next = c;
00325         chain->tail = c;
00326         c->next = 0;
00327 
00328         return chain;
00329 }

TARGETS* targetlist TARGETS chain,
LIST targets
 

Definition at line 295 of file rules.c.

References bindtarget(), LIST, list_next, _list::string, targetentry(), and TARGETS.

Referenced by builtin_depends(), evaluate_rule(), and make0().

00298 {
00299         for( ; targets; targets = list_next( targets ) )
00300             chain = targetentry( chain, bindtarget( targets->string ) );
00301 
00302         return chain;
00303 }

Here is the call graph for this function:

void touchtarget char *  t  ) 
 

Definition at line 281 of file rules.c.

References bindtarget(), and _target::flags.

Referenced by main().

00282 {
00283         bindtarget( t )->flags |= T_FLAG_TOUCHED;
00284 }

Here is the call graph for this function:


Generated on Mon Nov 8 17:08:24 2004 for MPT by  doxygen 1.3.9.1