summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-04-21 17:25:06 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-04-21 17:25:06 +0000
commitb0460d04447c393b76cf57413af815981effc50a (patch)
tree22b9c0b5b11358722a90d2698531751941114e9e /bin
parent55af4a339fd949d2685f1fd327f43b7b4e57d960 (diff)
downloadATCD-b0460d04447c393b76cf57413af815981effc50a.tar.gz
ChangeLogTag:Fri Apr 21 10:23:19 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/msvc_auto_compile.pl32
1 files changed, 8 insertions, 24 deletions
diff --git a/bin/msvc_auto_compile.pl b/bin/msvc_auto_compile.pl
index cedd922e486..fc950b5a448 100755
--- a/bin/msvc_auto_compile.pl
+++ b/bin/msvc_auto_compile.pl
@@ -26,10 +26,10 @@ $use_custom_dir = 0;
# Find_dsp will search a directory for *.dsp files and return a list
# of strings that include the project name and the configuration
-sub Find_dsp ($)
+sub Find_dsp (@)
{
- my ($dir) = @_;
- my @array = ();
+ my (@dir) = @_;
+ @array = ();
my @config_array = ();
# wanted is only used for the File::Find
@@ -38,6 +38,7 @@ sub Find_dsp ($)
$array[++$#array] = $File::Find::name if ($File::Find::name =~ /\.dsp/i);
}
+ # get_config grabs the configurations out of a dsp file.
sub get_config ($)
{
my ($file) = @_;
@@ -56,18 +57,12 @@ sub Find_dsp ($)
return @configs;
}
- my $old_cwd = getcwd ()."\\";
+ unshift @dir, (\&wanted);
- if (!chdir ($dir))
- {
- print "Error changing dir to $dir: $!\n";
- return @config_array;
- }
-
- find(\&wanted, ".");
+ find @dir;
for ($i = 0; $i <= $#array; ++$i) {
- my $filename = "$dir/$array[$i]";
+ my $filename = "$array[$i]";
$filename =~ s@/./@/@g;
$filename =~ s@/@\\@g;
my @dsp_configs = get_config ($array[$i]);
@@ -77,10 +72,6 @@ sub Find_dsp ($)
}
}
- if (!chdir ($old_cwd."\\"))
- {
- print "Error changing dir to $old_cwd\\: $!\n";
- }
return @config_array;
}
@@ -108,8 +99,6 @@ sub Build_Core ()
print "LIB " if ($Verbose) && ($Build_LIB);
print "\n" if ($Verbose);
- die "Cannot chdir to ACE_ROOT\n" if (!chdir ($ACE_ROOT));
-
if ($Build_DLL)
{
if ($Build_Debug)
@@ -141,12 +130,7 @@ sub Build_Core ()
sub Build_All ()
{
- my @configurations = ();
-
- foreach $d (@directories)
- {
- push @configurations, Find_dsp ($d);
- }
+ my @configurations = Find_dsp (@directories);
print "\nmsvc_auto_compile: First Pass (libraries)\n";