X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=util%2Ffiles.pl;h=d984196616053efd2d73e23f4b07ac049ea41f66;hp=d5c78bafc1bfecc696c3cc594fc45937ef51b083;hb=9ba96fbb2523cb12747c559c704c58bd8f9e7982;hpb=c15e95a61dacfc326cf9cdf05935ae8c6c97bcf6 diff --git a/util/files.pl b/util/files.pl index d5c78bafc1..d984196616 100755 --- a/util/files.pl +++ b/util/files.pl @@ -13,7 +13,7 @@ while ($ARGV[0] =~ /^([^\s=]+)\s*=\s*(.*)$/) $s=""; while (<>) { - chop; + s|\R$||; s/#.*//; if (/^([^\s=]+)\s*=\s*(.*)$/) { @@ -23,10 +23,10 @@ while (<>) { if ($b =~ /\\$/) { - chop($b); + $b=$`; # Keep what is before the backslash $o.=$b." "; $b=<>; - chop($b); + $b =~ s|\R$||; # Better chomp } else { @@ -43,7 +43,7 @@ while (<>) } } -$pwd=`pwd`; chop($pwd); +$pwd=`pwd`; $pwd =~ s|\R$||; if ($sym{'TOP'} eq ".") { @@ -55,7 +55,7 @@ else { @_=split(/\//,$pwd); $z=$#_-$n+1; foreach $i ($z .. $#_) { $dir.=$_[$i]."/"; } - chop($dir); + chop($dir); # Remove the last slash } print "RELATIVE_DIRECTORY=$dir\n";