Debug instrumentation.
2 # vim: set ts=2 sw=2 tw=99 noet:
9 my ($myself, $path) = fileparse($0);
14 #Go back above build dir
15 chdir(Build::PathFormat('../../..'));
18 our ($root) = getcwd();
22 #Create output folder if it doesn't exist.
26 if (-f 'OUTPUT/sentinel') {
27 my @s = stat('OUTPUT/sentinel');
29 my @files = ('build/pushbuild.txt', 'build/AMBuildScript', 'build/product.version');
31 for ($i = 0; $i <= $#files; $i++) {
32 if (IsNewer($files[$i], $mtime)) {
44 mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
47 print "Attempting to reconfigure...\n";
49 my ($os, $bits, $mode);
54 my ($prefix, $python);
55 if ($^O eq "darwin") {
56 $prefix = 'CC="ccache clang" CXX="ccache clang++" ';
58 } elsif ($^O eq "linux") {
59 $prefix = 'CC="ccache gcc-4.4" CXX="ccache g++-4.4" ';
61 } elsif ($^O =~ /MSWin/) {
63 $python = "C:\\Python31\\Python.exe";
67 $cmdstring = $prefix .
69 Build::PathFormat('../build/configure.py') . ' ';
71 if ($mode eq 'release') {
72 $cmdstring .= '--enable-optimize ';
74 $cmdstring .= '--enable-debug ';
78 $cmdstring .= '--arch=x86 ';
80 $cmdstring .= '--arch-x64 ';
84 print "-> $cmdstring\n";
85 $result = `$cmdstring`;
89 die("Could not configure: $!\n");
91 open(FILE, '>sentinel');
92 print FILE "this is nothing.\n";
98 my ($file, $time) = (@_);
102 return $mtime > $time;