X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=util%2Ffiles.pl;h=32e712586d72bfac676f454f53ff92afa8b40ec4;hp=d5c78bafc1bfecc696c3cc594fc45937ef51b083;hb=aacfb134be2a88211b79dc53bb5bd0e422dbb60d;hpb=8308411297a1ac68105a90967b8b851096e31a46 diff --git a/util/files.pl b/util/files.pl index d5c78bafc1..32e712586d 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 = "" unless defined($b = <>); + $b =~ s{\R$}{}; } else { @@ -43,7 +43,7 @@ while (<>) } } -$pwd=`pwd`; chop($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";