diff options
Diffstat (limited to 'bin/msvc_mpc_auto_compile.pl')
-rwxr-xr-x | bin/msvc_mpc_auto_compile.pl | 160 |
1 files changed, 28 insertions, 132 deletions
diff --git a/bin/msvc_mpc_auto_compile.pl b/bin/msvc_mpc_auto_compile.pl index f2daff0bd8f..d6f70671339 100755 --- a/bin/msvc_mpc_auto_compile.pl +++ b/bin/msvc_mpc_auto_compile.pl @@ -30,7 +30,7 @@ else { "$ACE_ROOT\\TAO\\TAO_IDL", "$ACE_ROOT\\TAO\\tests"); -@ciao_core_dirs = ("$ACE_ROOT\\TAO\\orbsvcs\\orbsvcs", # CIAO dependancy +@ciao_core_dirs = ("$ACE_ROOT\\TAO\\orbsvcs\\orbsvcs", # CIAO dependancy "$ACE_ROOT\\TAO\\CIAO"); $debug = 0; @@ -47,34 +47,16 @@ $vc7 = 0; # Build_Config takes in a string of the type "project--configuration" and # runs msdev to build it. -# sub Build_Config ($) -#{ -# my ($arg) = @_; -# my ($project, $config) = split /--/, $arg; -# -# return Build ($project, $config); -#} - -# Build -sub Build ($$) +sub Build_Config ($) { - my ($project, $config) = @_; - - if ($debug == 1) { - print "$project\n"; - return 0; - } - else { - print "Auto_compiling $project : $config\n"; - - print "Building $project $config\n" if $verbose; + my ($arg) = @_; + my ($project, $config) = split /--/, $arg; - return system ("msdev.com $project /MAKE \"$config\" $Build_Cmd $useenv"); - } + return Build ($project, $config); } # Build -sub Build_VC7 ($$) +sub Build ($$) { my ($project, $config) = @_; @@ -87,7 +69,7 @@ sub Build_VC7 ($$) print "Building $project $config\n" if $verbose; - return system ("devenv.com $project $Build_Cmd $config $useenv"); + return system ("msdev.com $project /MAKE \"$config\" $Build_Cmd $useenv"); } } @@ -95,34 +77,19 @@ sub Find_Dsw (@) { my (@dir) = @_; @array = (); + my @config_array = (); - sub wanted_dsw { - $array[++$#array] = + sub wanted { + $array[++$#array] = $File::Find::name if ($File::Find::name =~ /\.dsw$/i); } - - find (\&wanted_dsw, @dir); - + + find (\&wanted, @dir); + print "List of dsw's \n" if ($verbose == 1); return @array; } -sub Find_Sln (@) -{ - my (@dir) = @_; - @array = (); - - sub wanted_sln { - $array[++$#array] = - $File::Find::name if ($File::Find::name =~ /\.sln$/i); - } - - find (\&wanted_sln, @dir); - - print "List of sln's \n" if ($verbose == 1); - return @array; -} - # Only builds the core libraries. sub Build_Custom () { @@ -135,7 +102,7 @@ sub Build_Custom () print "\n" if ($verbose); my @custom_list = Find_Dsw (@directories); - + print "List now is @custom_list \n"; foreach $c (@custom_list) { print "List now is $c \n"; @@ -156,10 +123,10 @@ sub Build_All () push @directories, @ace_core_dirs; push @directories, @tao_core_dirs; push @directories, @ciao_core_dirs; - + print STDERR "First pass (libraries)\n" if ($print_status == 1); print "\nmsvc_auto_compile: First Pass CORE (libraries)\n"; - + Build_Custom (); my @new_directory_search = "$ACE_ROOT"; @@ -183,65 +150,6 @@ sub Build_All () } -# Only builds the core libraries. -sub Build_Custom_VC7 () -{ - print STDERR "Building Custom\n"; - print "Building Custom directories specified\n";# if ($verbose == 1); - - print "Build " if ($verbose); - print "Debug " if ($verbose) && ($Build_Debug); - print "Release " if ($verbose) && ($Build_Release); - print "\n" if ($verbose); - - my @custom_list = Find_Sln (@directories); - - print "List now is @custom_list \n"; - foreach $c (@custom_list) { - print "List now is $c \n"; - if ($Build_Debug) { - $Status = Build_VC7 ($c, "debug"); - return if $Status != 0 && !$Ignore_errors; - } - if ($Build_Release) { - $Status = Build_VC7 ($c, "release"); - return if $Status != 0 && !$Ignore_errors; - } - } -} - -# Build all examples and directories -sub Build_All_VC7 () -{ - push @directories, @ace_core_dirs; - push @directories, @tao_core_dirs; - push @directories, @ciao_core_dirs; - - print STDERR "First pass (libraries)\n" if ($print_status == 1); - print "\nmsvc_auto_compile: First Pass CORE (libraries)\n"; - - Build_Custom_VC7 (); - - my @new_directory_search = "$ACE_ROOT"; - - my @configurations = Find_Sln (@new_directory_search); - - print STDERR "Second pass (for other things)\n" if ($print_status == 1); - print "\nmsvc_mpc_auto_compile: Second Pass (rest of the stuff)\n"; - - foreach $c (@configurations) { - print "\nUsing $c for compilation\n"; - if ($Build_Debug) { - $Status = Build_VC7 ($c, "debug"); - return if $Status != 0 && !$Ignore_errors; - } - if ($Build_Release) { - $Status = Build_VC7 ($c, "release"); - return if $Status != 0 && !$Ignore_errors; - } - } -} - ## Parse command line argument while ( $#ARGV >= 0 && $ARGV[0] =~ /^(-|\/)/ ) { @@ -252,14 +160,6 @@ while ( $#ARGV >= 0 && $ARGV[0] =~ /^(-|\/)/ ) elsif ($ARGV[0] =~ /^-d$/i) { # debug $debug = 1; } - elsif ($ARGV[0] =~ '-vc7') { # Use VC7 project and solution files. - print "Using VC7 files\n" if ( $verbose ); - $vc7 = 1; - } - elsif ($ARGV[0] =~ '-vc8') { # Use VC8 project and solution files. - print "Using VC8 files\n" if ( $verbose ); - $vc7 = 1; # vc8 is like vc7 - } elsif ($ARGV[0] =~ '-v') { # verbose mode $verbose = 1; } @@ -278,22 +178,22 @@ while ( $#ARGV >= 0 && $ARGV[0] =~ /^(-|\/)/ ) elsif ($ARGV[0] =~ '-TAO') {# Build TAO and its tests print "Building TAO\n" if ( $verbose ); $use_custom_dir = 1; - push @directories, @ace_core_dirs; + push @directories, @ace_core_dirs; push @directories, @tao_core_dirs; } elsif ($ARGV[0] =~ '-CIAO') {# Build the CIAO and related - # libraries + # libraries print "Building only CIAO\n" if ( $verbose ); $use_custom_dir = 1; - push @directories, @ace_core_dirs; + push @directories, @ace_core_dirs; push @directories, @tao_core_dirs; push @directories, @ciao_core_dirs; - } + } elsif ($ARGV[0] =~ '-ALL') {# Build the CIAO and related - # libraries + # libraries print "Building ALL \n" if ( $verbose ); $build_all = 1; - } + } elsif ($ARGV[0] =~ '-dir') { # Compile only a specific directory shift; print "Adding directory $ARGV[0]\n" if ( $verbose ); @@ -316,6 +216,10 @@ while ( $#ARGV >= 0 && $ARGV[0] =~ /^(-|\/)/ ) print "Building Release Version\n" if ( $verbose ); $Build_Release = 1; } + elsif ($ARGV[0] =~ '-vc7') { # Use VC7 project and solution files. + print "Using VC7 files\n" if ( $verbose ); + $vc7 = 1; + } elsif ($ARGV[0] =~ '-(\?|h)') { # Help information print "Options\n"; print "-d = Debug (only print out projects)\n"; @@ -323,8 +227,6 @@ while ( $#ARGV >= 0 && $ARGV[0] =~ /^(-|\/)/ ) print "-v = Script verbose Mode\n"; print "-s = Print status messages to STDERR\n"; print "-u = Tell MSVC to use the environment\n"; - print "-vc7 = Use MSVC 7 toolset\n"; - print "-vc8 = Use MSVC 8 toolset\n"; print "\n"; print "-CORE = Build ACE+TAO+CIAO core \n"; print "-ACE = Build ACE and its tests\n"; @@ -350,13 +252,7 @@ if (!$Build_Debug && !$Build_Release) { } print "MPC version of msvc_mpc_auto_compile: Begin\n"; -if ($vc7) { - Build_All_VC7 if ($build_all && !$use_custom_dir); - Build_Custom_VC7 if $use_custom_dir; -} -else { - Build_All if ($build_all && !$use_custom_dir); - Build_Custom if $use_custom_dir; -} +Build_All if ($build_all && !$use_custom_dir); +Build_Custom if $use_custom_dir; print "msvc_mpc_auto_compile: End\n"; print STDERR "End\n" if ($print_status == 1); |