From 00a8e500a57db90d37fc06c20a1b0b09eef43d83 Mon Sep 17 00:00:00 2001 From: "jag%tty.nl" Date: Fri, 8 Feb 2008 08:50:22 +0000 Subject: [PATCH] Bug 415422: Fix gqi dep build (crash on startup). r=ted, a=damons git-svn-id: svn://10.0.0.236/trunk@245199 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/build/unix/mddepend.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mozilla/build/unix/mddepend.pl b/mozilla/build/unix/mddepend.pl index db57a075101..900c376ce3f 100755 --- a/mozilla/build/unix/mddepend.pl +++ b/mozilla/build/unix/mddepend.pl @@ -54,11 +54,9 @@ my $silent = $ENV{MAKEFLAGS} =~ /^\w*s|\s-s/; %alldeps={}; # Parse dependency files while ($line = <>) { - chomp $line; - # Remove extra ^M caused by using dos-mode line-endings - chop $line if (substr($line, -1, 1) eq "\r"); + $line =~ s/\r?\n$//; # Handle both unix and DOS line endings ($obj,$rest) = split /\s*:\s+/, $line, 2; - next if $obj eq ''; + next if $obj eq '' || $rest eq ''; if ($line =~ /\\$/) { chop $rest; @@ -70,7 +68,7 @@ while ($line = <>) { print "add $obj $rest\n" if $debug; while ($hasSlash and $line = <>) { - chomp $line; + $line =~ s/\r?\n$//; # Handle both unix and DOS line endings if ($line =~ /\\$/) { chop $line; } else {