078d96bef7
When generating a new version of the header, that includes the actual git hash, don't overwrite the file that is tracked by git. Instead create a new file, and include this only if the build system indicates that it exists (by setting a define). This allows the untouched source tree to be built from within an IDE even if make has not been run. This reduces the hassle with a file that needs to be ignored in the git configuration. The downside is that the generated file isn't used if building from within an IDE, if the header has been updated by calling make before (since the IDE configuration doesn't know whether the user actually has run make). Since users of the IDE might not build via make in the command line at all (in the same source checkout at least), this should not be an issue in practice. The previous way things worked, the version hash (generated by make) when used in an IDE could actually be outdated and misleading.
2 lines
14 B
Plaintext
2 lines
14 B
Plaintext
version_gen.h
|