diff options
Diffstat (limited to 'default.bld')
-rw-r--r-- | default.bld | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/default.bld b/default.bld index 0c7f50c..5c3d9b1 100644 --- a/default.bld +++ b/default.bld | |||
@@ -1,4 +1,29 @@ | |||
1 | 1 | ||
2 | target "src/version.h" | ||
3 | { | ||
4 | requires ".git"; | ||
5 | profile "build" | ||
6 | { | ||
7 | fh = open("src/version.h.tmp"); | ||
8 | fh.write( | ||
9 | "#ifndef VERSION_H\n" | ||
10 | "#define VERSION_H\n" | ||
11 | "\n" | ||
12 | "#define FULLVER \"$(git describe)\"\n" | ||
13 | "\n" | ||
14 | "#endif"); | ||
15 | fh.close(); | ||
16 | if "$(cmp src/version.h.tmp src/version.h)" == "" then | ||
17 | { | ||
18 | execute("rm src/version.h.tmp"); | ||
19 | } | ||
20 | else | ||
21 | { | ||
22 | execute("mv src/version.h.tmp src/version.h"); | ||
23 | } | ||
24 | } | ||
25 | } | ||
26 | |||
2 | CC="g++"; | 27 | CC="g++"; |
3 | target "stage" | 28 | target "stage" |
4 | { | 29 | { |