Commit Graph

4 Commits

Author SHA1 Message Date
Ghislain MARY
93a5597c11 More fixes for out-of-tree build:
- Generate version header in the build tree
 - Generate .res file in the build tree on Windows
 - Add the $(SRC_PATH) prefix to the .def files on Windows
2015-05-29 14:57:07 +02:00
Martin Storsjö
078d96bef7 Don't overwrite the git-tracked version.h
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.
2015-01-30 10:55:16 +02:00
Martin Storsjö
f90cd367d2 Avoid rebuilds if the version header hasn't changed
When generating the version header, don't overwrite it if the
new version is identical to the old one.
2014-12-16 12:23:50 +02:00
huili2
333cf6aa97 version-generate 2014-07-14 23:39:31 -07:00