|
4 | 4 | use File::Basename; |
5 | 5 | use File::Path; |
6 | 6 | use lib ('external/buildscripts', "../../Tools/perl_lib","perl_lib", 'external/buildscripts/perl_lib'); |
| 7 | +use strict; |
| 8 | +use warnings; |
7 | 9 | use Tools qw(InstallNameTool); |
8 | 10 |
|
9 | 11 | print ">>> PATH in Build All = $ENV{PATH}\n\n"; |
10 | 12 |
|
11 | 13 | my $currentdir = getcwd(); |
12 | 14 |
|
13 | 15 | my $monoroot = File::Spec->rel2abs(dirname(__FILE__) . "/../.."); |
14 | | -my $monoroot = abs_path($monoroot); |
| 16 | +$monoroot = abs_path($monoroot); |
15 | 17 |
|
16 | 18 | my $buildscriptsdir = "$monoroot/external/buildscripts"; |
17 | 19 | my $addtoresultsdistdir = "$buildscriptsdir/add_to_build_results/monodistribution"; |
|
294 | 296 | } |
295 | 297 | else |
296 | 298 | { |
297 | | - if (not $checkoutonthefly) |
| 299 | + if (not $checkoutOnTheFly) |
298 | 300 | { |
299 | 301 | print(">>> No external build deps found. Might as well try to check them out. If it fails, we'll continue and trust mono is in your PATH\n"); |
300 | 302 | } |
|
321 | 323 |
|
322 | 324 | if (-d "$existingExternalMono/builds") |
323 | 325 | { |
324 | | - print(">>> Mono already extracted at : $existingExternalMono/builds\n"); |
325 | | - } |
326 | | - |
327 | | - if (!(-d "$existingExternalMono/builds")) |
328 | | - { |
329 | | - # We need to extract builds.zip |
330 | | - print(">>> Extracting mono builds.zip...\n"); |
331 | | - system("unzip", "$existingExternalMono/builds.zip", "-d", "$existingExternalMono/builds") eq 0 or die("failed to extract mono builds.zip\n"); |
| 326 | + print(">>> Mono found at at : $existingExternalMono/builds\n"); |
332 | 327 | } |
333 | 328 |
|
334 | 329 | $existingMonoRootPath = "$existingExternalMono/builds/monodistribution"; |
|
452 | 447 | } |
453 | 448 |
|
454 | 449 | my $macSdkPath = ""; |
| 450 | + my $macBuildEnvDir = ""; |
455 | 451 | my $macversion = '10.11'; |
456 | 452 | my $darwinVersion = "10"; |
457 | 453 | if ($^O eq 'darwin') |
|
461 | 457 | $sdk='10.11'; |
462 | 458 | } |
463 | 459 |
|
464 | | - my $macBuildEnvDir = "$externalBuildDeps/MacBuildEnvironment"; |
| 460 | + $macBuildEnvDir = "$externalBuildDeps/MacBuildEnvironment"; |
465 | 461 | $macSdkPath = "$macBuildEnvDir/builds/MacOSX$sdk.sdk"; |
466 | 462 | if (! -d $macSdkPath) |
467 | 463 | { |
|
688 | 684 | my $platformRootPostfix = ""; |
689 | 685 | my $useKraitPatch = 1; |
690 | 686 | my $kraitPatchPath = "$monoroot/../../android_krait_signal_handler/build"; |
691 | | - my $toolChainExtension = ""; |
692 | 687 | my $binUtilsPrefix = ""; |
| 688 | + my $clangPrefix = ""; |
693 | 689 |
|
694 | 690 | $ENV{ANDROID_PLATFORM} = "android-$apiLevel"; |
695 | 691 |
|
|
789 | 785 | # TODO: No idea if we can build android 19 on windows yet |
790 | 786 | if ($runningOnWindows) |
791 | 787 | { |
792 | | - $toolChainExtension = ".exe"; |
793 | | - |
794 | 788 | $androidPlatformRoot = `cygpath -w $androidPlatformRoot`; |
795 | 789 | # clean up trailing new lines that end up in the output from cygpath. |
796 | 790 | $androidPlatformRoot =~ s/\n+$//; |
|
951 | 945 |
|
952 | 946 | if ($runningOnWindows) |
953 | 947 | { |
954 | | - my $sevenZip = "$externalBuildDeps/7z/win64/7za.exe"; |
| 948 | + my $sevenZip = "$externalBuildDeps/7za-win-x64/7za.exe"; |
955 | 949 | my $winDepsSdkArchive = `cygpath -w $depsSdkArchive`; |
956 | 950 | my $winDepsSdkExtract = `cygpath -w $externalBuildDeps`; |
957 | 951 |
|
|
990 | 984 |
|
991 | 985 | if ($runningOnWindows) |
992 | 986 | { |
993 | | - $toolChainExtension = ".exe"; |
994 | | - |
995 | 987 | $tizenPlatformRoot = `cygpath -w $tizenPlatformRoot`; |
996 | 988 | # clean up trailing new lines that end up in the output from cygpath. |
997 | 989 | $tizenPlatformRoot =~ s/\n+$//; |
|
1580 | 1572 | } |
1581 | 1573 | elsif ($android) |
1582 | 1574 | { |
1583 | | - system("cp", "$monoroot/mono/mini/.libs/libmonosgen-2.0.so","$embedDirArchDestination/libmonosgen-2.0.so") eq 0 or die ("failed copying $file\n"); |
1584 | | - system("cp", "$monoroot/mono/mini/.libs/libmonoboehm-2.0.so","$embedDirArchDestination/libmonobdwgc-2.0.so") eq 0 or die ("failed copying $file\n"); |
| 1575 | + system("cp", "$monoroot/mono/mini/.libs/libmonosgen-2.0.so","$embedDirArchDestination/libmonosgen-2.0.so") eq 0 or die ("failed copying libmonosgen-2.0.so\n"); |
| 1576 | + system("cp", "$monoroot/mono/mini/.libs/libmonoboehm-2.0.so","$embedDirArchDestination/libmonobdwgc-2.0.so") eq 0 or die ("failed copying libmonobdwgc-2.0.so\n"); |
1585 | 1577 | print ">>> Copying libMonoPosixHelper.so\n"; |
1586 | 1578 | system("cp", "$monoroot/support/.libs/libMonoPosixHelper.so","$embedDirArchDestination/libMonoPosixHelper.so") eq 0 or die ("failed copying libMonoPosixHelper.so\n"); |
1587 | 1579 | } |
|
1620 | 1612 | system("ln","-f", "$monoroot/mono/mini/.libs/libmonosgen-2.0.dylib","$embedDirArchDestination/libmonosgen-2.0.dylib") eq 0 or die ("failed symlinking libmonosgen-2.0.dylib\n"); |
1621 | 1613 |
|
1622 | 1614 | print "Hardlinking libMonoPosixHelper.dylib\n"; |
1623 | | - system("ln","-f", "$monoroot/support/.libs/libMonoPosixHelper.dylib","$embedDirArchDestination/libMonoPosixHelper.dylib") eq 0 or die ("failed symlinking $libtarget/libMonoPosixHelper.dylib\n"); |
| 1615 | + system("ln","-f", "$monoroot/support/.libs/libMonoPosixHelper.dylib","$embedDirArchDestination/libMonoPosixHelper.dylib") eq 0 or die ("failed symlinking $embedDirArchDestination/libMonoPosixHelper.dylib\n"); |
1624 | 1616 | print "Hardlinking libmono-native.dylib\n"; |
1625 | | - system("ln","-f", "$monoroot/mono/native/.libs/libmono-native.dylib","$embedDirArchDestination/libmono-native.dylib") eq 0 or die ("failed symlinking $libtarget/libmono-native.dylib\n"); |
| 1617 | + system("ln","-f", "$monoroot/mono/native/.libs/libmono-native.dylib","$embedDirArchDestination/libmono-native.dylib") eq 0 or die ("failed symlinking $embedDirArchDestination/libmono-native.dylib\n"); |
1626 | 1618 |
|
1627 | 1619 | InstallNameTool("$embedDirArchDestination/libmonobdwgc-2.0.dylib", "\@executable_path/../Frameworks/MonoEmbedRuntime/osx/libmonobdwgc-2.0.dylib"); |
1628 | 1620 | InstallNameTool("$embedDirArchDestination/libmonosgen-2.0.dylib", "\@executable_path/../Frameworks/MonoEmbedRuntime/osx/libmonosgen-2.0.dylib"); |
|
1716 | 1708 |
|
1717 | 1709 | if ($test) |
1718 | 1710 | { |
| 1711 | + my $runtimeTestsDir = "$monoroot/mono/mini"; |
1719 | 1712 | if ($runRuntimeTests) |
1720 | 1713 | { |
1721 | | - my $runtimeTestsDir = "$monoroot/mono/mini"; |
1722 | 1714 | chdir("$runtimeTestsDir") eq 1 or die ("failed to chdir"); |
1723 | 1715 | print("\n>>> Calling make check in $runtimeTestsDir\n\n"); |
1724 | 1716 | system("make","check") eq 0 or die ("runtime tests failed\n"); |
|
0 commit comments