case T_FATE_NEEDTMP:
make1b( state *pState ){    TARGET      *t = pState->t;    TARGETS     *c;    TARGET      *failed = 0;    char* failed_name = "dependencies";    /* If any dependents are still outstanding, wait until they */    /* call make1b() to signal their completion. */    if( --(pState->t->asynccnt) )	{		pop_state(&state_stack);		return;	}        /* Try to aquire a semaphore. If it's locked, wait until the target       that locked it is build and signals completition. */#ifdef OPT_SEMAPHORE	if( t->semaphore && t->semaphore->asynccnt )	{        /* Append 't' to the list of targets waiting on semaphore. */	    t->semaphore->parents = targetentry( t->semaphore->parents, t );	    t->asynccnt++;	    if( DEBUG_EXECCMD )		printf( "SEM: %s is busy, delaying launch of %s\n",			t->semaphore->name, t->name);		pop_state(&state_stack);	    return;	}#endif    /* Now ready to build target 't'... if dependents built ok. */    /* Collect status from dependents */    for( c = t->depends; c; c = c->next )        if( c->target->status > t->status && !( c->target->flags & T_FLAG_NOCARE ))        {            failed = c->target;            pState->t->status = c->target->status;        }    /* If a internal header node failed to build, we'd want to output the        target that it failed on. */    if (failed && (failed->flags & T_FLAG_INTERNAL)) {        failed_name = failed->failed;    } else if (failed) {        failed_name = failed->name;    }    t->failed = failed_name;    /* If actions on deps have failed, bail. */    /* Otherwise, execute all actions to make target */    if( pState->t->status == EXEC_CMD_FAIL && pState->t->actions )    {        ++counts->skipped;        if ( ( pState->t->flags & ( T_FLAG_RMOLD | T_FLAG_NOTFILE ) ) == T_FLAG_RMOLD )        {            if( !unlink( pState->t->boundname ) )                printf( "...removing outdated %s\n", pState->t->boundname );        }        else {            printf( "...skipped %s for lack of %s...\n", pState->t->name, failed_name );        }    }    if( pState->t->status == EXEC_CMD_OK )        switch( pState->t->fate )        {        case T_FATE_INIT:        case T_FATE_MAKING:            /* shouldn't happen */        case T_FATE_STABLE:        case T_FATE_NEWER:            break;        case T_FATE_CANTFIND:        case T_FATE_CANTMAKE:            pState->t->status = EXEC_CMD_FAIL;            break;        case T_FATE_ISTMP:            if( DEBUG_MAKE )                printf( "...using %s...\n", pState->t->name );            break;        case T_FATE_TOUCHED:        case T_FATE_MISSING:        case T_FATE_OUTDATED:        case T_FATE_UPDATE:            /* Set "on target" vars, build actions, unset vars */            /* Set "progress" so that make1c() counts this target among */            /* the successes/failures. */            if( pState->t->actions )            {                ++counts->total;                if( DEBUG_MAKE && !( counts->total % 100 ) )                    printf( "...on %dth target...\n", counts->total );                pState->t->cmds = (char *)make1cmds( pState->t );                pState->t->progress = T_MAKE_RUNNING;            }            break;        }		/* Call make1c() to begin the execution of the chain of commands */		/* needed to build target.  If we're not going to build target */		/* (because of dependency failures or because no commands need to */		/* be run) the chain will be empty and make1c() will directly */		/* signal the completion of target. */	/* Recurse on our dependents, manipulating progress to guard */#ifdef OPT_SEMAPHORE	/* If there is a semaphore, indicate that its in use */	if( pState->t->semaphore )	{	    ++(pState->t->semaphore->asynccnt);	    if( DEBUG_EXECCMD )		printf( "SEM: %s now used by %s\n", pState->t->semaphore->name,		       pState->t->name );	}#endif	pState->curstate = T_STATE_MAKE1C;}