MCPcopy Create free account
hub / github.com/boostorg/build / make1b

Function make1b

v2/engine/make1.c:375–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373 */
374
375static void make1b( state * const pState )
376{
377 TARGET * const t = pState->t;
378 TARGET * failed = 0;
379 char const * failed_name = "dependencies";
380
381 pop_state( &state_stack );
382
383 /* If any dependencies are still outstanding, wait until they signal their
384 * completion by pushing this same state for their parent targets.
385 */
386 if ( --t->asynccnt )
387 {
388 return;
389 }
390
391 /* Now ready to build target 't', if dependencies built OK. */
392
393 /* Collect status from dependencies. If -n was passed then act as though all
394 * dependencies built correctly (the only way they can fail is if UPDATE_NOW
395 * was called). If the dependencies can not be found or we got an interrupt,
396 * we can not get here.
397 */
398 if ( !globs.noexec )
399 {
400 TARGETS * c;
401 for ( c = t->depends; c; c = c->next )
402 if ( c->target->status > t->status && !( c->target->flags &
403 T_FLAG_NOCARE ) )
404 {
405 failed = c->target;
406 t->status = c->target->status;
407 }
408 }
409
410 /* If an internal header node failed to build, we want to output the target
411 * that it failed on.
412 */
413 if ( failed )
414 failed_name = failed->flags & T_FLAG_INTERNAL
415 ? failed->failed
416 : object_str( failed->name );
417 t->failed = failed_name;
418
419 /* If actions for building any of the dependencies have failed, bail.
420 * Otherwise, execute all actions to make the current target.
421 */
422 if ( ( t->status == EXEC_CMD_FAIL ) && t->actions )
423 {
424 ++counts->skipped;
425 if ( ( t->flags & ( T_FLAG_RMOLD | T_FLAG_NOTFILE ) ) == T_FLAG_RMOLD )
426 {
427 if ( !unlink( object_str( t->boundname ) ) )
428 printf( "...removing outdated %s\n", object_str( t->boundname )
429 );
430 }
431 else
432 printf( "...skipped %s for lack of %s...\n", object_str( t->name ),

Callers 1

make1Function · 0.85

Calls 4

pop_stateFunction · 0.85
object_strFunction · 0.85
make1cmdsFunction · 0.85
push_stateFunction · 0.85

Tested by

no test coverage detected