From f02e766924fb7aac0444797a67753ff2c78e5919 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 7 Feb 2015 17:58:16 +0000 Subject: calcdep: Clean up some unused/duplicate variables. --- make/calcdep.pl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'make/calcdep.pl') diff --git a/make/calcdep.pl b/make/calcdep.pl index 66eb4f3dc..b1102cfc1 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -30,7 +30,10 @@ BEGIN { use strict; use warnings FATAL => qw(all); -use POSIX qw(getcwd); +use constant { + BUILDPATH => $ENV{BUILDPATH}, + SOURCEPATH => $ENV{SOURCEPATH} +}; sub find_output; sub gendep($); @@ -45,16 +48,14 @@ run; exit 0; sub run() { - my $build = $ENV{BUILDPATH}; - mkdir $build; - chdir $build or die "Could not open build directory: $!"; + mkdir BUILDPATH; + chdir BUILDPATH or die "Could not open build directory: $!"; unlink 'include'; - symlink "$ENV{SOURCEPATH}/include", 'include'; + symlink "${\SOURCEPATH}/include", 'include'; mkdir $_ for qw/bin modules obj/; - $build = getcwd(); open MAKE, '>real.mk' or die "Could not write real.mk: $!"; - chdir "$ENV{SOURCEPATH}/src"; + chdir "${\SOURCEPATH}/src"; if ($ENV{PURE_STATIC}) { run_static(); @@ -65,7 +66,6 @@ sub run() { } sub run_dynamic() { - my $build = $ENV{BUILDPATH}; print MAKE <, , "threadengines/threadengine_pthread.cpp") { my $out = find_output $file, 1; if ($out =~ m#obj/([^/]+)/[^/]+.o$#) { - mkdir "$ENV{BUILDPATH}/obj/$1"; + mkdir "${\BUILDPATH}/obj/$1"; } dep_cpp $file, $out, 'gen-o'; next if $file =~ m#^socketengines/# && $file ne "socketengines/socketengine_$ENV{SOCKETENGINE}.cpp"; -- cgit v1.2.3