From 6fd3ad3f828f394c6f668cc6b43981a22e1f6317 Mon Sep 17 00:00:00 2001 From: elliott_c Date: Fri, 18 Jul 2008 16:05:54 +0000 Subject: ChangeLogTag: Fri Jul 18 16:03:52 UTC 2008 Chad Elliott --- vs_postclean.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'vs_postclean.pl') diff --git a/vs_postclean.pl b/vs_postclean.pl index 74c31410..90c3c696 100755 --- a/vs_postclean.pl +++ b/vs_postclean.pl @@ -85,6 +85,7 @@ sub clean_proj { chdir($current_dir); } else { + ## We'll only warn about files that we can't deal with. print "WARNING: Unable to postclean $file\n"; } } @@ -94,6 +95,7 @@ sub clean_sln { my($cfg, $file) = @_; my $fh = new FileHandle(); + ## For a solution, just read in and clean each project file we find. if (open($fh, $file)) { while (<$fh>) { if (/^Project\([^)]+\) = "[^\"]+", "([^\"]+)"/) { @@ -114,6 +116,8 @@ if ($#ARGV == -1) { exit(0); } +## Determine the project or solution configuration (defaulting to the +## default created by MPC). my $cfg = 'Debug|Win32'; if ($ARGV[0] =~ /^CFG=(.+)/) { $cfg = $1; @@ -121,10 +125,11 @@ if ($ARGV[0] =~ /^CFG=(.+)/) { } foreach my $file (@ARGV) { - if (substr($file, -4, 4) eq '.sln') { + if ($file =~ /\.sln$/) { clean_sln($cfg, $file); } else { + ## It's not a solution file, we'll assume it's a project clean_proj($cfg, $file); } } -- cgit v1.2.1