summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-12-04 22:16:44 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-12-04 22:16:44 +0000
commitf3ebfe69b87e3e68e42509a4d5cd17cad481d0cf (patch)
tree21f4d6bad281207b2787b7e0357178652cd608f4 /helpers
parent56b6d44c18c5ce68b3d2fa8871b1914664e7dd50 (diff)
downloadlibapr-f3ebfe69b87e3e68e42509a4d5cd17cad481d0cf.tar.gz
These should help if users are not building for httpd.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60885 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'helpers')
-rw-r--r--helpers/cvstodsp5.pl43
-rw-r--r--helpers/dsp5tocvs.pl46
2 files changed, 89 insertions, 0 deletions
diff --git a/helpers/cvstodsp5.pl b/helpers/cvstodsp5.pl
new file mode 100644
index 000000000..d37442735
--- /dev/null
+++ b/helpers/cvstodsp5.pl
@@ -0,0 +1,43 @@
+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/helpers/dsp5tocvs.pl b/helpers/dsp5tocvs.pl
new file mode 100644
index 000000000..9686b4363
--- /dev/null
+++ b/helpers/dsp5tocvs.pl
@@ -0,0 +1,46 @@
+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;
+ }
+ }
+}