You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@locus.apache.org on 2000/12/04 23:16:48 UTC
cvs commit: apr/helpers cvstodsp5.pl dsp5tocvs.pl
wrowe 00/12/04 14:16:45
Added: helpers cvstodsp5.pl dsp5tocvs.pl
Log:
These should help if users are not building for httpd.
Revision Changes Path
1.1 apr/helpers/cvstodsp5.pl
Index: cvstodsp5.pl
===================================================================
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;
}
}
}
1.1 apr/helpers/dsp5tocvs.pl
Index: dsp5tocvs.pl
===================================================================
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;
}
}
}