Hi forum,
an output file in a Release target need to be named including the actual build number. Fortunately the build number is stored in a separate file inside the project dir. The manual says that back ticks could be used. So a command line in the targets' post script like the following should do it in my opinion:
objdump -D $(TARGET_OUTPUT_FILE) > $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME)-`type buildnumber.dat`.dump
This unfortunately doesn't work.
The manual however doesn't tell, if this is either platform dependent or to be used in a special context only.
This problem arose on a Windows 7 VM using C::B 13.12.
Can anybody give a hint, please?
Greetings
Hollim
There is a 0x0d 0x0a in the file (it's Window$).
I'm sure 'type' isn't able to do anything as it doesn't gets called at all.
Putting a line with: `find "blablabla" c:\temp\usercode.txt`
in a post build script, its execution results in:
Running target post-build steps
`find "blablabla" c:\temp\usercode.txt`
Execution of '`find "blablabla" c:\temp\usercode.txt`' in 'C:\Pro\newproject' failed.
It does however run fine in a regular cmd window.
Ho did you implement the back ticks in the Win version of C::B? Are you sure this is available on Win?
If this isn't working, is there a way to set a (global) variable from a pre build script for using in the post build script?
Please note that I'm not aware of the C::B script engine - I'm talking about the Project Build Options / Pre/Post Build Steps.
Thanks.