Is it possible to have the version number of a compile auto increment and be a part of the code to be retrieved at run time? Thanks
Im not sure if I follow how the #define BUILD_NUMBER would change for each build. Use the compiler command line option to define the value of BUILD_NUMBER. Instead of
file.c: // edit xxx to build number for each release #define BUILD_NUMBER xxx ... printf ("Build: %u\n", BUILD_NUMBER); Make: build_number_patch file.c 123 c51 file.c
file.c: // no #define in this file printf ("Build: %u\n", BUILD_NUMBER); Make: c51 DEFINE (BUILD_NUMBER=$BUILD) file.c