Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-16-2009, 01:50 PM
ASolovey ASolovey is online now
Registered User
 
Join Date: 05-25-2005
Posts: 13
Question Exportable project macros are not exported when overrided by temporary ones|

Hi, we're using VBP7 (7.0) and have just encountered a problem with subj.

Our vbp project contains a macro named 'BUILD_NO' which is marked as exportable. It is passed to the environment of programs being used during the build procedure.
So, when launched this from UI it works just fine.

The problem is that we need to override the value of this macro during automated build procedure when vbp is launched from the command line. We don that like this:

VisBuildCmd.exe BUILD_NO=123 build.bld

In this case the value of the temporary macro overrides the project macro. And all other parts of the project do 'see' that change.

BUT it is NOT exported! despite the project macro is marked as a exportable. That's the huge problem. The build process fails due to the fact that programs (specifically c++ compiler) do not have this macro in the environment.

Please let me know:
a) if this is the case
b) if this is a bug or by design behaviour
c) what's best workaround or solution

Best regards,
Alex.
Reply With Quote
  #2  
Old 04-16-2009, 02:39 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
A temporary macro created on the command-line will not update environment variables. Either:

1) Add a Set Macro step (with 'Add to environment variables' checked, Temporary macro type) to set BUILD_NO equal to %BUILD_NO%

This will force the BUILD_NO environment variable to be updated with the current BUILD_NO macro value.

or

2) Pass the value on the command-line with a different name (i..e, TEMP_BUILD_NO=123), and in the called project, add a Set Macro step (with 'Add to environment variables' checked, Temporary macro type, and a build rule to Build only if %TEMP_BUILD_NO% is undefined) setting BUILD_NO to %TEMP_BUILD_NO%


http://www.kinook.com/VisBuildPro/Ma...acroaction.htm
http://www.kinook.com/VisBuildPro/Manual/buildrules.htm
Reply With Quote
  #3  
Old 04-16-2009, 04:49 PM
ASolovey ASolovey is online now
Registered User
 
Join Date: 05-25-2005
Posts: 13
Thanks much,

did conditional macro replacement.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:17 PM.


Copyright © 1999-2023 Kinook Software, Inc.