PDA

View Full Version : How do you delete a set of macros that may or maynot be created during a build run?


ambalboa
10-15-2007, 01:09 PM
Hello.

I would like to delete a set of temporary macros that are created for one group of steps and after that is done, these newly created macros are deleted. I suppose I need to delete them because they will be recreated again for the next group of steps but they may be given a different value. I know there is an option to delete the named macro, but what if that macro doesn't exist? Will it fail?

I am using a 'Process Files' action step to check if a certain filename is written in a log file and if so, create/set a temp. macro to a value. Each time a filename is processed, the index number is incremented. I am using the PROCFILES_CURRENT temp. macro created by the 'Process Files' action step for indexing. I append the index number to the name of the temp. macro being /created/set. If the filename is not found, that macro with the corresponding index number to be attached to the name is not created. Therefore, sometimes macros are created and there may be times when none are. I want to keep things simple and I would like to keep using the same name for the temp. macros, but I suppose because of the inconsistencies, I would need to delete the ones that are created. Is this possible? Thanks in advance.

ambalboa
10-15-2007, 01:46 PM
I've been thinking, since I am using these temp. macros to do build rules, I suppose I need to create all of them, right? I guess when the filename is not found, I should create/set the temp. macro anyway but with a different value. If I have a build rule that evaluates a macro, and that macro doesn't exist, an error would occur? If so, I'll just figure out a way to correct this. Sorry and thanks.