summaryrefslogtreecommitdiff
path: root/infrastructure/makeparcels.pl
diff options
context:
space:
mode:
authorBen Summers <ben@fluffy.co.uk>2006-02-13 13:30:21 +0000
committerBen Summers <ben@fluffy.co.uk>2006-02-13 13:30:21 +0000
commit830aa82e44381c85d8486e46de7ae0e26830457e (patch)
treef29edb3c3013990a3ae758e1ccfdb56a2d20923f /infrastructure/makeparcels.pl
parent2edd0a00e3244cc4dbc369d81ed1748768a06fb8 (diff)
Merge chris/win32/vc2005-compile-fixes @ r455, add infrastructure/msvc to distribution
Diffstat (limited to 'infrastructure/makeparcels.pl')
-rwxr-xr-xinfrastructure/makeparcels.pl18
1 files changed, 16 insertions, 2 deletions
diff --git a/infrastructure/makeparcels.pl b/infrastructure/makeparcels.pl
index 57e9cc96..deea24af 100755
--- a/infrastructure/makeparcels.pl
+++ b/infrastructure/makeparcels.pl
@@ -40,9 +40,10 @@ open PARCELS,"parcels.txt" or die "Can't open parcels file";
{
last if m'\AEND-ONLY';
}
- next;
}
+ next;
}
+ next if (m'\AEND-ONLY');
# new parcel, or a new parcel definition?
if(m/\A\s+(.+)\Z/)
@@ -105,6 +106,12 @@ for my $parcel (@parcels)
for(@{$parcel_contents{$parcel}})
{
my ($type,$name) = split /\s+/;
+ my $optional = '';
+
+ if ($type eq 'optional')
+ {
+ ($optional,$type,$name) = split /\s+/;
+ }
if($type eq 'bin')
{
@@ -114,7 +121,14 @@ for my $parcel (@parcels)
}
elsif ($type eq 'script')
{
- print MAKE "\tcp $name $dir\n";
+ if ($optional)
+ {
+ print MAKE "\ttest -r $name && cp $name $dir\n";
+ }
+ else
+ {
+ print MAKE "\tcp $name $dir\n";
+ }
# remove path from script name
$name =~ m~/([^/]+)\Z~;
$name = $1;