Boost logo

Boost-Build :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2007-08-06 12:13:36


Roland Schwarz wrote:
> I attached a small patch, so -d+4 will also
> show the batchfiles content.

As Rene pointed out, my patch would break sequencing output in case of parallel
runs.

I have tried to fix this. See patch attached.

Basically the original command is remembered locally and
conditionally stored to the cmdtab, so the out_action will see the real cmd
sequence been invoked.

So the change to the command is only temporyry within the execcmd.

I could not find a place where the name of the batchfile was used for
another purpose. Also this only affects cmdtab which is local to execnt only.

Feedback welcome.

Roland aka speedsnail

Index: tools/jam/src/execnt.c
===================================================================
--- tools/jam/src/execnt.c (revision 38436)
+++ tools/jam/src/execnt.c (working copy)
@@ -199,7 +199,8 @@
     char *argv_static[ MAXARGC + 1 ]; /* +1 for NULL */
     char **argv = argv_static;
     char *p;
-
+ char *command_orig = NULL;
+
     /* Check to see if we need to hack around the line-length limitation. */
     /* Look for a JAMSHELL setting of "%", indicating that the command
      * should be invoked directly */
@@ -268,7 +269,8 @@
         }
         fputs( command, f );
         fclose( f );
-
+
+ command_orig = command;
         command = cmdtab[ slot ].tempfile_bat;
         
         if( DEBUG_EXECCMD )
@@ -401,7 +403,7 @@
             string_free( &cmdtab[ slot ].target );
             string_new( &cmdtab[ slot ].target );
         }
- string_copy( &cmdtab[ slot ].command, command );
+ string_copy( &cmdtab[ slot ].command, command_orig?command_orig:command );
         
         /* put together the comman we run */
         {


Boost-Build 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