diff options
-rw-r--r-- | infrastructure/BoxPlatform.pm.in | 33 | ||||
-rwxr-xr-x | infrastructure/makebuildenv.pl.in | 3 |
2 files changed, 29 insertions, 7 deletions
diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in index b2b2ce43..3a1bf4bd 100644 --- a/infrastructure/BoxPlatform.pm.in +++ b/infrastructure/BoxPlatform.pm.in @@ -1,7 +1,7 @@ package BoxPlatform; use Exporter; @ISA = qw/Exporter/; -@EXPORT = qw/$build_os $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 $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 { @@ -25,16 +25,37 @@ BEGIN # Box Backup tried on Win2000,XP only :) $build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/; $build_os = 'MINGW32' if $build_os =~ m/MINGW32/; + $build_os_ver = `uname -r`; + chomp $build_os_ver; if ($build_os eq 'Darwin') { $xcode_ver = `xcodebuild -version | awk '/^Xcode/ {print \$2}'` } - $make_command = ($build_os eq 'Darwin' && $xcode_ver < 4) ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make'; - - $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' && - $build_os ne "MINGW32" && $build_os ne "SunOS" - && $build_os ne 'GNU/kFreeBSD' && $xcode_ver < 4); + if ($build_os eq 'Darwin' and $xcode_ver < 4) + { + $make_command = 'bsdmake'; + $bsd_make = 1; + } + elsif ($build_os eq 'SunOS') + { + if ($build_os_ver <= 5.10) + { + $make_command = 'gmake'; + $bsd_make = 0; + } + else + { + $make_command = 'bmake'; + $bsd_make = 1; + } + } + else + { + $make_command = 'make'; + $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' && + $build_os ne "MINGW32" && $build_os ne 'GNU/kFreeBSD'); + } # blank extra flags by default $platform_compile_line_extra = ''; diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in index 9b6ce993..0ad1fdae 100755 --- a/infrastructure/makebuildenv.pl.in +++ b/infrastructure/makebuildenv.pl.in @@ -20,7 +20,8 @@ my @implicit_deps = ('lib/common'); use lib 'infrastructure'; use BoxPlatform; -print "Building on '$build_os'.\n\n"; +print "Building on '$build_os $build_os_ver' using ". + ($bsd_make ? "BSD" : "GNU")." $make_command.\n\n"; # keep copy of command line args my $makebuildenv_args = join(' ',@ARGV); |