From: John E. Malmberg Date: Sun, 21 Aug 2005 00:31:17 +0000 (-0400) Subject: [patch@25305] lib/ExtUtils/t/Constant.t VMS fixes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4b257301ded807340267b6651c49517aa15f5e6c;p=p5sagit%2Fp5-mst-13.2.git [patch@25305] lib/ExtUtils/t/Constant.t VMS fixes From: "John E. Malmberg" Message-ID: <43080395.50807@qsl.net> Date: Sun, 21 Aug 2005 00:31:17 -0400 p4raw-id: //depot/perl@25310 --- diff --git a/lib/ExtUtils/t/Constant.t b/lib/ExtUtils/t/Constant.t index 0ef797a..f440da4 100644 --- a/lib/ExtUtils/t/Constant.t +++ b/lib/ExtUtils/t/Constant.t @@ -45,10 +45,16 @@ my $make = $Config{make}; $make = $ENV{MAKE} if exists $ENV{MAKE}; if ($^O eq 'MSWin32' && $make eq 'nmake') { $make .= " -nologo"; } +# VMS may be using something other than MMS/MMK +my $mms_or_mmk = 0; +if ($^O eq 'VMS') { + $mms_or_mmk = 1 if (($make eq 'MMK') || ($make eq 'MMS')); +} + # Renamed by make clean -my $makefile = ($^O eq 'VMS' ? 'descrip' : 'Makefile'); -my $makefile_ext = ($^O eq 'VMS' ? '.mms' : ''); -my $makefile_rename = $makefile . ($^O eq 'VMS' ? '.mms' : '.old'); +my $makefile = ($mms_or_mmk ? 'descrip' : 'Makefile'); +my $makefile_ext = ($mms_or_mmk ? '.mms' : ''); +my $makefile_rename = $makefile . ($mms_or_mmk ? '.mms_old' : '.old'); my $output = "output"; my $package = "ExtTest"; @@ -250,8 +256,8 @@ sub build_and_run { check_for_bonus_files ('.', @$files, $output, $makefile_rename, '.', '..'); - rename $makefile_rename, $makefile - or die "Can't rename '$makefile_rename' to '$makefile': $!"; + rename $makefile_rename, $makefile . $makefile_ext + or die "Can't rename '$makefile_rename' to '$makefile$makefile_ext': $!"; unlink $output or warn "Can't unlink '$output': $!";