how to force a .c file to compile every time?

I am trying to create the equivalent of a build number for our project. I specified a script to be called using the “pre-build steps” field in the project properties. This is working…my build number in a .c is successfully incremented before every build.

It appears, however, that the make utility creates a list of what files need to be recompiled before calling the pre-build script to increment the build number. So, my .c file with the version is not compiled.

How can I force the .c file to be compiled on EVERY build?


On which IDE it is …

Good question…I am using “Digi ESP for NET+OS” with NET+OS version 7.5.2.