X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fcalcdep.pl;h=5ef736f4668e908445a56595524813608ab5d8ff;hb=e94b673532f7833aaa4789f834e61d68e0b4fc56;hp=59b61e65ab1122dfea6653ab8c99fd849c3b1766;hpb=a0176191c9e2a32d898857f2a7e6a4016f894f2f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/calcdep.pl b/make/calcdep.pl index 59b61e65a..5ef736f46 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -3,7 +3,7 @@ # InspIRCd -- Internet Relay Chat Daemon # # Copyright (C) 2014-2015 Attila Molnar -# Copyright (C) 2013, 2015-2019 Sadie Powell +# Copyright (C) 2013, 2015-2019, 2021 Sadie Powell # Copyright (C) 2012 Robby # Copyright (C) 2009-2010 Daniel De Graaf # @@ -21,20 +21,13 @@ # -BEGIN { - push @INC, $ENV{SOURCEPATH}; - 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 { @@ -97,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 =~ /^\./;