Skip to content

Commit

Permalink
[build] Add make jenkins target.
Browse files Browse the repository at this point in the history
The `make jenkins` [^0] target is for use by Continuous Integration
machines, to build *everything* [^1].

This is expected to take an eternity. Think *hours*.

	$ time make jenkins
	...
	real	130m11.608s
	user	97m22.220s
	sys	18m20.522s

Of particular note is that the above "everything" includes
*Release configuration builds* of everything, which is something that
didn't actually work before. (Oops.)

Bump Java.Interop so that it supports building the Release
configuration, update Xamarin.Android.sln so that all required
projects are part of the Release configuration, and update
Xamarin.Android.Build.Tasks.csproj so that `JCW_ONLY_TYPE_NAMES` isn't
defined, as this was preventing compilation.

Fix **strip**(1) use: `mono-runtimes.targets` was trying to use
`strip -S` on macOS, but the value of `%(_MonoRuntime.Strip)` was
quoted, and thus attempted to execute `"strip -S" ...`, which failed.
Move the `-S` into a new `%(_MonoRuntime.StripFlags)` value.

Fixup `mono-runtimes.targets` and related files so that
`$(MonoSourceFullPath)` is used instead of a relative path. This helps
alleviate the "mental math" of determining the relative path to the
Mono checkout. Plus, the Mono checkout is supposed to be overridable,
e.g. commit d205cab, and using `$(MonoSourceFullPath)` supports that.

Download and install `android.jar` for all supported API levels.

Fix the `Mono.Android.csproj` build so that `Mono.Android.dll` is
stored in a per-API-level intermediate directory. Otherwise, if e.g.
API-10 is built after API-23, the API-23 version will be installed,
but the JCW build will fail. Additionally, API-24 requires using
`javac -source 1.8 -target 1.8`, not 1.6.

Fix `Mono.Android/metadata` to use the correct `merge.SourceFile`
filename of `Profiles/api-24.xml.in`. Without that fix, API-24 won't
build because `NumericShaper.GetContextualShaper()` is emitted twice,
and the C# compiler doesn't like that.

Disable use of `-lz` when building for Windows. Windows doesn't
contain a `Z.DLL` to link against.

[^0]: https://en.wikipedia.org/wiki/Leeroy_Jenkins
[^1]: https://www.youtube.com/watch?v=hooKVstzbz0
  • Loading branch information
jonpryor committed Jul 17, 2016
1 parent 70655d8 commit 474cd32
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 1,022,159 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ prepare::
cp Configuration.Java.Interop.Override.props external/Java.Interop/Configuration.Override.props
cp `$(MSBUILD) /nologo /v:minimal /t:GetMonoSourceFullPath build-tools/scripts/Paths.targets`/mcs/class/msfinal.pub .

include build-tools/scripts/BuildEverything.mk

ifeq ($(OS),Linux)
UBUNTU_DEPS = libzip4 curl openjdk-8-jdk git make automake autoconf libtool unzip vim-common clang lib32stdc++6 lib32z1
LINUX_DISTRO := $(shell lsb_release -i -s || true)
Expand Down
27 changes: 20 additions & 7 deletions Xamarin.Android.sln
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Global
Release|AnyCPU = Release|AnyCPU
XAIntegrationDebug|AnyCPU = XAIntegrationDebug|AnyCPU
XAIntegrationRelease|AnyCPU = XAIntegrationRelease|AnyCPU
XAIntegrationDebug|Any CPU = XAIntegrationDebug|Any CPU
XAIntegrationRelease|Any CPU = XAIntegrationRelease|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3F1F2F50-AF1A-4A5A-BEDB-193372F068D7}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -119,8 +121,8 @@ Global
{66CF299A-CE95-4131-BCD8-DB66E30C4BF7}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.ActiveCfg = Release|AnyCPU
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.Build.0 = Release|AnyCPU
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.Release|AnyCPU.Build.0 = Release|Any CPU
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.XAIntegrationDebug|Any CPU.ActiveCfg = Debug|Any CPU
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
{8FF78EB6-6FC8-46A7-8A15-EBBA9045C5FA}.XAIntegrationRelease|Any CPU.ActiveCfg = Debug|Any CPU
Expand All @@ -135,7 +137,6 @@ Global
{91713046-C358-4647-B162-ED4E1442F3D8}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.Release|AnyCPU.Build.0 = Release|Any CPU
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.XAIntegrationDebug|Any CPU.ActiveCfg = XAIntegrationDebug|Any CPU
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.XAIntegrationDebug|Any CPU.Build.0 = XAIntegrationDebug|Any CPU
{94BD81F7-B06F-4295-9636-F8A3B6BDC762}.XAIntegrationRelease|Any CPU.ActiveCfg = XAIntegrationRelease|Any CPU
Expand Down Expand Up @@ -182,16 +183,28 @@ Global
{8A6CB07C-E493-4A4F-AB94-038645A27118}.XAIntegrationRelease|AnyCPU.Build.0 = Debug|Any CPU
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{52C7D9B6-E8C8-47D0-9471-652D278D7D77}.Release|AnyCPU.Build.0 = Release|Any CPU
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}.Release|AnyCPU.Build.0 = Release|Any CPU
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{1268EADF-8344-431C-81F6-FCB7CBC99F49}.Release|AnyCPU.Build.0 = Release|Any CPU
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{07BC4495-1267-4B78-9EA6-B76FEEA2A64A}.Release|AnyCPU.Build.0 = Release|Any CPU
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870}.Release|AnyCPU.Build.0 = Release|Any CPU
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD}.Release|AnyCPU.Build.0 = Release|Any CPU
{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{C03E6CF1-7460-4CDC-A4AB-292BBC0F61F2}.Release|AnyCPU.ActiveCfg = Release|Any CPU
Expand All @@ -218,8 +231,8 @@ Global
{D27AD8F7-7710-40BE-B03B-55EFBEC13C44}.XAIntegrationRelease|Any CPU.Build.0 = Debug|Any CPU
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.ActiveCfg = Release|AnyCPU
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.Build.0 = Release|AnyCPU
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.Release|AnyCPU.Build.0 = Release|Any CPU
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.XAIntegrationDebug|Any CPU.ActiveCfg = Debug|Any CPU
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
{E8492EFB-D14A-4F32-AA28-88848322ECEA}.XAIntegrationRelease|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -366,8 +379,8 @@ Global
{5EB9E888-E357-417E-9F39-DDEC195CE47F}.XAIntegrationRelease|AnyCPU.Build.0 = Debug|Any CPU
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.ActiveCfg = Debug|Any CPU
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.Build.0 = Debug|Any CPU
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.Release|AnyCPU.Build.0 = Release|Any CPU
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.XAIntegrationDebug|Any CPU.ActiveCfg = Debug|Any CPU
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.XAIntegrationDebug|Any CPU.Build.0 = Debug|Any CPU
{900A0F71-BAAD-417A-8D1A-8D330297CDD0}.XAIntegrationRelease|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down
40 changes: 38 additions & 2 deletions build-tools/android-toolchain/android-toolchain.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,50 @@
<HostOS>Darwin</HostOS>
<DestDir>tools</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="platform-24_r01.zip">
<AndroidSdkItem Include="android-2.3.3_r02-linux.zip">
<HostOS></HostOS>
<DestDir>platforms\android-24</DestDir>
<DestDir>platforms\android-10</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="android-15_r03.zip">
<HostOS></HostOS>
<DestDir>platforms\android-15</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="android-16_r04.zip">
<HostOS></HostOS>
<DestDir>platforms\android-16</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="android-17_r02.zip">
<HostOS></HostOS>
<DestDir>platforms\android-17</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="android-18_r02.zip">
<HostOS></HostOS>
<DestDir>platforms\android-18</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="android-19_r03.zip">
<HostOS></HostOS>
<DestDir>platforms\android-19</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="android-20_r02.zip">
<HostOS></HostOS>
<DestDir>platforms\android-20</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="android-21_r02.zip">
<HostOS></HostOS>
<DestDir>platforms\android-21</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="android-22_r02.zip">
<HostOS></HostOS>
<DestDir>platforms\android-22</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="android-23_r01.zip">
<HostOS></HostOS>
<DestDir>platforms\android-23</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="platform-24_r01.zip">
<HostOS></HostOS>
<DestDir>platforms\android-24</DestDir>
</AndroidSdkItem>
</ItemGroup>
<ItemGroup>
<_NdkToolchain Include="arm-linux-androideabi-clang" Condition="$(AndroidSupportedTargetJitAbisForConditionalChecks.Contains(':armeabi:')) Or $(AndroidSupportedTargetJitAbisForConditionalChecks.Contains(':armeabi-v7a:'))">
Expand Down
5 changes: 3 additions & 2 deletions build-tools/mono-runtimes/mono-runtimes.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<Objdump>$(AndroidMxeFullPath)\bin\x86_64-w64-mingw32.static-objdump</Objdump>
<RanLib>$(AndroidMxeFullPath)\bin\x86_64-w64-mingw32.static-ranlib</RanLib>
<Strip>$(AndroidMxeFullPath)\bin\x86_64-w64-mingw32.static-strip</Strip>
<ConfigureFlags>PATH="$PATH:$(AndroidMxeFullPath)\bin" --host=x86_64-w64-mingw32.static --target=x86_64-w64-mingw32.static --disable-boehm --enable-mcs-build=no --enable-nls=no --enable-maintainer-mode --with-monodroid --disable-llvm</ConfigureFlags>
<ConfigureFlags>PATH="$PATH:$(AndroidMxeFullPath)\bin" --host=x86_64-w64-mingw32.static --target=x86_64-w64-mingw32.static --disable-boehm --enable-mcs-build=no --enable-nls=no --enable-maintainer-mode --with-monodroid --disable-llvm ac_cv_header_zlib_h=no</ConfigureFlags>
<NativeLibraryExtension>dll</NativeLibraryExtension>
<OutputRuntimeFilename>libmonosgen-2.0</OutputRuntimeFilename>
<OutputProfilerFilename></OutputProfilerFilename>
Expand All @@ -133,7 +133,8 @@
<Ld>ld</Ld>
<LdFlags></LdFlags>
<RanLib>ranlib</RanLib>
<Strip>strip -S</Strip>
<Strip>strip</Strip>
<StripFlags>-S</StripFlags>
<ConfigureFlags>--enable-maintainer-mode --without-ikvm-native --with-monodroid --with-mcs-docs=no --disable-mono-debugger --with-profile2=no --with-profile4=no --with-profile4_5=yes --disable-boehm --enable-nls=no --disable-iconv</ConfigureFlags>
<OutputRuntimeFilename>libmonosgen-2.0</OutputRuntimeFilename>
<NativeLibraryExtension>dylib</NativeLibraryExtension>
Expand Down
19 changes: 10 additions & 9 deletions build-tools/mono-runtimes/mono-runtimes.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
<PropertyGroup>
<_SourceTopDir>..\..</_SourceTopDir>
<_BclFrameworkDir>$(OutputPath)\lib\xbuild-frameworks\MonoAndroid\v1.0</_BclFrameworkDir>
<_MonoPath>$(_SourceTopDir)\external\mono</_MonoPath>
<_MonoProfileDir>$(_MonoPath)\mcs\class\lib\monodroid</_MonoProfileDir>
</PropertyGroup>
<UsingTask AssemblyFile="$(_SourceTopDir)\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.GetNugetPackageBasePath" />
<Import Project="$(_SourceTopDir)\Configuration.props" />
<PropertyGroup>
<_MonoProfileDir>$(MonoSourceFullPath)\mcs\class\lib\monodroid</_MonoProfileDir>
</PropertyGroup>
<Import Project="mono-runtimes.props" />
<Import Project="mono-runtimes.projitems" />
<ItemGroup>
Expand Down Expand Up @@ -68,24 +69,24 @@
<Target Name="_SetAutogenShTimeToLastCommitTimestamp">
<Exec
Command="touch -m -t `git log -1 --format=%25cd --date=format-local:%25Y%25m%25d%25H%25M.%25S` autogen.sh"
WorkingDirectory="$(_MonoPath)"
WorkingDirectory="$(MonoSourceFullPath)"
/>
</Target>
<Target Name="_Autogen"
DependsOnTargets="_SetAutogenShTimeToLastCommitTimestamp"
Inputs="$(_MonoPath)\autogen.sh"
Outputs="$(_MonoPath)\configure">
Inputs="$(MonoSourceFullPath)\autogen.sh"
Outputs="$(MonoSourceFullPath)\configure">
<Exec
Command="NOCONFIGURE=1 ./autogen.sh"
WorkingDirectory="$(_MonoPath)"
WorkingDirectory="$(MonoSourceFullPath)"
/>
</Target>
<Target Name="_ConfigureRuntimes"
Inputs="$(_MonoPath)\configure"
Inputs="$(MonoSourceFullPath)\configure"
Outputs="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)\Makefile')">
<MakeDir Directories="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')" />
<Exec
Command="..\..\..\$(_MonoPath)\configure LDFLAGS=&quot;%(_MonoRuntime.LdFlags)&quot; CFLAGS=&quot;%(_MonoRuntime.CFlags)&quot; CXXFLAGS=&quot;%(_MonoRuntime.CxxFlags)&quot; CC=&quot;%(_MonoRuntime.Cc)&quot; CXX=&quot;%(_MonoRuntime.Cxx)&quot; CPP=&quot;%(_MonoRuntime.Cpp)&quot; CXXCPP=&quot;%(_MonoRuntime.CxxCpp)&quot; LD=&quot;%(_MonoRuntime.Ld)&quot; AR=&quot;%(_MonoRuntime.Ar)&quot; AS=&quot;%(_MonoRuntime.As)&quot; RANLIB=&quot;%(_MonoRuntime.RanLib)&quot; STRIP=&quot;%(_MonoRuntime.Strip)&quot; DLLTOOL=&quot;%(_MonoRuntime.DllTool)&quot; OBJDUMP=&quot;%(_MonoRuntime.Objdump)&quot; --cache-file=..\%(_MonoRuntime.Identity).config.cache %(_MonoRuntime.ConfigureFlags)"
Command="$(MonoSourceFullPath)\configure LDFLAGS=&quot;%(_MonoRuntime.LdFlags)&quot; CFLAGS=&quot;%(_MonoRuntime.CFlags)&quot; CXXFLAGS=&quot;%(_MonoRuntime.CxxFlags)&quot; CC=&quot;%(_MonoRuntime.Cc)&quot; CXX=&quot;%(_MonoRuntime.Cxx)&quot; CPP=&quot;%(_MonoRuntime.Cpp)&quot; CXXCPP=&quot;%(_MonoRuntime.CxxCpp)&quot; LD=&quot;%(_MonoRuntime.Ld)&quot; AR=&quot;%(_MonoRuntime.Ar)&quot; AS=&quot;%(_MonoRuntime.As)&quot; RANLIB=&quot;%(_MonoRuntime.RanLib)&quot; STRIP=&quot;%(_MonoRuntime.Strip)&quot; DLLTOOL=&quot;%(_MonoRuntime.DllTool)&quot; OBJDUMP=&quot;%(_MonoRuntime.Objdump)&quot; --cache-file=..\%(_MonoRuntime.Identity).config.cache %(_MonoRuntime.ConfigureFlags)"
WorkingDirectory="@(_MonoRuntime->'$(IntermediateOutputPath)\%(Identity)')"
/>
<Touch
Expand Down Expand Up @@ -137,7 +138,7 @@
/>
<Exec
Condition=" '$(Configuration)' != 'Debug' "
Command="&quot;%(_MonoRuntime.Strip)&quot; &quot;$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntimeFilename).%(NativeLibraryExtension)&quot;"
Command="&quot;%(_MonoRuntime.Strip)&quot; %(_MonoRuntime.StripFlags) &quot;$(OutputPath)\lib\xbuild\Xamarin\Android\lib\%(Identity)\%(OutputRuntimeFilename).%(NativeLibraryExtension)&quot;"
/>
<Touch
Files="@(_InstallRuntimesOutputs);@(_InstallUnstrippedRuntimeOutputs)"
Expand Down
62 changes: 62 additions & 0 deletions build-tools/scripts/BuildEverything.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# $(ALL_API_LEVELS) and $(ALL_FRAMEWORKS) must be kept in sync w/ each other
ALL_API_LEVELS = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# this was different when API Level 21 was "L". Same could happen in the future.
ALL_PLATFORM_IDS = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# supported api levels
ALL_FRAMEWORKS = _ _ _ _ _ _ _ _ _ v2.3 _ _ _ _ v4.0.3 v4.1 v4.2 v4.3 v4.4 v4.4.87 v5.0 v5.1 v6.0 v7.0
API_LEVELS = 10 15 16 17 18 19 20 21 22 23 24
STABLE_API_LEVELS = 10 15 16 17 18 19 20 21 22 23

FRAMEWORKS = $(foreach a, $(API_LEVELS), $(word $(a),$(ALL_FRAMEWORKS)))
STABLE_FRAMEWORKS = $(foreach a, $(STABLE_API_LEVELS), $(word $(a),$(ALL_FRAMEWORKS)))
PLATFORM_IDS = $(foreach a, $(API_LEVELS), $(word $(a),$(ALL_PLATFORM_IDS)))

ALL_JIT_ABIS = \
armeabi \
armeabi-v7a \
arm64-v8a \
x86 \
x86_64

ALL_HOST_ABIS = \
$(shell uname) \
mxe-Win64


_space :=
_space +=

# usage: $(call join-with,SEPARATOR,LIST)
# Joins elements of LISt with SEPARATOR.
join-with = $(subst $(_space),$(1),$(strip $(2)))


_MSBUILD_ARGS = \
/p:AndroidSupportedTargetJitAbis=$(call join-with,:,$(ALL_JIT_ABIS)) \
/p:AndroidSupportedHostJitAbis=$(call join-with,:,$(ALL_HOST_ABIS))

TASK_ASSEMBLIES = \
bin/Debug/lib/xbuild/Xamarin/Android/Xamarin.Android.Build.Tasks.dll \
bin/Release/lib/xbuild/Xamarin/Android/Xamarin.Android.Build.Tasks.dll

RUNTIME_LIBRARIES = \
$(ALL_JIT_ABIS:%=bin/Debug/lib/xbuild/Xamarin/Android/lib/%/libmonosgen-2.0.so) \
$(ALL_JIT_ABIS:%=bin/Release/lib/xbuild/Xamarin/Android/lib/%/libmonosgen-2.0.so)

FRAMEWORK_ASSEMBLIES = \
$(FRAMEWORKS:%=bin/Debug/lib/xbuild-frameworks/MonoAndroid/%/Mono.Android.dll) \
$(FRAMEWORKS:%=bin/Release/lib/xbuild-frameworks/MonoAndroid/%/Mono.Android.dll)

leeroy jenkins: prepare $(RUNTIME_LIBRARIES) $(TASK_ASSEMBLIES) $(FRAMEWORK_ASSEMBLIES)

$(TASK_ASSEMBLIES): bin/%/lib/xbuild/Xamarin/Android/Xamarin.Android.Build.Tasks.dll:
$(MSBUILD) /p:Configuration=$* $(_MSBUILD_ARGS)

$(FRAMEWORK_ASSEMBLIES):
$(foreach a, $(API_LEVELS), \
$(MSBUILD) src/Mono.Android/Mono.Android.csproj /p:Configuration=Debug $(_MSBUILD_ARGS) /p:AndroidApiLevel=$(a) /p:AndroidFrameworkVersion=$(word $(a), $(ALL_FRAMEWORKS)); \
$(MSBUILD) src/Mono.Android/Mono.Android.csproj /p:Configuration=Release $(_MSBUILD_ARGS) /p:AndroidApiLevel=$(a) /p:AndroidFrameworkVersion=$(word $(a), $(ALL_FRAMEWORKS)); )

$(RUNTIME_LIBRARIES):
$(MSBUILD) /p:Configuration=Debug $(_MSBUILD_ARGS)
$(MSBUILD) /p:Configuration=Release $(_MSBUILD_ARGS)
2 changes: 1 addition & 1 deletion external/Java.Interop
5 changes: 4 additions & 1 deletion src/Mono.Android/Mono.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,11 @@
<Import Project="$(JavaInteropFullPath)\src\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings.projitems" Label="Shared" Condition="Exists('$(JavaInteropFullPath)\src\Java.Interop.Tools.TypeNameMappings\Java.Interop.Tools.TypeNameMappings.projitems')" />
<Import Project="$(JavaInteropFullPath)\src\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems" Label="Shared" Condition="Exists('$(JavaInteropFullPath)\src\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.projitems')" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<IntermediateOutputPath>$(IntermediateOutputPath)android-$(AndroidApiLevel)\</IntermediateOutputPath>
</PropertyGroup>
<Import Project="Mono.Android.targets" />
<Import Project="$(IntermediateOutputPath)android-$(AndroidApiLevel)\Mono.Android.projitems" Condition="Exists('$(IntermediateOutputPath)android-$(AndroidApiLevel)\Mono.Android.projitems')" />
<Import Project="$(IntermediateOutputPath)mcw\Mono.Android.projitems" Condition="Exists('$(IntermediateOutputPath)mcw\Mono.Android.projitems')" />
<ItemGroup>
<ProjectReference Include="..\..\build-tools\api-merge\api-merge.csproj">
<Project>{3FC3E78B-F7D4-42EA-BBE8-4535DF42BFF8}</Project>
Expand Down
Loading

0 comments on commit 474cd32

Please sign in to comment.