summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--infrastructure/BoxPlatform.pm.in13
-rwxr-xr-xinfrastructure/makebuildenv.pl.in2
-rwxr-xr-xinfrastructure/makeparcels.pl.in16
3 files changed, 20 insertions, 11 deletions
diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in
index e8964b0e..23054565 100644
--- a/infrastructure/BoxPlatform.pm.in
+++ b/infrastructure/BoxPlatform.pm.in
@@ -1,15 +1,18 @@
package BoxPlatform;
use Exporter;
@ISA = qw/Exporter/;
-@EXPORT = qw/$build_os $build_os_ver $target_os $make_command $bsd_make $platform_define $platform_cpu $gcc_v3 $product_version $product_name $install_into_dir $sub_make_options $platform_compile_line_extra $platform_link_line_extra $platform_lib_files $platform_exe_ext $target_windows/;
+@EXPORT = qw/$build_os $build_os_ver $ac_target $ac_target_cpu $ac_target_vendor $ac_target_os $make_command $bsd_make $platform_define $platform_cpu $gcc_v3 $product_version $product_name $install_into_dir $sub_make_options $platform_compile_line_extra $platform_link_line_extra $platform_lib_files $platform_exe_ext $target_windows/;
BEGIN
{
# which OS are we building under?
- $target_os = '@target_os@';
+ $ac_target = '@target@';
+ $ac_target_cpu = '@target_cpu@';
+ $ac_target_vendor = '@target_vendor@';
+ $ac_target_os = '@target_os@';
$target_windows = 0;
- $target_windows = 1 if $target_os =~ m'^mingw32'
- or $target_os eq "winnt";
+ $target_windows = 1 if $ac_target_os =~ m'^mingw32'
+ or $ac_target_os eq "winnt";
if ($^O eq "MSWin32" and not -x "/usr/bin/uname")
{
@@ -155,7 +158,7 @@ sub make_flag
sub parcel_root
{
- my $tos = $_[1] || $target_os;
+ my $tos = $_[1] || $ac_target_os;
return $product_name.'-'.$product_version.'-'.$_[0].'-'.$tos;
}
diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in
index 0042c7a6..5f1b0618 100755
--- a/infrastructure/makebuildenv.pl.in
+++ b/infrastructure/makebuildenv.pl.in
@@ -212,7 +212,7 @@ for(@modules_files)
if(m/\AOMIT:(.+)/)
{
- if($1 eq $build_os or $1 eq $target_os)
+ if($1 eq $build_os or $1 eq $ac_target_os)
{
$modules_omitted = 1;
$modules_omitting = 1;
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