2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 12:42:11 +00:00

Don't reset -q after calling UPDATE_NOW with ignore-minus-n

[SVN r83629]
This commit is contained in:
Steven Watanabe
2013-03-29 15:41:19 +00:00
parent 33d4e36a37
commit 94de4748d9
5 changed files with 165 additions and 15 deletions

View File

@@ -1443,7 +1443,6 @@ LIST * builtin_update_now( FRAME * frame, int flags )
if ( !list_empty( force ) )
{
globs.noexec = original_noexec;
globs.quitquick = original_quitquick;
}
if ( !list_empty( continue_ ) )

View File

@@ -148,12 +148,8 @@ int make( LIST * targets, int anyhow )
status = counts->cantfind || counts->cantmake;
{
LISTITER iter;
LISTITER end;
PROFILE_ENTER( MAKE_MAKE1 );
for ( iter = list_begin( targets ), end = list_end( targets ); iter !=
end; iter = list_next( iter ) )
status |= make1( bindtarget( list_item( iter ) ) );
status |= make1( targets );
PROFILE_EXIT( MAKE_MAKE1 );
}

View File

@@ -16,7 +16,7 @@
#include "rules.h"
int make( LIST * targets, int anyhow );
int make1( TARGET * const t );
int make1( LIST * t );
typedef struct {
int temp;

View File

@@ -186,25 +186,37 @@ static void push_stack_on_stack( stack * const pDest, stack * const pSrc )
/*
* make1() - execute commands to update a TARGET and all of its dependencies
* make1() - execute commands to update a list of targets and all of their dependencies
*/
static int intr = 0;
static int quit = 0;
int make1( TARGET * const t )
int make1( LIST * targets )
{
state * pState;
memset( (char *)counts, 0, sizeof( *counts ) );
{
LISTITER iter, end;
stack temp_stack = { NULL };
for ( iter = list_begin( targets ), end = list_end( targets );
iter != end; iter = list_next( iter ) )
push_state( &temp_stack, bindtarget( list_item( iter ) ), NULL, T_STATE_MAKE1A );
push_stack_on_stack( &state_stack, &temp_stack );
}
/* Clear any state left over from the past */
quit = 0;
/* Recursively make the target and its dependencies. */
push_state( &state_stack, t, NULL, T_STATE_MAKE1A );
while ( 1 )
{
while ( ( pState = current_state( &state_stack ) ) )
{
if ( intr )
if ( quit )
pop_state( &state_stack );
switch ( pState->curstate )
@@ -235,6 +247,11 @@ int make1( TARGET * const t )
printf( "...updated %d target%s...\n", counts->made,
counts->made > 1 ? "s" : "" );
/* If we were interrupted, exit now that all child processes
have finished. */
if ( intr )
exit( 1 );
return counts->total != counts->made;
}
@@ -302,7 +319,7 @@ static void make1a( state * const pState )
{
stack temp_stack = { NULL };
TARGETS * c;
for ( c = t->depends; c && !intr; c = c->next )
for ( c = t->depends; c && !quit; c = c->next )
push_state( &temp_stack, c->target, t, T_STATE_MAKE1A );
push_stack_on_stack( &state_stack, &temp_stack );
}
@@ -878,12 +895,16 @@ static void make1c_closure
printf( "...\n" );
}
/* On interrupt, set intr so _everything_ fails. Do the same for failed
/* On interrupt, set quit so _everything_ fails. Do the same for failed
* commands if we were asked to stop the build in case of any errors.
*/
if ( t->status == EXEC_CMD_INTR ||
( t->status == EXEC_CMD_FAIL && globs.quitquick ) )
if ( t->status == EXEC_CMD_INTR )
{
++intr;
++quit;
}
if ( t->status == EXEC_CMD_FAIL && globs.quitquick )
++quit;
/* If the command was not successful remove all of its targets not marked as
* "precious".