From da11f91333c4e5d2887df76affbf5dda40e795e4 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Sat, 10 May 2008 16:07:56 +0000 Subject: [PATCH] Backpatch fixes for contrib makefiles. --- src/tools/msvc/Mkvcbuild.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index bff1ef900d..ae2c4805ed 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -398,8 +398,10 @@ sub AddContrib $mf =~ s{\\\s*[\r\n]+}{}mg; my $proj = $solution->AddProject($dn, 'dll', 'contrib'); $mf =~ /^OBJS\s*=\s*(.*)$/gm || croak "Could not find objects in MODULE_big for $n\n"; - foreach my $o (split /\s+/, $1) + my $objs = $1; + while ($objs =~ /\b([\w-]+\.o)\b/g) { + my $o = $1; $o =~ s/\.o$/.c/; $proj->AddFile('contrib\\' . $n . '\\' . $o); } @@ -412,8 +414,10 @@ sub AddContrib $mf2 =~ s{\\\s*[\r\n]+}{}mg; $mf2 =~ /^SUBOBJS\s*=\s*(.*)$/gm || croak "Could not find objects in MODULE_big for $n, subdir $d\n"; - foreach my $o (split /\s+/, $1) - { + $objs = $1; + while ($objs =~ /\b([\w-]+\.o)\b/g) + { + my $o = $1; $o =~ s/\.o$/.c/; $proj->AddFile('contrib\\' . $n . '\\' . $d . '\\' . $o); } @@ -435,8 +439,10 @@ sub AddContrib { my $proj = $solution->AddProject($1, 'exe', 'contrib'); $mf =~ /^OBJS\s*=\s*(.*)$/gm || croak "Could not find objects in MODULE_big for $n\n"; - foreach my $o (split /\s+/, $1) + my $objs = $1; + while ($objs =~ /\b([\w-]+\.o)\b/g) { + my $o = $1; $o =~ s/\.o$/.c/; $proj->AddFile('contrib\\' . $n . '\\' . $o); } -- 2.39.5