summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-18 16:09:51 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-18 16:09:51 -0700
commitdee470bf63c25c3d99ea89e9d9f5979ab01d53bb (patch)
tree0b8a3a91c89e0ad6713e62702dfc23bf875ec9b7 /crawl-ref/source/util
parentb3475474824eb75feb901ed9fa3b5826626a185b (diff)
downloadcrawl-ref-dee470bf63c25c3d99ea89e9d9f5979ab01d53bb.tar.gz
crawl-ref-dee470bf63c25c3d99ea89e9d9f5979ab01d53bb.zip
Add compilation information to Version namespace
The Version namespace now provides the compiler which was used, the OS, machine type and processor type the compilation was done on, and the CFLAGS, CFLAGS_L and LDFLAGS which were used. If GCC was the compiler, it also provides the compiler version. This information is included in crash reports, and can be dumped using the new command line option "-version".
Diffstat (limited to 'crawl-ref/source/util')
-rwxr-xr-xcrawl-ref/source/util/gen_ver.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/util/gen_ver.pl b/crawl-ref/source/util/gen_ver.pl
index b6ace87a15..bccb73f5b2 100755
--- a/crawl-ref/source/util/gen_ver.pl
+++ b/crawl-ref/source/util/gen_ver.pl
@@ -106,6 +106,14 @@ if ( $verstring ne $tag || !$pretyp ) {
}
}
+my $OS = `uname -o`;
+my $machine = `uname -m`;
+my $processor = `uname -p`;
+
+chomp($OS);
+chomp($machine);
+chomp($processor);
+
unlink("$outfile.tmp");
my $prefix = "CRAWL";
@@ -128,6 +136,10 @@ print OUT <<__eof__;
#define ${prefix}_RESOURCE_VERSION ${major},${minor},${revis},${build}
#define ${prefix}_RESOURCE_VERSION_STRING "${major}, ${minor}, ${revis}, ${build}"
+#define ${prefix}_BUILD_OS "${OS}"
+#define ${prefix}_BUILD_MACHINE "${machine}"
+#define ${prefix}_BUILD_PROCESSOR "${processor}"
+
#endif
__eof__