chiark / gitweb /
Support building via autoconf and automake. mkfiles.pl now outputs a
[sgt-puzzles.git] / version.c
1 /*
2  * Puzzles version numbering.
3  */
4
5 #define STR1(x) #x
6 #define STR(x) STR1(x)
7
8 #ifdef INCLUDE_EMPTY_H
9 /*
10  * Horrible hack to force version.o to be rebuilt unconditionally in
11  * the automake world: empty.h is an empty header file, created by the
12  * makefile and forcibly updated every time make is run. Including it
13  * here causes automake to track it as a dependency, which will cause
14  * version.o to be rebuilt too.
15  *
16  * The space between # and include causes mkfiles.pl's dependency
17  * scanner (for all other makefile types) to ignore this include,
18  * which is correct because only the automake makefile passes
19  * -DINCLUDE_EMPTY_H to enable it.
20  */
21 # include "empty.h"
22 #endif
23
24 #if defined REVISION
25
26 char ver[] = "Revision: r" STR(REVISION);
27
28 #else
29
30 char ver[] = "Unidentified build, " __DATE__ " " __TIME__;
31
32 #endif