X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fcalcdep.pl;h=5ef736f4668e908445a56595524813608ab5d8ff;hb=0a329440bd1d0fa642ce2f3e14bc88125377b5bd;hp=5490639ab41859dca4ec8c4ac339e874dcbc8e4a;hpb=aa692dc1039b63deef7886e914ec499abe7facaf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/calcdep.pl b/make/calcdep.pl index 5490639ab..5ef736f46 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -1,10 +1,9 @@ #!/usr/bin/env perl - # # 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 # @@ -22,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 { @@ -98,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 =~ /^\./;