7 my ($myself, $path) = fileparse($0);
12 chdir(Build::PathFormat('../builder'));
15 Build::Command('make clean');
16 Build::Command('make');
20 Build::Command('"' . $ENV{'VC9BUILDER'} . '" /rebuild builder.csproj Release');
21 Build::Command('move ' . Build::PathFormat('bin/Release/builder.exe') . ' .');
24 die "Unable to build builder tool!\n" unless -e 'builder.exe';
26 #Go back to main source dir.
27 chdir(Build::PathFormat('../..'));
30 our ($root) = getcwd();
32 #Create output folder if it doesn't exist.
34 mkdir('OUTPUT') or die("Failed to create output folder: $!\n");
37 #Write the configuration file.
38 open(CONF, '>build.cfg') or die("Failed to write build.cfg: $!\n");
39 print CONF "OutputBase = " . Build::PathFormat($root . '/OUTPUT') . "\n";
40 print CONF "SourceBase = $root\n";
43 print CONF "BuilderPath = /usr/bin/make\n";
47 print CONF "BuilderPath = " . $ENV{'VC9BUILDER'} . "\n";
48 print CONF "PDBLog = $root\\OUTPUT\\pdblog.txt\n";
52 #Do the annoying revision bumping.
53 #Linux needs some help here.
56 Build::Command("flip -u modules.versions");
57 Build::Command("flip -u tools/versionchanger.pl");
58 Build::Command("chmod +x tools/versionchanger.pl");
60 Build::Command(Build::PathFormat('tools/versionchanger.pl') . ' --buildstring="-dev"');
62 #Bootstrap extensions that have complex dependencies
73 sub BuildLibCurl_Win32
75 chdir("extensions\\curl\\curl-src\\lib");
76 Build::Command('"' . $ENV{'VC9BUILDER'} . '" /rebuild build_libcurl.vcproj "LIB Release"');
77 die "Unable to find libcurl.lib!\n" unless (-f "LIB-Release\\libcurl.lib");
78 chdir("..\\..\\..\\..");
81 sub BuildLibCurl_Linux
83 chdir("extensions/curl/curl-src");
84 Build::Command("mkdir -p Release");
85 Build::Command("chmod +x configure");
87 Build::Command("../configure --enable-static --disable-shared --disable-ldap --without-ssl --without-zlib");
88 Build::Command("make");
89 die "Unable to find libcurl.a!\n" unless (-f "lib/.libs/libcurl.a");