]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
PR:
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 26 May 2000 04:51:07 +0000 (04:51 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 26 May 2000 04:51:07 +0000 (04:51 +0000)
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

index 47867e6cb60606891150d3b1803e413dbfb8e116..ed1f080f8039d739635a73a995e94395bf488988 100644 (file)
@@ -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;