Don't use getcwd in non-copy builds.
authorDr. Stephen Henson <steve@openssl.org>
Sat, 15 Feb 2014 19:48:05 +0000 (19:48 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 15 Feb 2014 20:17:59 +0000 (20:17 +0000)
(cherry picked from commit f3a39032601fab2c704f03338e378592d3b4e262)

util/mk1mf.pl

index 72ae0fd..cbf845a 100755 (executable)
@@ -169,7 +169,7 @@ $mkdir="-mkdir" unless defined $mkdir;
 $ranlib="echo ranlib";
 
 $cc=(defined($VARS{'CC'}))?$VARS{'CC'}:'cc';
-$src_dir=(defined($VARS{'SRC'}))?$VARS{'SRC'}:getcwd();
+$src_dir=(defined($VARS{'SRC'}))?$VARS{'SRC'}: $platform eq 'copy' ? getcwd() : '.';
 $bin_dir=(defined($VARS{'BIN'}))?$VARS{'BIN'}:'';
 
 # $bin_dir.=$o causes a core dump on my sparc :-(