summaryrefslogtreecommitdiff
path: root/build/cvtdsp.pl
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2001-06-10 17:58:25 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2001-06-10 17:58:25 +0000
commitd349eaa67a0c75e5ce5f4f1363ea2c3f59bac3a7 (patch)
treee914727e47b68ec4bf44d44fb555910920c53fe4 /build/cvtdsp.pl
parent22f964965b7916717ac2c4f40d3adcdf9f8fced1 (diff)
downloadapr-d349eaa67a0c75e5ce5f4f1363ea2c3f59bac3a7.tar.gz
VC 64-bit compiler complains that /FD is invalid, add a new conversion
option to strip those. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61746 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/cvtdsp.pl')
-rw-r--r--build/cvtdsp.pl33
1 files changed, 33 insertions, 0 deletions
diff --git a/build/cvtdsp.pl b/build/cvtdsp.pl
index 0c0eb61b7..74a3fef61 100644
--- a/build/cvtdsp.pl
+++ b/build/cvtdsp.pl
@@ -13,9 +13,13 @@ elsif ($ARGV[0] == '-w3') {
elsif ($ARGV[0] == '-w4') {
find(\&tow4, '.');
}
+elsif ($ARGV[0] == '-ia64') {
+ find(\&tovc64, '.');
+}
else {
print "Specify -5 or -6 for Visual Studio 5 or 6 (98) .dsp format\n";
print "Specify -w3 or -w4 for .dsp build with warning level 3 or 4 (strict)\n\n";
+ print "Specify -ia64 for build targeted at Itanium (req's psdk tools)\n\n";
die "Missing argument";
}
@@ -157,3 +161,32 @@ sub tow4 {
}
}
+sub tovc64 {
+
+ if (m|.dsp$| || m|.mak$|) {
+ $oname = $_;
+ $tname = '.#' . $_;
+ $verchg = 0;
+ $srcfl = new IO::File $_, "r" || die;
+ $dstfl = new IO::File $tname, "w" || die;
+ while ($src = <$srcfl>) {
+ while ($src =~ m|\\\n$|) {
+ $src = $src . <$srcfl>
+ }
+ if ($src =~ s|(\bCPP.*)/FD (.*)|$1$2|s) {
+ $verchg = -1;
+ }
+ print $dstfl $src;
+ }
+ undef $srcfl;
+ undef $dstfl;
+ if ($verchg) {
+ unlink $oname || die;
+ rename $tname, $oname || die;
+ print "Converted build file " . $oname . " to Win64 in " . $File::Find::dir . "\n";
+ }
+ else {
+ unlink $tname;
+ }
+ }
+}