diff options
author | Adam Mitz <mitza-oci@users.noreply.github.com> | 2008-07-11 15:19:35 +0000 |
---|---|---|
committer | Adam Mitz <mitza-oci@users.noreply.github.com> | 2008-07-11 15:19:35 +0000 |
commit | 4fe2cd2581553250be14ca3da80ddf046feb78a9 (patch) | |
tree | 1b15c22c42134286b4a085d76d39e946ef60e7cb | |
parent | b62be7b8498567b01449da9e6faa06ab16c82e05 (diff) | |
download | MPC-4fe2cd2581553250be14ca3da80ddf046feb78a9.tar.gz |
ChangeLogTag: Fri Jul 11 15:18:27 UTC 2008 Adam Mitz <mitza@ociweb.com>
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | docs/README | 6 | ||||
-rwxr-xr-x | vs_postclean.pl | 30 |
3 files changed, 45 insertions, 7 deletions
@@ -1,3 +1,15 @@ +Fri Jul 11 15:18:27 UTC 2008 Adam Mitz <mitza@ociweb.com> + + * docs/README: + + Cleaned up some typos (stray semicolons) + + * vs_postclean.pl: + + Restore current directory after changing it. + Translate &, etc. + Added support for solutions, all referenced projects will be cleaned. + Fri Jul 11 14:56:44 UTC 2008 Chad Elliott <elliott_c@ociweb.com> * docs/README: @@ -34,8 +46,8 @@ Fri Jul 11 11:10:00 UTC 2008 Simon Massey <sma at prismtech dot com> * templates/make.net.mpt: - Added $Id$ to appease a non-MPC related script that, for some - reason, insists on applying it's influence on MPC. + Added dollar-Id-dollar to appease a non-MPC related script that, for + some reason, insists on applying it's influence on MPC. Thu Jul 10 22:34:12 UTC 2008 Chad Elliott <elliott_c@ociweb.com> diff --git a/docs/README b/docs/README index 7521aeef..5fda7896 100644 --- a/docs/README +++ b/docs/README @@ -722,9 +722,9 @@ of the Define_Custom: project { Define_Custom(CIDL) { - automatic_in = 0; - automatic_out = 0; - command = $(CIAO_ROOT)/bin/cidlc + automatic_in = 0 + automatic_out = 0 + command = $(CIAO_ROOT)/bin/cidlc commandflags = -I$(TAO_ROOT)/tao -I$(TAO_ROOT)/orbsvcs/orbsvcs -- inputext = .cidl source_outputext = _svnt.cpp diff --git a/vs_postclean.pl b/vs_postclean.pl index c8923938..01d7a111 100755 --- a/vs_postclean.pl +++ b/vs_postclean.pl @@ -17,6 +17,7 @@ eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' use strict; use FileHandle; use File::Basename; +use Cwd; # ****************************************************************** # Data Section @@ -60,6 +61,11 @@ sub read_proj { close($fh); } + $cmd =~ s/&/&/g; + $cmd =~ s/"/\'/g; + $cmd =~ s/>/>/g; + $cmd =~ s/</</g; + ## Return the command line (undef if there was no postclean) return $cmd; } @@ -72,8 +78,10 @@ sub clean_proj { ## Move to the directory of the project and run the command if (defined $cmd) { + my $current_dir = getcwd(); if (chdir(dirname($file))) { system($cmd); + chdir($current_dir); } else { print "WARNING: Unable to postclean $file\n"; @@ -81,13 +89,27 @@ sub clean_proj { } } +sub clean_sln { + my($cfg, $file) = @_; + my $fh = new FileHandle(); + + if (open($fh, $file)) { + while (<$fh>) { + if (/^Project\([^)]+\) = "[^\"]+", "([^\"]+)"/) { + clean_proj($cfg, $1); + } + } + close($fh); + } +} + # ****************************************************************** # Main Section # ****************************************************************** if ($#ARGV == -1) { print "PostClean v$version\n", - "Usage: ", basename($0), " [CFG=<configuration>] <project files>\n"; + "Usage: ", basename($0), " [CFG=<configuration>] <project or solution files>\n"; exit(0); } @@ -98,5 +120,9 @@ if ($ARGV[0] =~ /^CFG=(.+)/) { } foreach my $file (@ARGV) { - clean_proj($cfg, $file); + if (substr($file, -4, 4) eq '.sln') { + clean_sln($cfg, $file); + } else { + clean_proj($cfg, $file); + } } |