]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/calcdep.pl
Update copyright headers.
[user/henk/code/inspircd.git] / make / calcdep.pl
index 5dc0f687821094c8b8e5cadbcb6d67b93ea22fa3..59b61e65ab1122dfea6653ab8c99fd849c3b1766 100755 (executable)
@@ -1,8 +1,10 @@
 #!/usr/bin/env perl
-
 #
 # InspIRCd -- Internet Relay Chat Daemon
 #
+#   Copyright (C) 2014-2015 Attila Molnar <attilamolnar@hush.com>
+#   Copyright (C) 2013, 2015-2019 Sadie Powell <sadie@witchery.services>
+#   Copyright (C) 2012 Robby <robby@chatbelgie.be>
 #   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
 #
 # This file is part of InspIRCd.  InspIRCd is free software: you can
@@ -20,6 +22,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 +35,8 @@ use warnings FATAL => qw(all);
 
 use File::Basename qw(basename);
 
+use make::common;
+
 use constant {
        BUILDPATH  => $ENV{BUILDPATH},
        SOURCEPATH => $ENV{SOURCEPATH}
@@ -50,7 +55,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';
@@ -112,7 +117,7 @@ END
                        }
                }
        }
-       
+
        my $core_mk = join ' ', @core_deps;
        my $mods = join ' ', @modlist;
        print MAKE <<END;