diff options
author | Reinhard Tartler <siretart@tauware.de> | 2009-04-02 13:58:11 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2009-04-02 13:58:11 +0200 |
commit | a84d45498bd861c9225080232948a99c2e317bb8 (patch) | |
tree | 8f1f5fb7bf7ffbf6f24cf4a4fd6888a235dbcc08 /infrastructure | |
parent | 25db897553a0db0f912602b375029e724f51556e (diff) |
Import upstream version 0.11~rc3~r2491
Diffstat (limited to 'infrastructure')
24 files changed, 490 insertions, 204 deletions
diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in index d2510627..8657134e 100644 --- a/infrastructure/BoxPlatform.pm.in +++ b/infrastructure/BoxPlatform.pm.in @@ -5,7 +5,6 @@ use Exporter; BEGIN { - # which OS are we building under? $target_os = '@target_os@'; $target_windows = 0; @@ -32,27 +31,23 @@ BEGIN $build_os ne "SunOS" && $build_os ne 'GNU/kFreeBSD'); # blank extra flags by default - $platform_compile_line_extra = '@CPPFLAGS@ @CXXFLAGS@ @CXXFLAGS_STRICT@'; - $platform_compile_line_extra =~ s/ -O2//; - $platform_link_line_extra = '@LDFLAGS@'; + $platform_compile_line_extra = ''; + $platform_link_line_extra = ''; $platform_lib_files = '@LIBS@'; $platform_exe_ext = '@EXEEXT@'; # get version - if (! -r "VERSION.txt" and -r "../../VERSION.txt") - { - open VERSION,"../../VERSION.txt" or die "../../VERSION.txt: $!"; - } - else - { - open VERSION,"VERSION.txt" or die "VERSION.txt: $!"; - } + my $version_file = "VERSION.txt"; + if (not -r $version_file) { $version_file = "../../$version_file" } + die "missing version file: $version_file" unless $version_file; + open VERSION, $version_file or die "$version_file: $!"; $product_version = <VERSION>; chomp $product_version; $product_name = <VERSION>; chomp $product_name; close VERSION; + if($product_version =~ /USE_SVN_VERSION/) { # for developers, use SVN version @@ -69,14 +64,23 @@ BEGIN } } close INFO; - $svnurl =~ m!box/(.+)$!; - my $svndir = $1; + + my $svndir; + if ($svnurl =~ m!/box/(.+)$!) + { + $svndir = $1; + } + elsif ($svnurl =~ m'/(boxi/.+)/boxi/boxbackup') + { + $svndir = $1; + } + $svndir =~ tr/0-9A-Za-z/_/c; $product_version =~ s/USE_SVN_VERSION/$svndir.'_'.$svnversion/e; } # where to put the files - $install_into_dir = '@bindir_expanded@'; + $install_into_dir = '@sbindir_expanded@'; # if it's Darwin, if($build_os eq 'Darwin') @@ -108,5 +112,21 @@ sub make_flag return $_[0].'=1'; } +sub parcel_root +{ + my $tos = $_[1] || $target_os; + return $product_name.'-'.$product_version.'-'.$_[0].'-'.$tos; +} + +sub parcel_dir +{ + 'parcels/'.parcel_root($_[0], $_[1]) +} + +sub parcel_target +{ + parcel_dir($_[0]).'.tgz' +} + 1; diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp index 45ad0933..b646a27b 100644 --- a/infrastructure/buildenv-testmain-template.cpp +++ b/infrastructure/buildenv-testmain-template.cpp @@ -18,26 +18,21 @@ #include "Box.h" -#include "stdio.h" -#include <exception> -#include <sys/types.h> -#include <unistd.h> -#include <stdlib.h> -#include <stdarg.h> -#include <fcntl.h> #include <errno.h> -#include <string> +#include <fcntl.h> +#include <stdarg.h> +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> #ifdef HAVE_GETOPT_H #include <getopt.h> #endif -#ifdef WIN32 - #include "emu.h" -#else - #include <syslog.h> -#endif +#include <sys/stat.h> +#include <sys/types.h> +#include <exception> #include <string> #include "Logging.h" @@ -48,7 +43,7 @@ int test(int argc, const char *argv[]); -#ifdef NDEBUG +#ifdef BOX_RELEASE_BUILD #define MODE_TEXT "release" #else #define MODE_TEXT "debug" @@ -57,7 +52,17 @@ int test(int argc, const char *argv[]); int failures = 0; int first_fail_line; std::string first_fail_file; -std::string bbackupd_args, bbstored_args, bbackupquery_args, test_args; + +#ifdef WIN32 + #define QUIET_PROCESS "-Q" +#else + #define QUIET_PROCESS "" +#endif + +std::string bbackupd_args = QUIET_PROCESS, + bbstored_args = QUIET_PROCESS, + bbackupquery_args, + test_args; int filedes_open_at_beginning = -1; @@ -159,7 +164,15 @@ int main(int argc, char * const * argv) // Start memory leak testing MEMLEAKFINDER_START + Logging::SetProgramName(BOX_MODULE); + #ifdef HAVE_GETOPT_H + #ifdef BOX_RELEASE_BUILD + int logLevel = Log::NOTICE; // need an int to do math with + #else + int logLevel = Log::INFO; // need an int to do math with + #endif + struct option longopts[] = { { "bbackupd-args", required_argument, NULL, 'c' }, @@ -170,7 +183,7 @@ int main(int argc, char * const * argv) int ch; - while ((ch = getopt_long(argc, argv, "c:d:s:t:TUV", longopts, NULL)) + while ((ch = getopt_long(argc, argv, "c:d:qs:t:vPTUV", longopts, NULL)) != -1) { switch(ch) @@ -202,9 +215,50 @@ int main(int argc, char * const * argv) } break; + #ifndef WIN32 + case 'P': + { + Console::SetShowPID(true); + } + break; + #endif + + case 'q': + { + if(logLevel == Log::NOTHING) + { + BOX_FATAL("Too many '-q': " + "Cannot reduce logging " + "level any more"); + return 2; + } + logLevel--; + } + break; + + case 'v': + { + if(logLevel == Log::EVERYTHING) + { + BOX_FATAL("Too many '-v': " + "Cannot increase logging " + "level any more"); + return 2; + } + logLevel++; + } + break; + + case 'V': + { + logLevel = Log::EVERYTHING; + } + break; + case 't': { - Console::SetTag(optarg); + Logging::SetProgramName(optarg); + Console::SetShowTag(true); } break; @@ -221,12 +275,6 @@ int main(int argc, char * const * argv) } break; - case 'V': - { - Logging::SetGlobalLevel(Log::EVERYTHING); - } - break; - case '?': { fprintf(stderr, "Unknown option: '%c'\n", @@ -243,6 +291,8 @@ int main(int argc, char * const * argv) } } + Logging::SetGlobalLevel((Log::Level)logLevel); + argc -= optind - 1; argv += optind - 1; #endif // HAVE_GETOPT_H @@ -276,6 +326,9 @@ int main(int argc, char * const * argv) Timers::Init(); int returncode = test(argc, (const char **)argv); Timers::Cleanup(); + + fflush(stdout); + fflush(stderr); // check for memory leaks, if enabled #ifdef BOX_MEMORY_LEAK_TESTING @@ -292,6 +345,10 @@ int main(int argc, char * const * argv) if(fulltestmode) { bool filesleftopen = checkfilesleftopen(); + + fflush(stdout); + fflush(stderr); + if(filesleftopen) { failures++; diff --git a/infrastructure/m4/ax_bswap64.m4 b/infrastructure/m4/ax_bswap64.m4 index 9bfc84fc..8110743c 100644 --- a/infrastructure/m4/ax_bswap64.m4 +++ b/infrastructure/m4/ax_bswap64.m4 @@ -13,7 +13,7 @@ AC_DEFUN([AX_BSWAP64], [ bswap64_function="" AC_CHECK_HEADERS([sys/endian.h asm/byteorder.h]) if test "x$ac_cv_header_sys_endian_h" = "xyes"; then - AC_CACHE_CHECK([for htobe64], [have_htobe64], + AC_CACHE_CHECK([for htobe64], [box_cv_have_htobe64], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ $ac_includes_default #include <sys/endian.h> @@ -21,15 +21,15 @@ AC_DEFUN([AX_BSWAP64], [ htobe64(0); return 1; ]])], - [have_htobe64=yes], [have_htobe64=no] + [box_cv_have_htobe64=yes], [box_cv_have_htobe64=no] )]) - if test "x$have_htobe64" = "xyes"; then + if test "x$box_cv_have_htobe64" = "xyes"; then bswap64_function=htobe64 fi fi if test "x$bswap64_function" = "x" && \ test "x$ac_cv_header_asm_byteorder_h" = "xyes"; then - AC_CACHE_CHECK([for __cpu_to_be64], [have___cpu_to_be64], + AC_CACHE_CHECK([for __cpu_to_be64], [box_cv_have___cpu_to_be64], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ $ac_includes_default #include <asm/byteorder.h> @@ -37,9 +37,9 @@ AC_DEFUN([AX_BSWAP64], [ __cpu_to_be64(0); return 1; ]])], - [have___cpu_to_be64=yes], [have___cpu_to_be64=no] + [box_cv_have___cpu_to_be64=yes], [box_cv_have___cpu_to_be64=no] )]) - if test "x$have___cpu_to_be64" = "xyes"; then + if test "x$box_cv_have___cpu_to_be64" = "xyes"; then bswap64_function=__cpu_to_be64 fi fi diff --git a/infrastructure/m4/ax_check_define_pragma.m4 b/infrastructure/m4/ax_check_define_pragma.m4 index 176faf3d..e3f7fe89 100644 --- a/infrastructure/m4/ax_check_define_pragma.m4 +++ b/infrastructure/m4/ax_check_define_pragma.m4 @@ -10,14 +10,14 @@ dnl @version 2005/07/03 dnl @license AllPermissive AC_DEFUN([AX_CHECK_DEFINE_PRAGMA], [ - AC_CACHE_CHECK([for pre-processor pragma defines], [have_define_pragma], + AC_CACHE_CHECK([for pre-processor pragma defines], [box_cv_have_define_pragma], [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #define TEST_DEFINE #pragma pack(1) TEST_DEFINE ]])], - [have_define_pragma=yes], [have_define_pragma=no] + [box_cv_have_define_pragma=yes], [box_cv_have_define_pragma=no] )]) - if test "x$have_define_pragma" = "xyes"; then + if test "x$box_cv_have_define_pragma" = "xyes"; then AC_DEFINE([HAVE_DEFINE_PRAGMA], 1, [Define to 1 if #define of pragmas works]) m4_ifvaln([$1],[$1],[:])dnl m4_ifvaln([$2],[else $2])dnl diff --git a/infrastructure/m4/ax_check_dirent_d_type.m4 b/infrastructure/m4/ax_check_dirent_d_type.m4 index 1c0e2ec2..9c08d391 100644 --- a/infrastructure/m4/ax_check_dirent_d_type.m4 +++ b/infrastructure/m4/ax_check_dirent_d_type.m4 @@ -15,8 +15,8 @@ dnl @license AllPermissive AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [ AC_CHECK_MEMBERS([struct dirent.d_type],,, [[#include <dirent.h>]]) if test "x$ac_cv_member_struct_dirent_d_type" = "xyes"; then - AC_CACHE_CHECK([[whether struct dirent.d_type is valid]], [have_valid_dirent_d_type], - [AC_RUN_IFELSE( + AC_CACHE_CHECK([[whether struct dirent.d_type is valid]], [box_cv_have_valid_dirent_d_type], + [AC_TRY_RUN( [AC_LANG_PROGRAM([[ $ac_includes_default #include <dirent.h> @@ -26,14 +26,16 @@ AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [ if(dir) res = readdir(dir); return res ? (res->d_type != DT_FILE && res->d_type != DT_DIR) : 1; ]])], - [have_valid_dirent_d_type=yes], [have_valid_dirent_d_type=no] + [box_cv_have_valid_dirent_d_type=yes], + [box_cv_have_valid_dirent_d_type=no], + [box_cv_have_valid_dirent_d_type=cross] )]) - if test "x$have_valid_dirent_d_type" = "xyes"; then + if test "x$box_cv_have_valid_dirent_d_type" = "xyes"; then AC_DEFINE([HAVE_VALID_DIRENT_D_TYPE], 1, [Define to 1 if struct dirent.d_type is valid]) fi fi if test "x$ac_cv_member_struct_dirent_d_type" = "xyes" || \ - test "x$have_valid_dirent_d_type" = "xyes" + test "x$box_cv_have_valid_dirent_d_type" = "xyes" then m4_ifvaln([$1],[$1],[:])dnl m4_ifvaln([$2],[else $2])dnl diff --git a/infrastructure/m4/ax_check_malloc_workaround.m4 b/infrastructure/m4/ax_check_malloc_workaround.m4 index 9b1c9848..7655c0f7 100644 --- a/infrastructure/m4/ax_check_malloc_workaround.m4 +++ b/infrastructure/m4/ax_check_malloc_workaround.m4 @@ -10,16 +10,16 @@ dnl @license AllPermissive AC_DEFUN([AX_CHECK_MALLOC_WORKAROUND], [ if test "x$GXX" = "xyes"; then - AC_CACHE_CHECK([for gcc version 3 or later], [gcc_3_plus], + AC_CACHE_CHECK([for gcc version 3 or later], [box_cv_gcc_3_plus], [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #if __GNUC__ < 3 #error "Old GNU C" #endif ]])], - [gcc_3_plus=yes], [gcc_3_plus=no] + [box_cv_gcc_3_plus=yes], [box_cv_gcc_3_plus=no] )]) - if test "x$gcc_3_plus" = "xno"; then - AC_CACHE_CHECK([for malloc workaround], [malloc_workaround], + if test "x$box_cv_gcc_3_plus" = "xno"; then + AC_CACHE_CHECK([for malloc workaround], [box_cv_malloc_workaround], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #define __USE_MALLOC #include <string> @@ -27,9 +27,9 @@ AC_DEFUN([AX_CHECK_MALLOC_WORKAROUND], [ std::string s; s = "test"; ]])], - [malloc_workaround=yes], [malloc_workaround=no] + [box_cv_malloc_workaround=yes], [box_cv_malloc_workaround=no] )]) - if test "x$malloc_workaround" = "xyes"; then + if test "x$box_cv_malloc_workaround" = "xyes"; then AC_DEFINE([__USE_MALLOC], 1, [Define to 1 if __USE_MALLOC is required work around STL memory leaks]) fi diff --git a/infrastructure/m4/ax_check_nonaligned_access.m4 b/infrastructure/m4/ax_check_nonaligned_access.m4 index 8a6cd0c6..ab2d0b7e 100644 --- a/infrastructure/m4/ax_check_nonaligned_access.m4 +++ b/infrastructure/m4/ax_check_nonaligned_access.m4 @@ -12,7 +12,7 @@ dnl @version 2005/07/12 dnl @license AllPermissive AC_DEFUN([AX_CHECK_NONALIGNED_ACCESS], [ - AC_CACHE_CHECK([if non-aligned 16 bit word accesses fail], [have_aligned_only_int16], + AC_CACHE_CHECK([if non-aligned 16 bit word accesses fail], [box_cv_have_aligned_only_int16], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[ #ifndef HAVE_UINT16_T #define uint16_t u_int16_t; @@ -21,12 +21,12 @@ AC_DEFUN([AX_CHECK_NONALIGNED_ACCESS], [ memset(scratch, 0, sizeof(scratch)); return *(uint16_t*)((char*)scratch+1); ]])], - [have_aligned_only_int16=no], [have_aligned_only_int16=yes] + [box_cv_have_aligned_only_int16=no], [box_cv_have_aligned_only_int16=yes] )]) - if test "x$have_aligned_only_int16" = "xyes"; then + if test "x$box_cv_have_aligned_only_int16" = "xyes"; then AC_DEFINE([HAVE_ALIGNED_ONLY_INT16], 1, [Define to 1 if non-aligned int16 access will fail]) fi - AC_CACHE_CHECK([if non-aligned 32 bit word accesses fail], [have_aligned_only_int32], + AC_CACHE_CHECK([if non-aligned 32 bit word accesses fail], [box_cv_have_aligned_only_int32], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[ #ifndef HAVE_UINT32_T #define uint32_t u_int32_t; @@ -35,12 +35,12 @@ AC_DEFUN([AX_CHECK_NONALIGNED_ACCESS], [ memset(scratch, 0, sizeof(scratch)); return *(uint32_t*)((char*)scratch+1); ]])], - [have_aligned_only_int32=no], [have_aligned_only_int32=yes] + [box_cv_have_aligned_only_int32=no], [box_cv_have_aligned_only_int32=yes] )]) - if test "x$have_aligned_only_int32" = "xyes"; then + if test "x$box_cv_have_aligned_only_int32" = "xyes"; then AC_DEFINE([HAVE_ALIGNED_ONLY_INT32], 1, [Define to 1 if non-aligned int32 access will fail]) fi - AC_CACHE_CHECK([if non-aligned 64 bit word accesses fail], [have_aligned_only_int64], + AC_CACHE_CHECK([if non-aligned 64 bit word accesses fail], [box_cv_have_aligned_only_int64], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[ #ifndef HAVE_UINT64_T #define uint64_t u_int64_t; @@ -49,9 +49,9 @@ AC_DEFUN([AX_CHECK_NONALIGNED_ACCESS], [ memset(scratch, 0, sizeof(scratch)); return *(uint64_t*)((char*)scratch+1); ]])], - [have_aligned_only_int64=no], [have_aligned_only_int64=yes] + [box_cv_have_aligned_only_int64=no], [box_cv_have_aligned_only_int64=yes] )]) - if test "x$have_aligned_only_int64" = "xyes"; then + if test "x$box_cv_have_aligned_only_int64" = "xyes"; then AC_DEFINE([HAVE_ALIGNED_ONLY_INT64], 1, [Define to 1 if non-aligned int64 access will fail]) fi ])dnl diff --git a/infrastructure/m4/ax_check_syscall_lseek.m4 b/infrastructure/m4/ax_check_syscall_lseek.m4 index 491cc1ed..6c26e025 100644 --- a/infrastructure/m4/ax_check_syscall_lseek.m4 +++ b/infrastructure/m4/ax_check_syscall_lseek.m4 @@ -15,8 +15,8 @@ dnl @license AllPermissive AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [ AC_REQUIRE([AX_FUNC_SYSCALL])dnl if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then - AC_CACHE_CHECK([[whether syscall lseek requires dummy parameter]], [have_lseek_dummy_param], - [AC_RUN_IFELSE( + AC_CACHE_CHECK([[whether syscall lseek requires dummy parameter]], [box_cv_have_lseek_dummy_param], + [AC_TRY_RUN( [AC_LANG_PROGRAM([[ $ac_includes_default #include <fcntl.h> @@ -50,14 +50,16 @@ AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [ unlink("lseektest"); return res!=-1; ]])], - [have_lseek_dummy_param=yes], [have_lseek_dummy_param=no] + [box_cv_have_lseek_dummy_param=yes], + [box_cv_have_lseek_dummy_param=no], + [box_cv_have_lseek_dummy_param=no # assume not for cross-compiling] )]) - if test "x$have_lseek_dummy_param" = "xyes"; then + if test "x$box_cv_have_lseek_dummy_param" = "xyes"; then AC_DEFINE([HAVE_LSEEK_DUMMY_PARAM], 1, [Define to 1 if syscall lseek requires a dummy middle parameter]) fi fi - if test "x$have_lseek_dummy_param" = "xno" + if test "x$box_cv_have_lseek_dummy_param" = "xno" then m4_ifvaln([$1],[$1],[:])dnl m4_ifvaln([$2],[else $2])dnl diff --git a/infrastructure/m4/ax_func_syscall.m4 b/infrastructure/m4/ax_func_syscall.m4 index 40496bf0..2429ca93 100644 --- a/infrastructure/m4/ax_func_syscall.m4 +++ b/infrastructure/m4/ax_func_syscall.m4 @@ -12,26 +12,37 @@ dnl @category C dnl @author Martin Ebourne dnl @version 2005/07/01 dnl @license AllPermissive +dnl +dnl Changed by Chris on 081026: +dnl +dnl Reversed the test for __syscall(), remove the test for syscall(), +dnl remove the definition and reverse the sense in ax_func_syscall.m4 +dnl (which checks for __syscall() needing definition). +dnl +dnl Autoconf's AC_CHECK_FUNC defines it when testing for its presence, +dnl so HAVE___SYSCALL will be true even if __syscall has no definition +dnl in the system libraries, and this is precisely the case that we +dnl want to test for, so now we test whether the test program compiles +dnl with no explicit definition (only the system headers) and if that +dnl fails, we set HAVE___SYSCALL_NEED_DEFN to 1. AC_DEFUN([AX_FUNC_SYSCALL], [ AC_CHECK_HEADERS([sys/syscall.h unistd.h]) AC_CHECK_FUNCS([syscall __syscall]) - if test "x$ac_cv_func_syscall" != "xyes" && - test "x$ac_cv_func___syscall" != "xyes"; then - AC_CACHE_CHECK([for __syscall needing definition], [have___syscall_need_defn], + if test "x$ac_cv_func___syscall" = "xyes"; then + AC_CACHE_CHECK([for __syscall needing definition], [box_cv_have___syscall_need_defn], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ $ac_includes_default #ifdef HAVE_SYS_SYSCALL_H #include <sys/syscall.h> #endif - extern "C" off_t __syscall(quad_t number, ...); ]], [[ __syscall(SYS_exit, 0); return 1; ]])], - [have___syscall_need_defn=yes], [have___syscall_need_defn=no] + [box_cv_have___syscall_need_defn=no], [box_cv_have___syscall_need_defn=yes] )]) - if test "x$have___syscall_need_defn" = "xyes"; then + if test "x$box_cv_have___syscall_need_defn" = "xyes"; then AC_DEFINE([HAVE___SYSCALL_NEED_DEFN], 1, [Define to 1 if __syscall is available but needs a definition]) fi diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in index 456bd265..5ed4a0ab 100755 --- a/infrastructure/makebuildenv.pl.in +++ b/infrastructure/makebuildenv.pl.in @@ -39,16 +39,8 @@ unless(-d 'local') # flags about the environment my %env_flags; -my $windows_include_path = ""; -if ($target_windows) -{ - $module_dependency{"lib/common"} = ["lib/win32"]; - push @implicit_deps, "lib/win32"; -} -else -{ - # $env_flags{'IGNORE_lib/win32'} = 1; -} +$module_dependency{"lib/common"} = ["lib/win32"]; +push @implicit_deps, "lib/win32"; # print "Flag: $_\n" for(keys %env_flags); @@ -408,13 +400,41 @@ for my $mod (@implicit_deps, @modules) "test script file for $module for writing\n"; print TESTFILE "#!/bin/sh\necho TEST: $module\n"; - if(-d "$module/testfiles") + if ($target_windows) + { + print TESTFILE <<__E; +kill_process() +{ + if test -r testfiles/\$1.pid; then + /bin/kill -0 -f `cat testfiles/\$1.pid` \\ + && /bin/kill -f `cat testfiles/\$1.pid` + rm testfiles/\$1.pid + fi +} +__E + } + else + { + print TESTFILE <<__E; +kill_process() +{ + test -r testfiles/\$1.pid \\ + && kill -0 `cat testfiles/\$1.pid` \\ + && kill `cat testfiles/\$1.pid` +} +__E + } + + if (-d "$module/testfiles") { print TESTFILE <<__E; echo Killing any running daemons... -test -r testfiles/bbackupd.pid && kill `cat testfiles/bbackupd.pid` -test -r testfiles/bbstored.pid && kill `cat testfiles/bbstored.pid` +kill_process bbackupd +kill_process bbstored +__E + } + print TESTFILE <<__E; echo Removing old test files... chmod -R a+rwx testfiles rm -rf testfiles @@ -423,9 +443,8 @@ echo Copying new test files... cp -p -R ../../../$module/testfiles . __E - } - if(-e "$module/testextra") + if (-e "$module/testextra") { open FL,"$module/testextra" or die "Can't open $module/testextra"; @@ -435,12 +454,11 @@ __E print TESTFILE "$runcmd\n"; - if(-d "$module/testfiles") + if (-d "$module/testfiles") { print TESTFILE <<__E; -# echo Killing any running daemons... -test -r testfiles/bbackupd.pid && kill `cat testfiles/bbackupd.pid` -test -r testfiles/bbstored.pid && kill `cat testfiles/bbstored.pid` +kill_process bbackupd +kill_process bbstored __E } @@ -487,8 +505,7 @@ __E # make include path - my $include_paths = $windows_include_path . - join(' ',map {'-I../../'.$_} @all_deps_for_module); + my $include_paths = join(' ',map {'-I../../'.$_} @all_deps_for_module); # is target a library? my $target_is_library = ($type ne 'bin' && $type ne 'test'); @@ -515,6 +532,9 @@ __E open MAKE,">$mod/Makefile".$mk_name_extra or die "Can't open Makefile for $mod\n"; my $debug_link_extra = ($target_is_library)?'':'../../debug/lib/debug/debug.a'; + my $default_cxxflags = '@CXXFLAGS@'; + $default_cxxflags =~ s/ -O2//g; + my $release_flags = "-O2"; if ($target_windows) { @@ -531,15 +551,21 @@ CXX = @CXX@ AR = @AR@ RANLIB = @RANLIB@ PERL = @PERL@ -WINDRES = windres +WINDRES = @WINDRES@ + +DEFAULT_CXXFLAGS = @CPPFLAGS@ $default_cxxflags @CXXFLAGS_STRICT@ \\ + $include_paths $extra_platform_defines \\ + -DBOX_VERSION="\\"$product_version\\"" +LDFLAGS = @LDFLAGS@ @LDADD_RDYNAMIC@ + .ifdef RELEASE -CXXFLAGS = -DNDEBUG $release_flags @CXXFLAGS_STRICT@ $include_paths $extra_platform_defines -DBOX_VERSION="\\"$product_version\\"" +CXXFLAGS = -DBOX_RELEASE_BUILD $release_flags \$(DEFAULT_CXXFLAGS) OUTBASE = ../../release OUTDIR = ../../release/$mod DEPENDMAKEFLAGS = -D RELEASE VARIENT = RELEASE .else -CXXFLAGS = -g @CXXFLAGS_STRICT@ $include_paths $extra_platform_defines -DBOX_VERSION="\\"$product_version\\"" +CXXFLAGS = -g \$(DEFAULT_CXXFLAGS) OUTBASE = ../../debug OUTDIR = ../../debug/$mod DEPENDMAKEFLAGS = @@ -560,11 +586,11 @@ _AR = \$(AR) _RANLIB = \$(RANLIB) .else HIDE = @ -_CXX = @ echo "[CXX] " \$(*F) && \$(CXX) -_LINK = @ echo "[LINK] " \$(*F) && \$(CXX) -_WINDRES = @ echo "[WINDRES]" \$(*F) && \$(WINDRES) -_AR = @ echo "[AR] " \$(*F) && \$(AR) -_RANLIB = @ echo "[RANLIB] " \$(*F) && \$(RANLIB) +_CXX = @ echo " [CXX] " \$(*F) && \$(CXX) +_LINK = @ echo " [LINK] " \$(*F) && \$(CXX) +_WINDRES = @ echo " [WINDRES]" \$(*F) && \$(WINDRES) +_AR = @ echo " [AR] " \$(*F) && \$(AR) +_RANLIB = @ echo " [RANLIB] " \$(*F) && \$(RANLIB) .endif __E @@ -573,11 +599,11 @@ __E { print MAKE <<__E; HIDE = \$(if \$(V),,@) -_CXX = \$(if \$(V),\$(CXX), @ echo "[CXX] \$<" && \$(CXX)) -_LINK = \$(if \$(V),\$(CXX), @ echo "[LINK] \$@" && \$(CXX)) -_WINDRES = \$(if \$(V),\$(WINDRES), @ echo "[WINDRES] \$<" && \$(WINDRES)) -_AR = \$(if \$(V),\$(AR), @ echo "[AR] \$@" && \$(AR)) -_RANLIB = \$(if \$(V),\$(RANLIB), @ echo "[RANLIB] \$@" && \$(RANLIB)) +_CXX = \$(if \$(V),\$(CXX), @ echo " [CXX] \$<" && \$(CXX)) +_LINK = \$(if \$(V),\$(CXX), @ echo " [LINK] \$@" && \$(CXX)) +_WINDRES = \$(if \$(V),\$(WINDRES), @ echo " [WINDRES] \$<" && \$(WINDRES)) +_AR = \$(if \$(V),\$(AR), @ echo " [AR] \$@" && \$(AR)) +_RANLIB = \$(if \$(V),\$(RANLIB), @ echo " [RANLIB] \$@" && \$(RANLIB)) __E } @@ -683,6 +709,7 @@ __E if ($is_cpp) { $make .= "\t\$(_CXX) \$(CXXFLAGS) $compile_line_extra ". + "-DBOX_MODULE=\"\\\"$mod\\\"\" " . "-c $file -o $out_name\n\n"; } elsif ($is_rc) @@ -726,8 +753,9 @@ __E # run make for things we require for my $dep (@all_deps_for_module) { - $deps_makeinfo .= "\t\t\$(HIDE) (cd ../../$dep; \$(MAKE)$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n"; + $deps_makeinfo .= "\t\t\$(HIDE) (cd ../../$dep; \$(MAKE)$sub_make_options -q \$(DEPENDMAKEFLAGS) -D NODEPS || \$(MAKE)$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n"; } + $deps_makeinfo .= ".\tendif\n.endif\n\n"; } print MAKE $deps_makeinfo if $bsd_make; @@ -771,7 +799,7 @@ __E { # make a library archive... print MAKE "\t\$(HIDE) (echo -n > $end_target; rm $end_target)\n"; - print MAKE "\t\$(_AR) -q $end_target $o_file_list\n"; + print MAKE "\t\$(_AR) cq $end_target $o_file_list\n"; print MAKE "\t\$(_RANLIB) $end_target\n"; } else @@ -796,7 +824,9 @@ __E } # link line... - print MAKE "\t\$(_LINK) $link_line_extra -o $end_target $o_file_list $lib_files$lo $platform_lib_files\n"; + print MAKE "\t\$(_LINK) \$(LDFLAGS) $link_line_extra " . + "-o $end_target $o_file_list " . + "$lib_files$lo $platform_lib_files\n"; } # tests need to copy the test file over if($type eq 'test') @@ -814,7 +844,11 @@ __E print MAKE $make,"\n"; # and a clean target - print MAKE "clean:\n\t-rm -rf \$(OUTDIR)/*\n.\tifndef SUBCLEAN\n"; + print MAKE <<EOF; +clean: + -rm -rf \$(OUTDIR)/* +. ifndef SUBCLEAN +EOF for my $dep (@all_deps_for_module) { print MAKE "\t\$(HIDE) (cd ../../$dep; \$(MAKE) \$(DEPENDMAKEFLAGS) -D SUBCLEAN clean)\n"; @@ -851,7 +885,7 @@ __E { s/\A\.\s*(ifdef|else|endif|ifndef)/$1/; s/\A\.\s*include\s+<(.+?)>/include $1/; - s/-D\s+(\w+)/$1=1/; + s/-D\s+(\w+)/$1=1/g; print MAKE; } @@ -896,11 +930,18 @@ sub additional_objects_from_make_fragment chomp; if(m/link-extra:\s*(.+)\Z/) { - my @o = split /\s+/,$1; - for(@o) + my $extra = $1; + do { - push @$objs_r,$1 if m/\A(.+)\.o\Z/; + my @o = split /\s+/, $extra; + for(@o) + { + push @$objs_r,$1 if m/\A(.+)\.o\Z/; + } + last unless $extra =~ m'\\$'; + $extra = <FL>; } + while(1); } elsif(m/include-makefile:\s*(\S+)/) { diff --git a/infrastructure/makedistribution.pl.in b/infrastructure/makedistribution.pl.in index 2ef8b960..3914780a 100755 --- a/infrastructure/makedistribution.pl.in +++ b/infrastructure/makedistribution.pl.in @@ -7,7 +7,9 @@ use Symbol; my %comment_chars = ('cpp' => '// ', 'h' => '// ', 'pl' => '# ', 'pm' => '# ', '' => '# '); # other extensions which need text copying, just to remove the private stuff -my %text_files = ('txt' => 1, 'spec' => 1); +# .in is included here, as these could be any kind of source, but clearly +# they have text substitutions run on them by autoconf, so we can too :) +my %text_files = ('txt' => 1, 'spec' => 1, 'in' => 1); # files which don't get the license added my %no_license = (); # 'filename' => 1 @@ -113,6 +115,13 @@ sub copy_from_list elsif($src eq 'NO-LICENSE') { $no_license{$dst} = 1; + + # actually copy it, to remove redundancy in manifests + $src = $dst; + $dst = $other; + $dst = $src if $dst eq ''; + + copy_file($src,$dst); } elsif($src eq 'RUN') { @@ -189,9 +198,9 @@ sub copy_file # licensed or not? if(exists $comment_chars{$ext} && !exists $no_license{$fn} && $license_in_dir) { - my $b = $comment_chars{$ext}; - # copy as text, inserting license + # print "source copy $fn to $base_name/$dst_fn\n"; + my $in = gensym; open $in,$fn; open OUT,">$base_name/$dst_fn"; @@ -204,6 +213,7 @@ sub copy_file } # write license + my $b = $comment_chars{$ext}; for(@license) { print OUT $b,$_,"\n" @@ -225,31 +235,32 @@ sub copy_file close OUT; close $in; } - else + elsif(exists $text_files{$ext}) { - if(exists $text_files{$ext}) - { - # copy this as text, to remove private stuff - my $in = gensym; - open $in,$fn; - open OUT,">$base_name/$dst_fn"; + # copy this as text, to remove private stuff + # print "text copy $fn to $base_name/$dst_fn\n"; - while(<$in>) - { - unless(skip_non_applicable_section($_, $in, $fn)) - { - print OUT - } - } - - close OUT; - close $in; - } - else + my $in = gensym; + open $in,$fn; + open OUT,">$base_name/$dst_fn"; + + while(<$in>) { - # copy as binary - system 'cp',$fn,"$base_name/$dst_fn" - } + unless(skip_non_applicable_section($_, $in, $fn)) + { + print OUT + } + } + + close OUT; + close $in; + } + else + { + # copy as binary + # print "binary copy $fn to $base_name/$dst_fn\n"; + my $cmd = "cp -p $fn $base_name/$dst_fn"; + system($cmd) == 0 or die "copy failed: $cmd"; } # copy executable bit from src @@ -332,7 +343,11 @@ sub copy_dir next if m/\AMakefile\Z/; next if m/\Aautogen/; next if m/-smf-method\Z/; # copy only the .in versions - next if m/-manifest.xml\Z/; # copy onlt the .in versions + next if m/-manifest.xml\Z/; # copy only the .in versions + if($dir eq 'docs') { + next if m/.(x[sm]l|tmpl)\Z/; # don't include doc sources + next if m/generate_except_xml.pl/; + } next if !-f "$dir/$_"; copy_file("$dir/$_","$dst_dir/$_"); diff --git a/infrastructure/makeparcels.pl.in b/infrastructure/makeparcels.pl.in index 125ff346..e9e240db 100755 --- a/infrastructure/makeparcels.pl.in +++ b/infrastructure/makeparcels.pl.in @@ -98,71 +98,194 @@ print MAKE "all:\t",join(' ',map {"build-".$_} @parcels),"\n\n"; print MAKE "clean:\n"; for my $parcel (@parcels) { - print MAKE "\trm -rf ",parcel_dir($parcel),"\n"; - print MAKE "\trm -f ",parcel_target($parcel),"\n"; + print MAKE "\trm -rf ", BoxPlatform::parcel_dir($parcel), "\n"; + print MAKE "\trm -f ", BoxPlatform::parcel_target($parcel), "\n"; } -print MAKE "\n"; -print MAKE "test:\trelease/common/test\n\nrelease/common/test:\n\t./runtest.pl ALL release\n\n"; +if ($build_os eq 'CYGWIN') +{ + print MAKE "\tfind release debug -type f | xargs -r rm -f\n"; +} +else +{ + print MAKE "\tfind release debug -type f -exec rm -f {} \\;\n"; +} + +print MAKE <<__END_OF_FRAGMENT; + \$(MAKE) -C docs clean + +test: release/common/test + +release/common/test: + ./runtest.pl ALL release + +.PHONY: docs +docs: + \$(MAKE) -C docs + +__END_OF_FRAGMENT my $release_flag = BoxPlatform::make_flag('RELEASE'); for my $parcel (@parcels) { - my $target = parcel_target($parcel); - print MAKE "build-$parcel:\t$target\n\n"; - print MAKE $target,":\n"; - - my $dir = parcel_dir($parcel); - print MAKE "\ttest -d $dir || mkdir $dir\n"; - + my $target = BoxPlatform::parcel_target($parcel); + my $dir = BoxPlatform::parcel_dir($parcel); + my @parcel_deps; + unless ($target_windows) { open SCRIPT,">parcels/scripts/install-$parcel" or die "Can't open installer script for $parcel for writing"; print SCRIPT "#!/bin/sh\n\n"; } - + for(@{$parcel_contents{$parcel}}) { - my ($type,$name,$dest) = split /\s+/; - my $optional = ''; + my @args = split /\s+/; + + my ($type,$name,$dest) = @args; + my $optional = 0; + my $install = 1; if ($type eq 'optional') { - ($optional,$type,$name,$dest) = split /\s+/; + $optional = 1; + shift @args; + ($type,$name,$dest) = @args; + } + + if ($type eq 'noinstall') + { + $install = 0; + shift @args; + ($type,$name,$dest) = @args; } if($type eq 'bin') { my $exeext = $platform_exe_ext; - print MAKE "\t(cd bin/$name; \$(MAKE) $release_flag)\n"; - print MAKE "\tcp release/bin/$name/$name$exeext $dir\n"; + print MAKE <<EOF; +$dir/$name$exeext: release/bin/$name/$name$exeext + mkdir -p $dir + cp -p release/bin/$name/$name$exeext $dir + +.PHONY: release/bin/$name/$name$exeext +release/bin/$name/$name$exeext: + (cd bin/$name; \$(MAKE) $release_flag) + +EOF + push @parcel_deps, "$dir/$name$exeext"; } elsif ($type eq 'script') { + my $fullpath = $name; + my $filename = $name; + # remove path from script name + $filename =~ s{.*/}{}; + + print MAKE <<EOF; +$dir/$filename: $fullpath + mkdir -p $dir +EOF + if ($optional) { - print MAKE "\ttest -r $name " . - "&& cp $name $dir || true\n"; + print MAKE "\ttest -r $fullpath " . + "&& cp -p $fullpath $dir || true\n"; } else { - print MAKE "\tcp $name $dir\n"; + print MAKE "\tcp -p $fullpath $dir\n"; } + + print MAKE "\n"; + + push @parcel_deps, "$dir/$filename"; + } + elsif($type eq 'man') + { + print MAKE <<EOF; +$dir/${name}.gz: docs/man/${name}.gz + mkdir -p $dir + cp -p docs/man/${name}.gz $dir + +EOF + # Releases have the docs pre-made, but users + # may want to rebuild them for some reason. + print MAKE <<EOF; +.PHONY: docs/man/${name}.gz +docs/man/${name}.gz: + \$(MAKE) -C docs man/${name}.gz + +EOF + push @parcel_deps, "$dir/${name}.gz"; + } + } + + print MAKE <<EOF; +build-$parcel: $target + +$target: @parcel_deps + test -d $dir || mkdir $dir +EOF + + for(@{$parcel_contents{$parcel}}) + { + my @args = split /\s+/; + + my ($type,$name,$dest) = @args; + + my $optional = 0; + my $install = 1; + + if ($type eq 'optional') + { + $optional = 1; + shift @args; + ($type,$name,$dest) = @args; + } + + if ($type eq 'noinstall') + { + $install = 0; + shift @args; + ($type,$name,$dest) = @args; + } + + + if ($type eq 'script') + { # remove path from script name $name =~ s{.*/}{}; } - unless ($target_windows) + if ($type eq 'man') + { + $name =~ /([0-9])$/; + $dest = "man/man$1"; + $name =~ s/$/\.gz/; + } + + if ($install and not $target_windows) { my $local_install_dir = $install_into_dir; if (defined $dest) { - $local_install_dir = "@prefix@/$dest"; + if ($dest =~ m,^/,) + { + # Don't add $prefix if $dest is a literal path + $local_install_dir = $dest; + } + else + { + $local_install_dir = "@prefix@/$dest"; + } } + print SCRIPT "mkdir -p " . + "\${DESTDIR}$local_install_dir/\n"; print SCRIPT "install $name " . - "\$DESTDIR$local_install_dir\n"; + "\${DESTDIR}$local_install_dir\n"; } } @@ -172,7 +295,7 @@ for my $parcel (@parcels) chmod 0755,"parcels/scripts/install-$parcel"; } - my $root = parcel_root($parcel); + my $root = BoxPlatform::parcel_root($parcel); unless ($target_windows) { @@ -213,17 +336,3 @@ print INSTALLMSG "\n"; close INSTALLMSG; -sub parcel_root -{ - $product_name.'-'.$product_version.'-'.$_[0].'-'.$target_os -} - -sub parcel_dir -{ - 'parcels/'.parcel_root($_[0]) -} - -sub parcel_target -{ - parcel_dir($_[0]).'.tgz' -} diff --git a/infrastructure/msvc/2003/bbackupctl.vcproj b/infrastructure/msvc/2003/bbackupctl.vcproj index b2249ff8..02f7482e 100644 --- a/infrastructure/msvc/2003/bbackupctl.vcproj +++ b/infrastructure/msvc/2003/bbackupctl.vcproj @@ -20,7 +20,7 @@ Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32";"$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -72,7 +72,7 @@ EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2003/bbackupd.vcproj b/infrastructure/msvc/2003/bbackupd.vcproj index 182c10a2..f34db0cc 100644 --- a/infrastructure/msvc/2003/bbackupd.vcproj +++ b/infrastructure/msvc/2003/bbackupd.vcproj @@ -20,7 +20,7 @@ Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""$(SolutionDir)..\..\..\..\db-4.2.52.NC\build_win32";"$(SolutionDir)..\..\..\..\boost_1_31_0";"$(SolutionDir)..\..\..\..\openssl\include";"$(SolutionDir)..\..\..\..\zlib\include";"$(SolutionDir)..\..\..\lib\backupclient";"$(SolutionDir)..\..\..\lib\server";"$(SolutionDir)..\..\..\lib\crypto";"$(SolutionDir)..\..\..\lib\compress";"$(SolutionDir)..\..\..\lib\win32";"$(SolutionDir)..\..\..\lib\common\""
- PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -73,7 +73,7 @@ EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0""
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2003/boxquery.vcproj b/infrastructure/msvc/2003/boxquery.vcproj index 8d8cf20c..6ac09024 100644 --- a/infrastructure/msvc/2003/boxquery.vcproj +++ b/infrastructure/msvc/2003/boxquery.vcproj @@ -21,7 +21,7 @@ Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0""
- PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -73,7 +73,7 @@ EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0""
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2003/common.vcproj b/infrastructure/msvc/2003/common.vcproj index bdae0bb8..fb18b76a 100644 --- a/infrastructure/msvc/2003/common.vcproj +++ b/infrastructure/msvc/2003/common.vcproj @@ -20,7 +20,7 @@ Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0\""
- PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;NDEBUG "
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -64,7 +64,7 @@ EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\";"$(SolutionDir)..\..\..\..\boost_1_31_0\""
- PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;NDEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2003/win32test.vcproj b/infrastructure/msvc/2003/win32test.vcproj index e758be34..2ef7164e 100644 --- a/infrastructure/msvc/2003/win32test.vcproj +++ b/infrastructure/msvc/2003/win32test.vcproj @@ -72,7 +72,7 @@ EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="1"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\bin\bbackupd";"$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/bbackupctl.vcproj b/infrastructure/msvc/2005/bbackupctl.vcproj index ab75480c..216a284b 100644 --- a/infrastructure/msvc/2005/bbackupctl.vcproj +++ b/infrastructure/msvc/2005/bbackupctl.vcproj @@ -62,7 +62,7 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\lib_pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\lib_pcre.lib"
+ AdditionalDependencies="Ws2_32.lib Advapi32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcre.lib"
OutputFile="$(OutDir)/bbackupctl.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
@@ -123,7 +123,7 @@ Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/bbackupd.vcproj b/infrastructure/msvc/2005/bbackupd.vcproj index abed0f4c..ac8eb86a 100644 --- a/infrastructure/msvc/2005/bbackupd.vcproj +++ b/infrastructure/msvc/2005/bbackupd.vcproj @@ -62,7 +62,7 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\lib_pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\lib_pcre.lib"
+ AdditionalDependencies="Ws2_32.lib Advapi32.lib User32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcre.lib"
OutputFile="$(OutDir)/bbackupd.exe"
LinkIncremental="2"
IgnoreAllDefaultLibraries="false"
@@ -124,7 +124,7 @@ Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(SolutionDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/boxquery.vcproj b/infrastructure/msvc/2005/boxquery.vcproj index 1c6be061..776c0ac9 100644 --- a/infrastructure/msvc/2005/boxquery.vcproj +++ b/infrastructure/msvc/2005/boxquery.vcproj @@ -41,7 +41,7 @@ <Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include""
+ AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\pcre";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include""
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -62,7 +62,7 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\lib_pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\lib_pcre.lib"
+ AdditionalDependencies="Ws2_32.lib Advapi32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcre.lib"
OutputFile="$(OutDir)/bbackupquery.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
@@ -123,7 +123,7 @@ Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\..\openssl\include";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\lib\common\""
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/common.vcproj b/infrastructure/msvc/2005/common.vcproj index 5a715be4..256bce06 100644 --- a/infrastructure/msvc/2005/common.vcproj +++ b/infrastructure/msvc/2005/common.vcproj @@ -43,7 +43,7 @@ <Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\..\pcre\pcre-6.7\";$(NOINHERIT)"
+ AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\..\pcre";$(NOINHERIT)"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -111,7 +111,7 @@ Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common\";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include";"$(ProjectDir)..\..\..\..\pcre\pcre-6.7\""
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/infrastructure/msvc/2005/win32test.vcproj b/infrastructure/msvc/2005/win32test.vcproj index 460d7660..0f97c302 100644 --- a/infrastructure/msvc/2005/win32test.vcproj +++ b/infrastructure/msvc/2005/win32test.vcproj @@ -62,7 +62,7 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\lib_pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\lib_pcre.lib"
+ AdditionalDependencies="Ws2_32.lib Advapi32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcre.lib"
OutputFile="$(OutDir)/win32test.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
@@ -123,7 +123,7 @@ Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\bin\bbackupd";"$(ProjectDir)..\..\..\lib\backupclient";"$(ProjectDir)..\..\..\lib\common\";"$(ProjectDir)..\..\..\lib\compress";"$(ProjectDir)..\..\..\lib\crypto";"$(ProjectDir)..\..\..\lib\server";"$(ProjectDir)..\..\..\lib\win32";"$(ProjectDir)..\..\..\..\openssl\inc32";"$(ProjectDir)..\..\..\..\zlib\include""
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
diff --git a/infrastructure/parcelpath.pl b/infrastructure/parcelpath.pl new file mode 100644 index 00000000..24f951a2 --- /dev/null +++ b/infrastructure/parcelpath.pl @@ -0,0 +1,17 @@ +#!perl + +unless (@ARGV == 2) +{ + die "Usage: $0 <parcel-name> <target-os>\n"; +} + +$basedir = $0; +$basedir =~ s|/.*||; +$basedir .= "/.."; +-d $basedir or die "$basedir: $!"; +chdir $basedir or die "$basedir: $!"; +require "infrastructure/BoxPlatform.pm.in"; + +print BoxPlatform::parcel_dir(@ARGV) . "\n"; + +exit 0; diff --git a/infrastructure/printversion.pl b/infrastructure/printversion.pl new file mode 100644 index 00000000..13815284 --- /dev/null +++ b/infrastructure/printversion.pl @@ -0,0 +1,12 @@ +#!perl + +$basedir = $0; +$basedir =~ s|/.*||; +$basedir .= "/.."; +-d $basedir or die "$basedir: $!"; +chdir $basedir or die "$basedir: $!"; +require "infrastructure/BoxPlatform.pm.in"; + +print "$BoxPlatform::product_version\n"; + +exit 0; |