From 121732b4b646962f200946d90c4dc8317bda2133 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 9 Jun 2010 07:12:59 +0000 Subject: [PATCH] When no target is requested to be built via UPDATE, return status of last UPDATE_NOW. [SVN r62635] --- historic/jam/src/builtins.c | 3 +++ historic/jam/src/builtins.h | 1 + historic/jam/src/jam.c | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/historic/jam/src/builtins.c b/historic/jam/src/builtins.c index 4f94edc3a..83bb1a2c4 100644 --- a/historic/jam/src/builtins.c +++ b/historic/jam/src/builtins.c @@ -1293,6 +1293,7 @@ LIST * builtin_update( PARSE * parse, FRAME * frame ) } extern int anyhow; +int last_update_now_status; /* Takes a list of target names as first argument, and immediately updates them. @@ -1355,6 +1356,8 @@ LIST * builtin_update_now( PARSE * parse, FRAME * frame ) close (original_stdout); close (original_stderr); } + + last_update_now_status = status; if (status == 0) return list_new (L0, newstr ("ok")); diff --git a/historic/jam/src/builtins.h b/historic/jam/src/builtins.h index 1edaab738..8ecc6616a 100644 --- a/historic/jam/src/builtins.h +++ b/historic/jam/src/builtins.h @@ -62,5 +62,6 @@ LIST *builtin_pad( PARSE *parse, FRAME *frame ); LIST *builtin_precious( PARSE *parse, FRAME *frame ); void backtrace( FRAME *frame ); +extern int last_update_now_status; #endif diff --git a/historic/jam/src/jam.c b/historic/jam/src/jam.c index b10974e08..2d06316e6 100644 --- a/historic/jam/src/jam.c +++ b/historic/jam/src/jam.c @@ -529,6 +529,10 @@ int main( int argc, char * * argv, char * * arg_environ ) status |= make( targets_count, targets2, anyhow ); free( targets ); } + else + { + status = last_update_now_status; + } PROFILE_EXIT( MAIN_MAKE ); }