summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorpepper <peppersclothescult@gmail.com>2015-02-07 19:08:27 -0800
committerpepper <peppersclothescult@gmail.com>2015-02-07 19:08:27 -0800
commitbfb44c051b0ab57ff497f115bd9ab901e8299ced (patch)
tree3e476b0d3c7377dafa88756bdcc7b5da7f298c3c /Build
first
Diffstat (limited to 'Build')
-rwxr-xr-xBuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/Build b/Build
new file mode 100755
index 0000000..3bf3117
--- /dev/null
+++ b/Build
@@ -0,0 +1,58 @@
+#! /usr/bin/perl
+
+use strict;
+use Cwd;
+use File::Basename;
+use File::Spec;
+
+sub magic_number_matches {
+ return 0 unless -e '_build/magicnum';
+ my $FH;
+ open $FH, '<','_build/magicnum' or return 0;
+ my $filenum = <$FH>;
+ close $FH;
+ return $filenum == 145900;
+}
+
+my $progname;
+my $orig_dir;
+BEGIN {
+ $^W = 1; # Use warnings
+ $progname = basename($0);
+ $orig_dir = Cwd::cwd();
+ my $base_dir = '/home/pepper/new';
+ if (!magic_number_matches()) {
+ unless (chdir($base_dir)) {
+ die ("Couldn't chdir($base_dir), aborting\n");
+ }
+ unless (magic_number_matches()) {
+ die ("Configuration seems to be out of date, please re-run 'perl Build.PL' again.\n");
+ }
+ }
+ unshift @INC,
+ (
+
+ );
+}
+
+close(*DATA) unless eof(*DATA); # ensure no open handles to this script
+
+use Module::Build;
+Module::Build->VERSION(q{0});
+
+# Some platforms have problems setting $^X in shebang contexts, fix it up here
+$^X = Module::Build->find_perl_interpreter;
+
+if (-e 'Build.PL' and not Module::Build->up_to_date('Build.PL', $progname)) {
+ warn "Warning: Build.PL has been altered. You may need to run 'perl Build.PL' again.\n";
+}
+
+# This should have just enough arguments to be able to bootstrap the rest.
+my $build = Module::Build->resume (
+ properties => {
+ config_dir => '_build',
+ orig_dir => $orig_dir,
+ },
+);
+
+$build->dispatch;