[Box Backup-dev] COMMIT r632 - in box/chris/general: . infrastructure
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 6 Jul 2006 20:49:50 +0000 (GMT)
Author: chris
Date: 2006-07-06 20:49:49 +0000 (Thu, 06 Jul 2006)
New Revision: 632
Modified:
box/chris/general/infrastructure/makebuildenv.pl
box/chris/general/modules.txt
Log:
* modules.txt
* infrastructure/makebuildenv.pl
- Handle multiple implicit dependencies, needed for correct linking order
of lib/win32 and lib/common (which depends on lib/win32) when building
unit tests on Win32
Modified: box/chris/general/infrastructure/makebuildenv.pl
===================================================================
--- box/chris/general/infrastructure/makebuildenv.pl 2006-07-06 20:48:26 UTC (rev 631)
+++ box/chris/general/infrastructure/makebuildenv.pl 2006-07-06 20:49:49 UTC (rev 632)
@@ -14,9 +14,8 @@
print "Box build environment setup.\n\n";
+my @implicit_deps = ('lib/common');
-my $implicit_dep = 'lib/common';
-
# work out platform variables
use lib 'infrastructure';
use BoxPlatform;
@@ -39,10 +38,14 @@
my %env_flags;
my $windows_include_path = "-I../../lib/win32 ";
-if (not $target_windows)
+if ($target_windows)
{
+ push @implicit_deps, "lib/win32";
+}
+else
+{
$windows_include_path = "";
- $env_flags{'IGNORE_lib/win32'} = 1;
+ # $env_flags{'IGNORE_lib/win32'} = 1;
}
# print "Flag: $_\n" for(keys %env_flags);
@@ -270,7 +273,7 @@
push @md,$_ unless ignore_module($_)
}
}
- $module_dependency{$mod} = [$implicit_dep,@md];
+ $module_dependency{$mod} = [@implicit_deps,@md];
$module_library_link_opts{$mod} = [@lo];
# make directories, but not if we're using an external library and this a library module
@@ -285,8 +288,11 @@
}
# make dirs for implicit dep
-mkdir "release/$implicit_dep",0755;
-mkdir "debug/$implicit_dep",0755;
+foreach my $dep (@implicit_deps)
+{
+ mkdir "release/$dep",0755;
+ mkdir "debug/$dep",0755;
+}
# write a list of all the modules we've configured to use
open CONFIGURED_MODS,'>local/modules.h' or die "Can't write configured modules list";
@@ -295,7 +301,7 @@
#ifndef _CONFIGURED_MODULES__H
#define _CONFIGURED_MODULES__H
__E
-for($implicit_dep,@modules)
+for(@implicit_deps,@modules)
{
my $m = $_;
$m =~ s~/~_~;
@@ -309,7 +315,7 @@
# now make a list of all the .h files we can find, recording which module they're in
my %hfiles;
-for my $mod (@modules, $implicit_dep)
+for my $mod (@modules, @implicit_deps)
{
opendir DIR,$mod;
my @items = readdir DIR;
@@ -346,7 +352,7 @@
}
}
-for my $mod (@modules, $implicit_dep)
+for my $mod (@modules, @implicit_deps)
{
opendir DIR,$mod;
for my $h (grep /\.h\Z/i, readdir DIR)
@@ -375,7 +381,7 @@
my %module_resources_win32;
# Then write a makefile for each module
-for my $mod (@modules, $implicit_dep)
+for my $mod (@modules, @implicit_deps)
{
print $mod,"\n";
Modified: box/chris/general/modules.txt
===================================================================
--- box/chris/general/modules.txt 2006-07-06 20:48:26 UTC (rev 631)
+++ box/chris/general/modules.txt 2006-07-06 20:49:49 UTC (rev 632)
@@ -9,16 +9,15 @@
# Generic support code and modules
-lib/raidfile lib/win32
+lib/raidfile
lib/crypto
lib/server
-lib/win32 lib/server
lib/compress
-test/common lib/win32
-test/crypto lib/crypto lib/win32
-test/compress lib/compress lib/win32
-test/raidfile lib/raidfile lib/win32
-test/basicserver lib/server lib/win32
+test/common
+test/crypto lib/crypto
+test/compress lib/compress
+test/raidfile lib/raidfile
+test/basicserver lib/server
# IF_DISTRIBUTION(boxbackup)
@@ -27,17 +26,17 @@
lib/backupclient lib/server lib/crypto lib/compress
lib/backupstore lib/server lib/raidfile lib/backupclient
-bin/bbackupobjdump lib/backupclient lib/backupstore lib/win32
-bin/bbstored lib/raidfile lib/server lib/backupstore lib/backupclient lib/win32
-bin/bbstoreaccounts lib/raidfile lib/backupstore lib/win32
-bin/bbackupd lib/server lib/backupclient lib/win32
-bin/bbackupquery lib/server lib/backupclient lib/win32
-bin/bbackupctl lib/server lib/backupclient lib/win32
+bin/bbackupobjdump lib/backupclient lib/backupstore
+bin/bbstored lib/raidfile lib/server lib/backupstore lib/backupclient
+bin/bbstoreaccounts lib/raidfile lib/backupstore
+bin/bbackupd lib/server lib/backupclient
+bin/bbackupquery lib/server lib/backupclient
+bin/bbackupctl lib/server lib/backupclient
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
test/backupstorepatch bin/bbstored bin/bbstoreaccounts lib/backupstore lib/raidfile
-test/backupdiff lib/backupclient lib/win32
+test/backupdiff lib/backupclient
test/bbackupd bin/bbackupd bin/bbstored bin/bbstoreaccounts bin/bbackupquery bin/bbackupctl lib/server lib/backupstore lib/backupclient
# END_IF_DISTRIBUTION