User forums > Help
using ${TARGET_OUTPUT_FILE} in tools is giving other result then expected
Jewe:
Hi,
I am creating a small tool to copy the result dll from a project to a certain directory
Name: Copy file
Exe: Copy
Para: ${TARGET_OUTPUT_FILE} "c:\Program Files\FitTrainer"
Dir: ${TARGET_OUTPUT_DIR}
Everything is getting filled in except the ${TARGET_OUTPUT_FILE}.
What am I doing wrong?
cheers,
Jewe
thomas:
Hard to tell what you're doing wrong, if anything.
Apart from the possibility of a bug (unlikely, since I've used that variable in the past, and it worked), this variable is only defined during the build (more specifically, only inside target scope, so for example it is not defined during the project's post-build steps). Thus, if you use different place, it will not be replaced.
Jewe:
Thanks Thomas for the explanation.
if this is done by design, please remove the macro keyword from the window.
it looks like you could use this key word at any time.
cheers,
Jeffrey
mariocup:
You could do such simple things in a postbuilt step of your project and then you have access to the CB variables.
--- Code: ---cmd /c copy $(TARGET_OUTPUT_FILE) <pathname>
--- End code ---
thomas:
--- Quote from: Jewe on January 17, 2008, 11:34:26 am ---if this is done by design, please remove the macro keyword from the window.
it looks like you could use this key word at any time.
--- End quote ---
Well, it can be used at any time, it just doesn't make sense to do so. What this variable points to is the output file of the currently active target. Such a thing as a "currently active" target obviously only exists while the build is running and a target is being built. At all other times, any target in the project is just as much "active" or "not active" like any other.
What value different from "empty" would you expect the variable to have?
Navigation
[0] Message Index
[#] Next page
Go to full version