X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fcalcdep.pl;h=5ef736f4668e908445a56595524813608ab5d8ff;hb=e94b673532f7833aaa4789f834e61d68e0b4fc56;hp=279fdffcec587c9a8b9d20d27f07a680ceee87fe;hpb=961109ae4fde97144fdedeef25607a5b8b3ec2c2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/calcdep.pl b/make/calcdep.pl index 279fdffce..5ef736f46 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -1,8 +1,10 @@ #!/usr/bin/env perl - # # InspIRCd -- Internet Relay Chat Daemon # +# Copyright (C) 2014-2015 Attila Molnar +# Copyright (C) 2013, 2015-2019, 2021 Sadie Powell +# Copyright (C) 2012 Robby # Copyright (C) 2009-2010 Daniel De Graaf # # This file is part of InspIRCd. InspIRCd is free software: you can @@ -19,18 +21,14 @@ # -BEGIN { - require 5.10.0; - unless (-f 'configure') { - print "Error: $0 must be run from the main source directory!\n"; - exit 1; - } -} - use strict; use warnings FATAL => qw(all); -use File::Basename qw(basename); +use File::Basename qw(basename dirname); +use FindBin qw($RealDir); + +use lib dirname $RealDir; +use make::common; use constant { BUILDPATH => $ENV{BUILDPATH}, @@ -50,7 +48,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'; @@ -92,7 +90,7 @@ END push @core_deps, $out; } - foreach my $directory (qw(coremods modules)) { + for my $directory (qw(coremods modules)) { opendir(my $moddir, $directory); for my $file (sort readdir $moddir) { next if $file =~ /^\./;