summaryrefslogtreecommitdiff
path: root/default.bld
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-01-04 00:31:46 -0700
committerMike Buland <eichlan@xagasoft.com>2012-01-04 00:31:46 -0700
commit8f3b08c826f1174019386c0bfe22627bb269123d (patch)
tree1c9b0bcb10f32a64b6b268316856762e6c6b6a0d /default.bld
parentd8f0276ec9d3b538a5ef8918a3072e3528a480d5 (diff)
downloadstage-8f3b08c826f1174019386c0bfe22627bb269123d.tar.gz
stage-8f3b08c826f1174019386c0bfe22627bb269123d.tar.bz2
stage-8f3b08c826f1174019386c0bfe22627bb269123d.tar.xz
stage-8f3b08c826f1174019386c0bfe22627bb269123d.zip
Attempt to generate version.h from git.
Diffstat (limited to '')
-rw-r--r--default.bld25
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
2target "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
2CC="g++"; 27CC="g++";
3target "stage" 28target "stage"
4{ 29{