summaryrefslogtreecommitdiff
path: root/infrastructure/makeparcels.pl.in
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-05-16 09:17:21 +0000
committerChris Wilson <chris+github@qwirx.com>2015-05-16 09:17:21 +0000
commit03b20d5cadbac58ee0b6ca791750814def9fb6c8 (patch)
tree4a3d20429f50badff9e31599aeb2200c9ffef574 /infrastructure/makeparcels.pl.in
parent950351f985fbad1d4c1af347c14b677864038466 (diff)
Allow matching parcel platforms on cpu-vendor and os-cpu-vendor.
Allows us to match 32/64-bit specific targets in parcels.txt. Add support for variable substitution in parcels.txt.
Diffstat (limited to 'infrastructure/makeparcels.pl.in')
-rwxr-xr-xinfrastructure/makeparcels.pl.in16
1 files changed, 11 insertions, 5 deletions
diff --git a/infrastructure/makeparcels.pl.in b/infrastructure/makeparcels.pl.in
index 5afdf730..5ef39ff8 100755
--- a/infrastructure/makeparcels.pl.in
+++ b/infrastructure/makeparcels.pl.in
@@ -20,7 +20,10 @@ sub os_matches ($)
foreach my $prefix (@prefixes)
{
return 1 if starts_with($build_os, $prefix);
- return 1 if starts_with($target_os, $prefix);
+ return 1 if starts_with($ac_target_os, $prefix);
+ return 1 if starts_with("$ac_target_cpu-$ac_target_os",
+ $prefix);
+ return 1 if starts_with($ac_target, $prefix);
}
return 0;
}
@@ -133,8 +136,8 @@ my @clean_deps;
for my $parcel (@parcels)
{
my $version = BoxPlatform::parcel_root($parcel);
- my $target = BoxPlatform::parcel_target($parcel);
- my $dir = BoxPlatform::parcel_dir($parcel);
+ my $make_target = BoxPlatform::parcel_target($parcel);
+ my $dir = BoxPlatform::parcel_dir($parcel);
my @parcel_deps;
# Need to use BSD install on Solaris
@@ -186,6 +189,9 @@ EOF
}
elsif ($type eq 'script')
{
+ # Replace any variables ($ac_target etc.) with their
+ # values.
+ $name =~ s|(\$[^/ ]+)|$1|eeg;
my $fullpath = $name;
my $filename = $name;
# remove path from script name
@@ -266,9 +272,9 @@ EOF
}
print MAKE <<EOF;
-build-$parcel: $target
+build-$parcel: $make_target
-$target: @parcel_deps
+$make_target: @parcel_deps
test -d $dir || mkdir $dir
EOF