diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2001-04-07 01:03:15 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2001-04-07 01:03:15 +0000 |
commit | b3ef67687f3f9c9941b1e9d0c696a1133d3b370f (patch) | |
tree | d5ab3499fd9a06bc82947667d5549baf27217668 /build | |
parent | 84693abc44263ed58e5b42b76e2ba3f5f8c227c8 (diff) | |
download | libapr-b3ef67687f3f9c9941b1e9d0c696a1133d3b370f.tar.gz |
execute from the source tree root (e.g. httpd-2.0 or apr itself) with
the syntax perl cvsdsp5 -[5|6] to convert to devstudio 5 or 6 dsp format
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61469 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r-- | build/cvstodsp5.pl | 43 | ||||
-rw-r--r-- | build/cvtdsp.pl | 94 | ||||
-rw-r--r-- | build/dsp5tocvs.pl | 46 |
3 files changed, 94 insertions, 89 deletions
diff --git a/build/cvstodsp5.pl b/build/cvstodsp5.pl deleted file mode 100644 index d37442735..000000000 --- a/build/cvstodsp5.pl +++ /dev/null @@ -1,43 +0,0 @@ -use IO::File; -use File::Find; - -chdir '..'; -find(\&tovc5, '.'); - -sub tovc5 { - - if (m|.dsp$|) { - $oname = $_; - $tname = '.#' . $_; - $verchg = 0; - $srcfl = new IO::File $oname, "r" || die; - $dstfl = new IO::File $tname, "w" || die; - while ($src = <$srcfl>) { - if ($src =~ s|Format Version 6\.00|Format Version 5\.00|) { - $verchg = -1; - } - if ($src =~ s|^(# ADD CPP .*)/ZI (.*)|$1/Zi $2|) { - $verchg = -1; - } - if ($src =~ s|^(# ADD BASE CPP .*)/ZI (.*)|$1/Zi $2|) { - $verchg = -1; - } - if ($src !~ m|^# PROP AllowPerConfigDependencies|) { - print $dstfl $src; } - else { - $verchg = -1; - - } - } - undef $srcfl; - undef $dstfl; - if ($verchg) { - unlink $oname || die; - rename $tname, $oname || die; - print "Converted VC6 project " . $oname . " to VC5 in " . $File::Find::dir . "\n"; - } - else { - unlink $tname; - } - } -}
\ No newline at end of file diff --git a/build/cvtdsp.pl b/build/cvtdsp.pl new file mode 100644 index 000000000..45bbb6fb1 --- /dev/null +++ b/build/cvtdsp.pl @@ -0,0 +1,94 @@ +use IO::File; +use File::Find; + +if ($ARGV[0] == '-6') { + find(\&tovc6, '.'); +} +else { + if ($ARGV[0] == '-5') { + find(\&tovc5, '.'); + } + else { + print "Specify -5 or -6 for Visual Studio 5 or 6 (98) .dsp format\n\n"; + die "Missing argument"; + } +} + +sub tovc5 { + + if (m|.dsp$|) { + $oname = $_; + $tname = '.#' . $_; + $verchg = 0; + $srcfl = new IO::File $oname, "r" || die; + $dstfl = new IO::File $tname, "w" || die; + while ($src = <$srcfl>) { + if ($src =~ s|Format Version 6\.00|Format Version 5\.00|) { + $verchg = -1; + } + if ($src =~ s|^(# ADD CPP .*)/ZI (.*)|$1/Zi $2|) { + $verchg = -1; + } + if ($src =~ s|^(# ADD BASE CPP .*)/ZI (.*)|$1/Zi $2|) { + $verchg = -1; + } + if ($src !~ m|^# PROP AllowPerConfigDependencies|) { + print $dstfl $src; } + else { + $verchg = -1; + + } + } + undef $srcfl; + undef $dstfl; + if ($verchg) { + unlink $oname || die; + rename $tname, $oname || die; + print "Converted VC6 project " . $oname . " to VC5 in " . $File::Find::dir . "\n"; + } + else { + unlink $tname; + } + } +} + +sub tovc6 { + + if (m|.dsp$|) { + $oname = $_; + $tname = '.#' . $_; + $verchg = 0; + $srcfl = new IO::File $_, "r" || die; + $dstfl = new IO::File $tname, "w" || die; + while ($src = <$srcfl>) { + if ($src =~ s|Format Version 5\.00|Format Version 6\.00|) { + $verchg = -1; + } + if ($src =~ s|^(# ADD CPP .*)/Zi (.*)|$1/ZI $2|) { + $verchg = -1; + } + if ($src =~ s|^(# ADD BASE CPP .*)/Zi (.*)|$1/ZI $2|) { + $verchg = -1; + } + if ($src =~ s|^(!MESSAGE .*)\\\n|$1|) { + $cont = <$srcfl>; + $src = $src . $cont; + $verchg = -1; + } + print $dstfl $src; + if ($verchg && $src =~ m|^# Begin Project|) { + print $dstfl "# PROP AllowPerConfigDependencies 0\n"; + } + } + undef $srcfl; + undef $dstfl; + if ($verchg) { + unlink $oname || die; + rename $tname, $oname || die; + print "Converted VC5 project " . $oname . " to VC6 in " . $File::Find::dir . "\n"; + } + else { + unlink $tname; + } + } +} diff --git a/build/dsp5tocvs.pl b/build/dsp5tocvs.pl deleted file mode 100644 index 9686b4363..000000000 --- a/build/dsp5tocvs.pl +++ /dev/null @@ -1,46 +0,0 @@ -use IO::File; -use File::Find; - -chdir '..'; -find(\&tovc6, '.'); - -sub tovc6 { - - if (m|.dsp$|) { - $oname = $_; - $tname = '.#' . $_; - $verchg = 0; - $srcfl = new IO::File $_, "r" || die; - $dstfl = new IO::File $tname, "w" || die; - while ($src = <$srcfl>) { - if ($src =~ s|Format Version 5\.00|Format Version 6\.00|) { - $verchg = -1; - } - if ($src =~ s|^(# ADD CPP .*)/Zi (.*)|$1/ZI $2|) { - $verchg = -1; - } - if ($src =~ s|^(# ADD BASE CPP .*)/Zi (.*)|$1/ZI $2|) { - $verchg = -1; - } - if ($src =~ s|^(!MESSAGE .*)\\\n|$1|) { - $cont = <$srcfl>; - $src = $src . $cont; - $verchg = -1; - } - print $dstfl $src; - if ($verchg && $src =~ m|^# Begin Project|) { - print $dstfl "# PROP AllowPerConfigDependencies 0\n"; - } - } - undef $srcfl; - undef $dstfl; - if ($verchg) { - unlink $oname || die; - rename $tname, $oname || die; - print "Converted VC5 project " . $oname . " to VC6 in " . $File::Find::dir . "\n"; - } - else { - unlink $tname; - } - } -} |