# $Id$ # Win32 autobuild helper. # use lib "$ENV{ACE_ROOT}/bin"; ## TO-DO ## * Added command line options to selective compile library, et.al. ## * Added cvs update. Also controllable from command line. ## * Added building an running version_tests/. It uses a different ## naming scheme. ## * Selectively build some specific configs from command line. ## Available command line switches ## * -k : Ignore error. Compile all projects in a collection regardless ## of errors. ## * -a : Build Alpha collections. ## * -D : Build DLLs only. ## * -L : Build LIBs only. ## * -d : Debug the script. No compilation will occur. ## * -v : Verbose mode. ## * -r : Rebuild all. (Default is Build.) @Win32_Lists= ("Win32 Debug", "Win32 Release", "Win32 Unicode Debug", "Win32 Unicode Release"); @Win32_DLL_Version_Tests_Configs= ("Win32 DLL Debug", "Win32 DLL Release", "Win32 DLL Unicode Debug", "Win32 DLL Unicode Release"); @Win32_LIB_Version_Tests_Configs = ("Win32 static Debug", "Win32 static Release", "Win32 static Unicode Debug", "Win32 static Unicode Release"); @Alpha_Lists= ("Win32 Alpha Debug", "Win32 Alpha Release", "Win32 Alpha Unicode Debug", "Win32 Alpha Unicode Release"); %Win32_DLL_Collections = ( "$Win32_Lists[0]" => < < < < < < < < < < < < < < < <= 0 && $ARGV[0] =~ /^-/ ) { if ( $ARGV[0] eq '-k' ) # Ignore error. Compile the whole thing { print "Ignore errors\n" if ( $Verbose ); $Ignore_error = 1; # in the same configuration. } elsif ( $ARGV[0] eq '-a' ) # Use Alpha { print "Build Alpha\n" if ( $Verbose ); $Build_Alpha = 1; @Lists = @Alpha_Lists; %DLL_Collections = %Alpha_DLL_Collections; %Lib_Collections = %Alpha_Lib_Collections; } elsif ( $ARGV[0] eq '-d') # Script debugging mode { print "Debug mode on\nVerbose mode on\n"; $Debug = 1; $Verbose = 1; } elsif ( $ARGV[0] eq '-D' ) # Build DLL only { print "Build DLL only\n" if ( $Verbose ); $Build_LIB = 0; } elsif ( $ARGV[0] eq '-L' ) # Build LIB only { print "Build LIB only\n" if ( $Verbose ); $Build_DLL = 0; } elsif ( $ARGV[0] eq '-v' ) # Verbose mode { $Verbose = 1; } elsif ( $ARGV[0] eq '-r' ) # Rebuild all { print "Rebuild all\n" if ( $Verbose ); $Build_Cmd = "/REBUILD"; } else { warn "$0: unknown option $ARGV[0]\n"; die $usage; } shift; } if ( $Verbose ) { for ($II = 0; $II < scalar (@Lists); $II++) { printf "$Lists[$II]\n"; } } if ( $Build_DLL ) { print "Building DLL\n" if ( $Verbose ); %Target = %DLL_Collections; @Version_Test_Target = @Win32_DLL_Version_Tests_Configs; Build_Collection; } if ( $Build_LIB ) { print "Building LIB\n" if ( $Verbose ); %Target = %Lib_Collections; @Version_Test_Target = @Win32_LIB_Version_Tests_Configs; Build_Collection; } print "End\n";