[Box Backup-dev] COMMIT r573 - in box/chris/general: . infrastructure

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat May 20 19:04:29 BST 2006


Author: chris
Date: 2006-05-20 18:04:15 +0000 (Sat, 20 May 2006)
New Revision: 573

Modified:
   box/chris/general/configure.ac
   box/chris/general/infrastructure/makebuildenv.pl
   box/chris/general/modules.txt
   box/chris/general/parcels.txt
Log:
* configure.ac
* parcels.txt
* modules.txt
* infrastructure/makebuildenv.pl
- Fixes for cross-compiling from Ubuntu Breezy


Modified: box/chris/general/configure.ac
===================================================================
--- box/chris/general/configure.ac	2006-05-20 17:46:07 UTC (rev 572)
+++ box/chris/general/configure.ac	2006-05-20 18:04:15 UTC (rev 573)
@@ -30,10 +30,15 @@
 
 ### Checks for libraries.
 
-if test "$target_os" != "mingw32" -a "$target_os" != "winnt"; then
+case $target_os in
+mingw32*) ;;
+winnt)    ;;
+*)
   AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes],
                  [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])])
-fi
+	;;
+esac
+
 AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])])
 VL_LIB_READLINE([have_libreadline=yes], [have_libreadline=no])
 
@@ -73,9 +78,13 @@
 
 ### Checks for header files.
 
-if test "$target_os" != "mingw32"; then
+case $target_os in
+mingw32*) ;;
+winnt*)   ;;
+*)
   AC_HEADER_DIRENT
-fi
+  ;;
+esac
 
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
@@ -121,14 +130,18 @@
 if test "x$ac_cv_c_bigendian" != "xyes"; then
   AX_BSWAP64
 fi
-if test "$target_os" != "mingw32"; then
+
+case $target_os in
+mingw32*) ;;
+winnt*)   ;;
+*)
   AX_RANDOM_DEVICE
-fi
-AX_CHECK_MOUNT_POINT(,[
-  if test "$target_os" != "mingw32" -a "$target_os" != "winnt"; then
+  AX_CHECK_MOUNT_POINT(,[
     AC_MSG_ERROR([[cannot work out how to discover mount points on your platform]])
-  fi
   ])
+;;
+esac
+
 AX_CHECK_MALLOC_WORKAROUND
 
 
@@ -166,13 +179,19 @@
 AC_CHECK_FUNCS([flock])
 AC_CHECK_DECLS([O_EXLOCK],,, [[#include <fcntl.h>]])
 AC_CHECK_DECLS([F_SETLK],,, [[#include <fcntl.h>]])
+
+case $target_os in
+mingw32*) ;;
+winnt*)   ;;
+*)
 if test "x$ac_cv_func_flock" != "xyes" && \
    test "x$ac_cv_have_decl_O_EXLOCK" != "xyes" && \
-   test "x$ac_cv_have_decl_F_SETLK" != "xyes" && \
-   test "$target_os" != "mingw32" -a "$target_os" != "winnt"
+   test "x$ac_cv_have_decl_F_SETLK" != "xyes"
 then
   AC_MSG_ERROR([[cannot work out how to do file locking on your platform]])
 fi
+;;
+esac
 
 ## Get tmpdir
 temp_directory_name="/tmp"

Modified: box/chris/general/infrastructure/makebuildenv.pl
===================================================================
--- box/chris/general/infrastructure/makebuildenv.pl	2006-05-20 17:46:07 UTC (rev 572)
+++ box/chris/general/infrastructure/makebuildenv.pl	2006-05-20 18:04:15 UTC (rev 573)
@@ -39,7 +39,7 @@
 my %env_flags;
 
 my $windows_include_path = "-I../../lib/win32 ";
-if ($target_os ne "mingw32" && $target_os ne "winnt")
+if ($target_os !~ m'^mingw32' && $target_os ne "winnt")
 {
 	$windows_include_path = "";
 	$env_flags{'IGNORE_lib/win32'} = 1;
@@ -484,7 +484,7 @@
 	my $debug_link_extra = ($target_is_library)?'':'../../debug/lib/debug/debug.a';
 
 	my $release_flags = "-O2";
-	if ($target_os eq "mingw32")
+	if ($target_os =~ m'^mingw32')
 	{
 		$release_flags = "-O0 -g";
 	}
@@ -498,6 +498,7 @@
 CXX = g++
 AR = ar
 RANLIB = ranlib
+WINDRES = windres
 .ifdef RELEASE
 CXXFLAGS = -DNDEBUG $release_flags -Wall $include_paths $extra_platform_defines -DBOX_VERSION="\\"$product_version\\""
 OUTBASE = ../../release
@@ -569,8 +570,9 @@
 	{
 		my $is_cpp = $file =~ m/\A(.+)\.cpp\Z/i;
 		my $is_rc  = $file =~ m/\A(.+)\.rc\Z/i;
+		my $base = $1;
 
-		if ($target_os eq "mingw32")
+		if ($target_os =~ m'^mingw32')
 		{
 			next if not $is_cpp and not $is_rc;
 		}
@@ -582,7 +584,6 @@
 		next if $file =~ /\A\._/; # Temp Mac OS Resource hack
 
 		# store for later
-		my $base = $1;
 		push @obj_base,$base;
 	
 		# get the file...
@@ -619,7 +620,7 @@
 		}
 		elsif ($is_rc)
 		{
-			$make .= "\twindres $file $out_name\n\n";
+			$make .= "\t\$(WINDRES) $file $out_name\n\n";
 			my $res_list = $module_resources_win32{$mod};
 			$res_list ||= [];
 			push @$res_list, $base.'.o';
@@ -682,7 +683,7 @@
 	print MAKE " ",$lib_files unless $target_is_library;
 	print MAKE "\n";
 	
-	if ($target_os eq "mingw32")
+	if ($target_os =~ m'^mingw32')
 	{
 		foreach my $dep (@all_deps_for_module)
 		{

Modified: box/chris/general/modules.txt
===================================================================
--- box/chris/general/modules.txt	2006-05-20 17:46:07 UTC (rev 572)
+++ box/chris/general/modules.txt	2006-05-20 18:04:15 UTC (rev 573)
@@ -10,6 +10,7 @@
 # Generic support code and modules
 
 OMIT:mingw32
+OMIT:mingw32msvc
 OMIT:CYGWIN
 lib/raidfile
 END-OMIT
@@ -23,6 +24,7 @@
 test/compress		lib/compress	lib/win32
 
 OMIT:mingw32
+OMIT:mingw32msvc
 test/basicserver	lib/server	lib/win32
 OMIT:CYGWIN
 test/raidfile		lib/raidfile
@@ -35,6 +37,7 @@
 lib/backupclient	lib/server	lib/crypto	lib/compress
 
 OMIT:mingw32
+OMIT:mingw32msvc
 OMIT:CYGWIN
 lib/backupstore		lib/server	lib/raidfile	lib/backupclient
 bin/bbstored		lib/raidfile	lib/server	lib/backupstore	lib/backupclient	lib/win32
@@ -47,6 +50,7 @@
 bin/bbackupctl		lib/server	lib/backupclient	lib/win32
 
 OMIT:mingw32
+OMIT:mingw32msvc
 OMIT:CYGWIN
 test/backupstore	bin/bbstored	bin/bbstoreaccounts lib/server lib/backupstore lib/backupclient lib/raidfile
 test/backupstorefix	bin/bbstored	bin/bbstoreaccounts	lib/backupstore	lib/raidfile	bin/bbackupquery	bin/bbackupd

Modified: box/chris/general/parcels.txt
===================================================================
--- box/chris/general/parcels.txt	2006-05-20 17:46:07 UTC (rev 572)
+++ box/chris/general/parcels.txt	2006-05-20 18:04:15 UTC (rev 573)
@@ -9,16 +9,20 @@
 	bin bbackupctl
 	script bin/bbackupd/bbackupd-config
 
-ONLY:mingw32
+ONLY:mingw32,mingw32msvc
 	script bin/bbackupd/win32/installer.iss 
 	script bin/bbackupd/win32/ReadMe.txt 
 	script bin/bbackupd/win32/bbackupd.conf
+END-ONLY
+
+ONLY:mingw32
 	script /bin/mgwz.dll
 	script /bin/mingwm10.dll
 	optional script /bin/pcreposix.dll
 END-ONLY
 
 OMIT:mingw32
+OMIT:mingw32msvc
 OMIT:CYGWIN
 
 backup-server




More information about the Boxbackup-dev mailing list