summaryrefslogtreecommitdiff
path: root/vs_postclean.pl
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2008-07-18 16:05:54 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2008-07-18 16:05:54 +0000
commit6fd3ad3f828f394c6f668cc6b43981a22e1f6317 (patch)
tree61c90e72b7bf915d9d80c8e5e1837abbbaaadb0d /vs_postclean.pl
parent97fa1ff1e6cf30fa55cb9c32081ea3ef9055fbd2 (diff)
downloadMPC-6fd3ad3f828f394c6f668cc6b43981a22e1f6317.tar.gz
ChangeLogTag: Fri Jul 18 16:03:52 UTC 2008 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'vs_postclean.pl')
-rwxr-xr-xvs_postclean.pl7
1 files changed, 6 insertions, 1 deletions
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);
}
}