we use QNX Momentics 6.3.0 SP2 on Windows host. Our project consists of several source files. One is called version.c and contains a global variable initialized by the compiler’s DATE and TIME directives. I want this particular source file to be compiled in every build so that I have an accurate timestamp in my program. How can I do this? I was playing around with the PRE_BUILD and PRE_TARGET macros as explained in the section “Conventions about Makefiles” in the programmer’s guide in order to have make execute a “touch version.c” but got nowhere.
Also, I added “-Wversion.c” to the MAKEFLAGS environment variable, that didn’t help either.
Any ideas greatly appreciated.