Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79412 - trunk/tools/build/v2/engine
From: jurko.gospodnetic_at_[hidden]
Date: 2012-07-11 02:30:12


Author: jurko
Date: 2012-07-11 02:30:11 EDT (Wed, 11 Jul 2012)
New Revision: 79412
URL: http://svn.boost.org/trac/boost/changeset/79412

Log:
Boost Jam now again removes partially built targets in case of an interrupted command. Broken in revision [79341].
Text files modified:
   trunk/tools/build/v2/engine/make1.c | 41 +++++++++++++++++++--------------------
   1 files changed, 20 insertions(+), 21 deletions(-)

Modified: trunk/tools/build/v2/engine/make1.c
==============================================================================
--- trunk/tools/build/v2/engine/make1.c (original)
+++ trunk/tools/build/v2/engine/make1.c 2012-07-11 02:30:11 EDT (Wed, 11 Jul 2012)
@@ -886,25 +886,6 @@
         printf( "...\n" );
     }
 
- push_state( &state_stack, t, NULL, T_STATE_MAKE1D )->status = status;
-}
-
-
-/*
- * make1d() - handle command execution completion and call back make1c().
- *
- * exec_cmd() has completed and now all we need to do is fiddle with the status
- * and call back to make1c() so it can run the next command scheduled for
- * building this target or close up the target's build process in case there are
- * no more commands scheduled for it. On interrupts, we bail heavily.
- */
-
-static void make1d( state * pState )
-{
- TARGET * t = pState->t;
- CMD * cmd = (CMD *)t->cmds;
- int status = pState->status;
-
     /* Treat failed commands as interrupts in case we were asked to stop the
      * build in case of any errors.
      */
@@ -916,7 +897,7 @@
      */
     if ( status != EXEC_CMD_OK )
     {
- LIST * targets = lol_get( &cmd->args, 0 );
+ LIST * const targets = lol_get( (LOL *)&cmd->args, 0 );
         LISTITER iter = list_begin( targets );
         LISTITER const end = list_end( targets );
         for ( ; iter != end; iter = list_next( iter ) )
@@ -930,10 +911,28 @@
         }
     }
 
+ push_state( &state_stack, t, NULL, T_STATE_MAKE1D )->status = status;
+}
+
+
+/*
+ * make1d() - handle command execution completion and call back make1c().
+ *
+ * exec_cmd() has completed and now all we need to do is fiddle with the status
+ * and call back to make1c() so it can run the next command scheduled for
+ * building this target or close up the target's build process in case there are
+ * no more commands scheduled for it. On interrupts, we bail heavily.
+ */
+
+static void make1d( state * pState )
+{
+ TARGET * t = pState->t;
+ CMD * cmd = (CMD *)t->cmds;
+
     /* Free this command and call make1c() to move onto the next one scheduled
      * for building this same target.
      */
- t->status = status;
+ t->status = pState->status;
     t->cmds = (char *)cmd_next( cmd );
     cmd_free( cmd );
     pState->curstate = T_STATE_MAKE1C;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk