View Single Post
  #5  
Old 02-20-2007, 02:47 PM
jdavidi jdavidi is online now
Registered User
 
Join Date: 10-27-2003
Posts: 38
"One way to do that would be to exit (or wait in a loop) at the beginning of the build if a signal macro existed, creating that global macro next if it doesn't exist, and delete it at the end of the build (on success or failure)."

Hi again,

After what I last wrote failed with the same error (as we both pretty much expected), I'm attempting to implement the signal macro suggestion above (from your 2/16 post).

Here's what I tried:

Right before they need to update a global macro, the build scripts will :

1) check if global "signal" macro %UPDATING_GLOBAL_MACROS_FILE% is defined (this is a repeatable step with a child "Wait" step of 1 second while %UPDATING_GLOBAL_MACROS_FILE% is defined)
2) assuming that it's not defined, create global macro %UPDATING_GLOBAL_MACROS_FILE%
3) Set/Update all the other global macros I need
4) destroy global macro %UPDATING_GLOBAL_MACROS_FILE%

However, the problem I'm still having is the scripts will either step over the loop in step 1 (because the .macros file doesn't have %UPDATING_GLOBAL_MACROS_FILE% when the build script opens) or it will stay in the loop indefinitely (if the .macros file DOES have %UPDATING_GLOBAL_MACROS_FILE% at the time the build script opens). The problem is that depending upon the 2 machines' timing

You mention that the entire .macros file is rewritten whenever a change is written to it; do I have any way of "refreshing" the macros file that an in-process build script is using?

Otherwise I'm not sure how to test for the signal macro without closing and reopening the build script.

We're so close, I can feel it
--jdavidi
Reply With Quote