]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/calcdep.pl
Use separate build dirs when rebuilding with a different compiler.
[user/henk/code/inspircd.git] / make / calcdep.pl
index 279fdffcec587c9a8b9d20d27f07a680ceee87fe..f96afee33578e667d5ba7158b4b122bfc8b596c7 100755 (executable)
@@ -20,6 +20,7 @@
 
 
 BEGIN {
+       push @INC, $ENV{SOURCEPATH};
        require 5.10.0;
        unless (-f 'configure') {
                print "Error: $0 must be run from the main source directory!\n";
@@ -32,6 +33,8 @@ use warnings FATAL => qw(all);
 
 use File::Basename qw(basename);
 
+use make::common;
+
 use constant {
        BUILDPATH  => $ENV{BUILDPATH},
        SOURCEPATH => $ENV{SOURCEPATH}
@@ -50,7 +53,7 @@ run;
 exit 0;
 
 sub run() {
-       mkdir BUILDPATH;
+       create_directory(BUILDPATH, 0770) or die "Could not create build directory: $!";
        chdir BUILDPATH or die "Could not open build directory: $!";
        unlink 'include';
        symlink "${\SOURCEPATH}/include", 'include';