From c9481ab35ff281aa681649b63e0e402087f19c53 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 5 Jun 2002 13:38:17 +0000 Subject: [PATCH] enable -q, thanks to "Markus Scherschanski" [SVN r14083] --- historic/jam/src/jam.c | 3 +++ historic/jam/src/make1.c | 2 ++ jam_src/jam.c | 3 +++ jam_src/make1.c | 2 ++ 4 files changed, 10 insertions(+) diff --git a/historic/jam/src/jam.c b/historic/jam/src/jam.c index 88090b6cd..e1cd23d7e 100644 --- a/historic/jam/src/jam.c +++ b/historic/jam/src/jam.c @@ -221,6 +221,7 @@ int main( int argc, char **argv, char **arg_environ ) printf( "-jx Run up to x shell commands concurrently.\n" ); printf( "-n Don't actually execute the updating actions.\n" ); printf( "-ox Write the updating actions to file x.\n" ); + printf( "-q Quit quickly as soon as a target fails.\n" ); printf( "-sx=y Set variable x=y, overriding environment.\n" ); printf( "-tx Rebuild x, even if it is up-to-date.\n" ); printf( "-v Print the version of jam and exit.\n" ); @@ -249,6 +250,8 @@ int main( int argc, char **argv, char **arg_environ ) if( ( s = getoptval( optv, 'n', 0 ) ) ) globs.noexec++, globs.debug[2] = 1; + if( ( s = getoptval( optv, 'q', 0 ) ) ) + globs.quitquick = 1; if( ( s = getoptval( optv, 'a', 0 ) ) ) anyhow++; diff --git a/historic/jam/src/make1.c b/historic/jam/src/make1.c index c5c4319ac..a5a4cd66a 100644 --- a/historic/jam/src/make1.c +++ b/historic/jam/src/make1.c @@ -395,6 +395,8 @@ make1d( printf( "...failed %s ", cmd->rule->name ); list_print( lol_get( &cmd->args, 0 ) ); printf( "...\n" ); + + if( globs.quitquick ) ++intr; } /* If the command was interrupted or failed and the target */ diff --git a/jam_src/jam.c b/jam_src/jam.c index 88090b6cd..e1cd23d7e 100644 --- a/jam_src/jam.c +++ b/jam_src/jam.c @@ -221,6 +221,7 @@ int main( int argc, char **argv, char **arg_environ ) printf( "-jx Run up to x shell commands concurrently.\n" ); printf( "-n Don't actually execute the updating actions.\n" ); printf( "-ox Write the updating actions to file x.\n" ); + printf( "-q Quit quickly as soon as a target fails.\n" ); printf( "-sx=y Set variable x=y, overriding environment.\n" ); printf( "-tx Rebuild x, even if it is up-to-date.\n" ); printf( "-v Print the version of jam and exit.\n" ); @@ -249,6 +250,8 @@ int main( int argc, char **argv, char **arg_environ ) if( ( s = getoptval( optv, 'n', 0 ) ) ) globs.noexec++, globs.debug[2] = 1; + if( ( s = getoptval( optv, 'q', 0 ) ) ) + globs.quitquick = 1; if( ( s = getoptval( optv, 'a', 0 ) ) ) anyhow++; diff --git a/jam_src/make1.c b/jam_src/make1.c index c5c4319ac..a5a4cd66a 100644 --- a/jam_src/make1.c +++ b/jam_src/make1.c @@ -395,6 +395,8 @@ make1d( printf( "...failed %s ", cmd->rule->name ); list_print( lol_get( &cmd->args, 0 ) ); printf( "...\n" ); + + if( globs.quitquick ) ++intr; } /* If the command was interrupted or failed and the target */