From ad04fc95438406cb9a125ccf71cf4e2d16a0562c Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Fri, 26 May 2000 04:51:07 +0000 Subject: [PATCH] PR: Obtained from: Submitted by: Reviewed by: Whoops... the two converters were to be non-destructive, and should be allowed to run multiple times in a row without harm. This fixes a snafu that created multiple #PROP lines when invoked repeatedly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85300 13f79535-47bb-0310-9956-ffa450edef68 --- build/dsp5tocvs.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build/dsp5tocvs.pl b/build/dsp5tocvs.pl index 47867e6cb6..ed1f080f80 100644 --- a/build/dsp5tocvs.pl +++ b/build/dsp5tocvs.pl @@ -8,11 +8,14 @@ sub tovc6 { if (m|.dsp$|) { $tname = '.#' . $_; + $verchg = 0; print "Convert VC6 project " . $_ . " to VC5 in " . $File::Find::dir . "\n"; $srcfl = new IO::File $_, "r" || die; $dstfl = new IO::File $tname, "w" || die; while ($src = <$srcfl>) { - $src =~ s|Format Version 5\.00|Format Version 6\.00|; + if ($src =~ s|Format Version 5\.00|Format Version 6\.00|) { + $verchg = -1; + } $src =~ s|^(# ADD CPP .*)/Zi (.*)|$1/ZI $2|; $src =~ s|^(# ADD BASE CPP .*)/Zi (.*)|$1/ZI $2|; if ($src =~ s|^(!MESSAGE .*)\\\n|$1|) { @@ -20,8 +23,9 @@ sub tovc6 { $src = $src . $cont; } print $dstfl $src; - if ($src =~ m|^# Begin Project|) { - print $dstfl "# PROP AllowPerConfigDependencies 0\n"; } + if ($verchg && $src =~ m|^# Begin Project|) { + print $dstfl "# PROP AllowPerConfigDependencies 0\n"; + } } undef $srcfl; undef $dstfl;