Add preinc-ref test.
2 # vim: set ts=2 sw=2 tw=99 et:
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',
30 'build/AMBuildScript',
31 'build/product.version',
32 'build/tools/bootstrap.pl');
34 for ($i = 0; $i <= $#files; $i++) {
35 if (IsNewer($files[$i], $mtime)) {
47 mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
50 print "Attempting to reconfigure...\n";
52 my ($os, $bits, $mode);
57 my ($prefix, $python);
58 if ($^O eq "darwin") {
59 $prefix = 'CC=clang CXX=clang++ ';
61 } elsif ($^O eq "linux") {
62 $prefix = 'CC="ccache gcc" CXX="ccache g++" ';
64 } elsif ($^O =~ /MSWin/) {
66 $python = "C:\\Python31\\Python.exe";
70 $cmdstring = $prefix .
72 Build::PathFormat('../build/configure.py') . ' ';
74 if ($mode eq 'release') {
75 $cmdstring .= '--enable-optimize ';
77 $cmdstring .= '--enable-debug ';
81 $cmdstring .= '--arch=x86 ';
83 $cmdstring .= '--arch=x64 ';
87 print "-> $cmdstring\n";
88 $result = `$cmdstring`;
92 die("Could not configure: $!\n");
94 open(FILE, '>sentinel');
95 print FILE "this is nothing.\n";
101 my ($file, $time) = (@_);
105 return $mtime > $time;