[Box Backup-dev] COMMIT r629 - box/chris/general/infrastructure
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 6 Jul 2006 20:46:41 +0000 (GMT)
Author: chris
Date: 2006-07-06 20:46:40 +0000 (Thu, 06 Jul 2006)
New Revision: 629
Modified:
box/chris/general/infrastructure/BoxPlatform.pm.in
Log:
* BoxPlatform.pm.in
- Avoid errors trying to run "uname" which doesn't exist when building
with Visual Studio on Windows
Modified: box/chris/general/infrastructure/BoxPlatform.pm.in
===================================================================
--- box/chris/general/infrastructure/BoxPlatform.pm.in 2006-07-06 20:34:07 UTC (rev 628)
+++ box/chris/general/infrastructure/BoxPlatform.pm.in 2006-07-06 20:46:40 UTC (rev 629)
@@ -7,10 +7,24 @@
{
# which OS are we building under?
- $build_os = `uname`;
- chomp $build_os;
- $build_cpu = `uname -p`;
- chomp $build_cpu;
+ $target_os = '@target_os@';
+ $target_windows = 0;
+ $target_windows = 1 if $target_os =~ m'^mingw32'
+ or $target_os eq "winnt";
+
+ if ($^O eq "MSWin32" and not -x "/usr/bin/uname")
+ {
+ $build_os = "winnt";
+ $build_cpu = "ix86";
+ }
+ else
+ {
+ $build_os = `uname`;
+ chomp $build_os;
+ $build_cpu = `uname -p`;
+ chomp $build_cpu;
+ }
+
# Cygwin Builds usually something like CYGWIN_NT-5.0, CYGWIN_NT-5.1
# Box Backup tried on Win2000,XP only :)
@@ -24,13 +38,8 @@
$platform_compile_line_extra =~ s/ -O2//;
$platform_link_line_extra = '@LDFLAGS@';
$platform_lib_files = '@LIBS@';
- $target_os = '@target_os@';
$platform_exe_ext = '@EXEEXT@';
- $target_windows = 0;
- $target_windows = 1 if $target_os =~ m'^mingw32'
- or $target_os eq "winnt";
-
# get version
if (! -r "VERSION.txt" and -r "../../VERSION.txt")
{