Thanks for your answer CrasyCat,
The solution you suggest is the one I use in another project with another compiler: at every successful compilation a script is called that increment the firmware version number in a file.
I tried the same approch in Codewarrior 10.1 (now I use 10.2) with the post build steps, but this way when I ran the build process again, the compilation was ran (and the version number was incremented once again) even if there was no modification in source files: the problem is that the file containing the firmware version is modified by the script is included in another file, so this file is in the dependency list for the compilation process.
Example:
File build.c
#include "build_no.h"
...
File build_no.h
#define BUILD_NO xxx
...
The script updates the xxx number at the end of the successful compilation and link, after the end of the process, so the build_no.h is modified from the last compilation. When I run the compilation again, even if the is no modification in the source files, the build.c file is compiled because of the modification of the build_no.h file.
My question is: is there a way to exclude a file from the dependecy list?
Many thanks
Teckna