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 $result = `CC=gcc-4.1 CXX=gcc-4.1 python3.1 ../build/configure.py --enable-optimize`;
50 } elsif ($^O eq "darwin") {
51 $result = `CC=clang CXX=clang python3 ../build/configure.py --enable-optimize`;
53 $result = `C:\\Python31\\Python.exe ..\\build\\configure.py --enable-optimize`;
57 die('Could not configure!');
59 open(FILE, '>sentinel');
60 print FILE "this is nothing.\n";
66 my ($file, $time) = (@_);
70 return $mtime > $time;