$s="";
while (<>)
{
- chop;
+ s|\R$||;
s/#.*//;
if (/^([^\s=]+)\s*=\s*(.*)$/)
{
{
if ($b =~ /\\$/)
{
- chop($b);
+ $b=$`; # Keep what is before the backslash
$o.=$b." ";
- $b=<>;
- chop($b);
+ $b = "" unless defined($b = <>);
+ $b =~ s{\R$}{};
}
else
{
}
}
-$pwd=`pwd`; chop($pwd);
+($pwd=`pwd`) =~ s{\R$}{};
if ($sym{'TOP'} eq ".")
{
@_=split(/\//,$pwd);
$z=$#_-$n+1;
foreach $i ($z .. $#_) { $dir.=$_[$i]."/"; }
- chop($dir);
+ chop($dir); # Remove the last slash
}
print "RELATIVE_DIRECTORY=$dir\n";