diff --git a/Documentation/building/unix-instructions.md b/Documentation/building/unix-instructions.md index 2902456c485..1c9eac533dc 100644 --- a/Documentation/building/unix-instructions.md +++ b/Documentation/building/unix-instructions.md @@ -190,12 +190,6 @@ There are a few ways to do it: * Build all the platforms with: make framework-assemblies - - Note that `make framework-assemblies` builds `Mono.Android.dll` - for *both* Debug and Release configurations. To build only a - single configuration, set the `$(CONFIGURATIONS)` make variable: - - make framework-assemblies CONFIGURATIONS=Debug * Build several platforms other than the default diff --git a/Makefile b/Makefile index 5a8c8c01d00..e0fb94c3f9e 100644 --- a/Makefile +++ b/Makefile @@ -102,16 +102,13 @@ prepare-external: git submodule update --init --recursive nuget restore $(SOLUTION) nuget restore Xamarin.Android-Tests.sln - $(foreach conf, $(CONFIGURATIONS), \ - (cd external/xamarin-android-tools && make prepare CONFIGURATION=$(conf)) && \ - (cd $(call GetPath,JavaInterop) && make prepare CONFIGURATION=$(conf) JI_MAX_JDK=8) && \ - (cd $(call GetPath,JavaInterop) && make bin/Build$(conf)/JdkInfo.props CONFIGURATION=$(conf) JI_MAX_JDK=8) && ) \ - true + (cd external/xamarin-android-tools && make prepare CONFIGURATION=$(CONFIGURATION)) + (cd $(call GetPath,JavaInterop) && make prepare CONFIGURATION=$(CONFIGURATION) JI_MAX_JDK=8) + (cd $(call GetPath,JavaInterop) && make bin/Build$(CONFIGURATION)/JdkInfo.props CONFIGURATION=$(CONFIGURATION) JI_MAX_JDK=8) prepare-deps: prepare-external ./build-tools/scripts/generate-os-info Configuration.OperatingSystem.props - $(foreach conf, $(CONFIGURATIONS), \ - mkdir -p bin/Build$(conf) ; ) + mkdir -p bin/Build$(CONFIGURATION) $(call MSBUILD_BINLOG,prepare-deps) build-tools/dependencies/dependencies.csproj $(call MSBUILD_BINLOG,prepare-bundle) build-tools/download-bundle/download-bundle.csproj @@ -142,7 +139,7 @@ include tests/api-compatibility/api-compatibility.mk topdir := $(shell pwd) -XA_BUILD_PATHS_OUT = $(CONFIGURATIONS:%=bin/Test%/XABuildPaths.cs) +XA_BUILD_PATHS_OUT = bin/Test$(CONFIGURATION)/XABuildPaths.cs prepare-paths: $(XA_BUILD_PATHS_OUT) diff --git a/build-tools/scripts/BuildEverything.mk b/build-tools/scripts/BuildEverything.mk index 121f6521ed3..c4c127ff148 100644 --- a/build-tools/scripts/BuildEverything.mk +++ b/build-tools/scripts/BuildEverything.mk @@ -80,8 +80,6 @@ _MSBUILD_ARGS = \ /p:AndroidSupportedHostJitAbis=$(call join-with,:,$(ALL_HOST_ABIS)) \ /p:AndroidSupportedTargetAotAbis=$(call join-with,:,$(ALL_AOT_ABIS)) -CONFIGURATIONS ?= Debug Release - .PHONY: leeroy jenkins leeroy-all opentk-jcw framework-assemblies .PHONY: create-vsix @@ -90,50 +88,43 @@ jenkins: prepare leeroy $(ZIP_OUTPUT) leeroy: leeroy-all framework-assemblies opentk-jcw leeroy-all: - $(foreach conf, $(CONFIGURATIONS), \ - $(call MSBUILD_BINLOG,leeroy-all,$(_SLN_BUILD),$(conf)) $(SOLUTION) /p:Configuration=$(conf) $(_MSBUILD_ARGS) && \ - $(call CREATE_THIRD_PARTY_NOTICES,$(conf),bin/$(conf)/lib/xamarin.android/ThirdPartyNotices.txt,$(THIRD_PARTY_NOTICE_LICENSE_TYPE),True,False) && ) \ - true + $(call MSBUILD_BINLOG,leeroy-all,$(_SLN_BUILD),$(CONFIGURATION)) $(SOLUTION) /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS) && \ + $(call CREATE_THIRD_PARTY_NOTICES,$(CONFIGURATION),bin/$(CONFIGURATION)/lib/xamarin.android/ThirdPartyNotices.txt,$(THIRD_PARTY_NOTICE_LICENSE_TYPE),True,False) framework-assemblies: PREV_VERSION="v1.0"; \ $(foreach a, $(API_LEVELS), \ CUR_VERSION=`echo "$(ALL_FRAMEWORKS)"|tr -s " "|cut -d " " -s -f $(a)`; \ - $(foreach conf, $(CONFIGURATIONS), \ - REDIST_FILE=bin/$(conf)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/$${CUR_VERSION}/RedistList/FrameworkList.xml; \ - grep -q $${PREV_VERSION} $${REDIST_FILE}; \ - if [ $$? -ne 0 ] ; then \ - rm -f bin/$(conf)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/$${CUR_VERSION}/RedistList/FrameworkList.xml; \ - fi; \ - $(call MSBUILD_BINLOG,Mono.Android,$(_SLN_BUILD),$(conf)) src/Mono.Android/Mono.Android.csproj \ - /p:Configuration=$(conf) $(_MSBUILD_ARGS) \ - /p:AndroidApiLevel=$(a) /p:AndroidPlatformId=$(word $(a), $(ALL_PLATFORM_IDS)) /p:AndroidFrameworkVersion=$${CUR_VERSION} \ - /p:AndroidPreviousFrameworkVersion=$${PREV_VERSION} || exit 1; ) \ + REDIST_FILE=bin/$(CONFIGURATION)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/$${CUR_VERSION}/RedistList/FrameworkList.xml; \ + grep -q $${PREV_VERSION} $${REDIST_FILE}; \ + if [ $$? -ne 0 ] ; then \ + rm -f bin/$(CONFIGURATION)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/$${CUR_VERSION}/RedistList/FrameworkList.xml; \ + fi; \ + $(call MSBUILD_BINLOG,Mono.Android,$(_SLN_BUILD),$(CONFIGURATION)) src/Mono.Android/Mono.Android.csproj \ + /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS) \ + /p:AndroidApiLevel=$(a) /p:AndroidPlatformId=$(word $(a), $(ALL_PLATFORM_IDS)) /p:AndroidFrameworkVersion=$${CUR_VERSION} \ + /p:AndroidPreviousFrameworkVersion=$${PREV_VERSION} || exit 1; \ PREV_VERSION=$${CUR_VERSION}; ) - $(foreach conf, $(CONFIGURATIONS), \ - rm -f bin/$(conf)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/Xamarin.Android.NUnitLite.dll; \ - $(call MSBUILD_BINLOG,NUnitLite,$(_SLN_BUILD),$(conf)) $(MSBUILD_FLAGS) src/Xamarin.Android.NUnitLite/Xamarin.Android.NUnitLite.csproj \ - /p:Configuration=$(conf) $(_MSBUILD_ARGS) \ - /p:AndroidApiLevel=$(firstword $(API_LEVELS)) /p:AndroidPlatformId=$(word $(firstword $(API_LEVELS)), $(ALL_PLATFORM_IDS)) \ - /p:AndroidFrameworkVersion=$(firstword $(FRAMEWORKS)) || exit 1; ) + rm -f bin/$(CONFIGURATION)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/Xamarin.Android.NUnitLite.dll; \ + $(call MSBUILD_BINLOG,NUnitLite,$(_SLN_BUILD),$(CONFIGURATION)) $(MSBUILD_FLAGS) src/Xamarin.Android.NUnitLite/Xamarin.Android.NUnitLite.csproj \ + /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS) \ + /p:AndroidApiLevel=$(firstword $(API_LEVELS)) /p:AndroidPlatformId=$(word $(firstword $(API_LEVELS)), $(ALL_PLATFORM_IDS)) \ + /p:AndroidFrameworkVersion=$(firstword $(FRAMEWORKS)) || exit 1; _latest_stable_framework=$$($(MSBUILD) /p:DoNotLoadOSProperties=True /nologo /v:minimal /t:GetAndroidLatestStableFrameworkVersion build-tools/scripts/Info.targets | tr -d '[[:space:]]') ; \ - $(foreach conf, $(CONFIGURATIONS), \ - rm -f "bin/$(conf)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/$$_latest_stable_framework"/Mono.Android.Export.* ; \ - $(call MSBUILD_BINLOG,Mono.Android.Export,$(_SLN_BUILD),$(conf)) $(MSBUILD_FLAGS) src/Mono.Android.Export/Mono.Android.Export.csproj \ - /p:Configuration=$(conf) $(_MSBUILD_ARGS) \ - /p:AndroidApiLevel=$(firstword $(API_LEVELS)) /p:AndroidPlatformId=$(word $(firstword $(API_LEVELS)), $(ALL_PLATFORM_IDS)) \ - /p:AndroidFrameworkVersion=$(firstword $(FRAMEWORKS)) || exit 1; ) \ - $(foreach conf, $(CONFIGURATIONS), \ - rm -f "bin/$(conf)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/$$_latest_stable_framework"/OpenTK-1.0.* ; \ - $(call MSBUILD_BINLOG,OpenTK,$(_SLN_BUILD),$(conf)) $(MSBUILD_FLAGS) src/OpenTK-1.0/OpenTK.csproj \ - /p:Configuration=$(conf) $(_MSBUILD_ARGS) \ - /p:AndroidApiLevel=$(firstword $(API_LEVELS)) /p:AndroidPlatformId=$(word $(firstword $(API_LEVELS)), $(ALL_PLATFORM_IDS)) \ - /p:AndroidFrameworkVersion=$(firstword $(FRAMEWORKS)) || exit 1; ) + rm -f "bin/$(CONFIGURATION)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/$$_latest_stable_framework"/Mono.Android.Export.* ; \ + $(call MSBUILD_BINLOG,Mono.Android.Export,$(_SLN_BUILD),$(CONFIGURATION)) $(MSBUILD_FLAGS) src/Mono.Android.Export/Mono.Android.Export.csproj \ + /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS) \ + /p:AndroidApiLevel=$(firstword $(API_LEVELS)) /p:AndroidPlatformId=$(word $(firstword $(API_LEVELS)), $(ALL_PLATFORM_IDS)) \ + /p:AndroidFrameworkVersion=$(firstword $(FRAMEWORKS)) || exit 1; \ + rm -f "bin/$(CONFIGURATION)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/$$_latest_stable_framework"/OpenTK-1.0.* ; \ + $(call MSBUILD_BINLOG,OpenTK,$(_SLN_BUILD),$(CONFIGURATION)) $(MSBUILD_FLAGS) src/OpenTK-1.0/OpenTK.csproj \ + /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS) \ + /p:AndroidApiLevel=$(firstword $(API_LEVELS)) /p:AndroidPlatformId=$(word $(firstword $(API_LEVELS)), $(ALL_PLATFORM_IDS)) \ + /p:AndroidFrameworkVersion=$(firstword $(FRAMEWORKS)) || exit 1; opentk-jcw: $(foreach a, $(API_LEVELS), \ - $(foreach conf, $(CONFIGURATIONS), \ - touch bin/$(conf)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/*/OpenTK-1.0.dll; \ - $(call MSBUILD_BINLOG,OpenTK-JCW,$(_SLN_BUILD),$(conf)) $(MSBUILD_FLAGS) src/OpenTK-1.0/OpenTK.csproj \ - /t:GenerateJavaCallableWrappers /p:Configuration=$(conf) $(_MSBUILD_ARGS) \ - /p:AndroidApiLevel=$(a) /p:AndroidPlatformId=$(word $(a), $(ALL_PLATFORM_IDS)) /p:AndroidFrameworkVersion=$(word $(a), $(ALL_FRAMEWORKS)) || exit 1; )) + touch bin/$(CONFIGURATION)/lib/xamarin.android/xbuild-frameworks/MonoAndroid/*/OpenTK-1.0.dll; \ + $(call MSBUILD_BINLOG,OpenTK-JCW,$(_SLN_BUILD),$(CONFIGURATION)) $(MSBUILD_FLAGS) src/OpenTK-1.0/OpenTK.csproj \ + /t:GenerateJavaCallableWrappers /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS) \ + /p:AndroidApiLevel=$(a) /p:AndroidPlatformId=$(word $(a), $(ALL_PLATFORM_IDS)) /p:AndroidFrameworkVersion=$(word $(a), $(ALL_FRAMEWORKS)) || exit 1; ) diff --git a/build-tools/scripts/Packaging.mk b/build-tools/scripts/Packaging.mk index ec9ee2cebdb..d2336cb419a 100644 --- a/build-tools/scripts/Packaging.mk +++ b/build-tools/scripts/Packaging.mk @@ -7,18 +7,16 @@ _BUNDLE_ZIPS_EXCLUDE = \ $(ZIP_OUTPUT_BASENAME)/bin/*/bundle-*.zip create-vsix: - $(foreach conf, $(CONFIGURATIONS), \ - MONO_IOMAP=all MONO_OPTIONS="$(MONO_OPTIONS)" $(call MSBUILD_BINLOG,create-vsix) /p:Configuration=$(conf) /p:CreateVsixContainer=True \ - build-tools/create-vsix/create-vsix.csproj \ - $(if $(VSIX),"/p:VsixPath=$(VSIX)") \ - $(if $(EXPERIMENTAL),/p:IsExperimental="$(EXPERIMENTAL)") \ - $(if $(PRODUCT_COMPONENT),/p:IsProductComponent="$(PRODUCT_COMPONENT)") \ - $(if $(PACKAGE_VERSION),/p:ProductVersion="$(PACKAGE_VERSION)") \ - $(if $(REPO_NAME),/p:XARepositoryName="$(REPO_NAME)") \ - $(if $(PACKAGE_HEAD_BRANCH),/p:XAVersionBranch="$(PACKAGE_HEAD_BRANCH)") \ - $(if $(PACKAGE_VERSION_REV),/p:XAVersionCommitCount="$(PACKAGE_VERSION_REV)") \ - $(if $(COMMIT),/p:XAVersionHash="$(COMMIT)") && ) \ - true + MONO_IOMAP=all MONO_OPTIONS="$(MONO_OPTIONS)" $(call MSBUILD_BINLOG,create-vsix) /p:Configuration=$(CONFIGURATION) /p:CreateVsixContainer=True \ + build-tools/create-vsix/create-vsix.csproj \ + $(if $(VSIX),"/p:VsixPath=$(VSIX)") \ + $(if $(EXPERIMENTAL),/p:IsExperimental="$(EXPERIMENTAL)") \ + $(if $(PRODUCT_COMPONENT),/p:IsProductComponent="$(PRODUCT_COMPONENT)") \ + $(if $(PACKAGE_VERSION),/p:ProductVersion="$(PACKAGE_VERSION)") \ + $(if $(REPO_NAME),/p:XARepositoryName="$(REPO_NAME)") \ + $(if $(PACKAGE_HEAD_BRANCH),/p:XAVersionBranch="$(PACKAGE_HEAD_BRANCH)") \ + $(if $(PACKAGE_VERSION_REV),/p:XAVersionCommitCount="$(PACKAGE_VERSION_REV)") \ + $(if $(COMMIT),/p:XAVersionHash="$(COMMIT)") package-oss-name: @echo ZIP_OUTPUT=$(ZIP_OUTPUT) @@ -35,12 +33,10 @@ package-oss $(ZIP_OUTPUT): fi _exclude_list=".__exclude_list.txt"; \ ls -1d $(_BUNDLE_ZIPS_EXCLUDE) > "$$_exclude_list" 2>/dev/null ; \ - for c in $(CONFIGURATIONS) ; do \ - _sl="$(ZIP_OUTPUT_BASENAME)/bin/$$c/lib/xamarin.android/xbuild/.__sys_links.txt"; \ - if [ ! -f "$$_sl" ]; then continue; fi; \ - for f in `cat $$_sl` ; do \ - echo "$(ZIP_OUTPUT_BASENAME)/bin/$$c/lib/xamarin.android/xbuild/$$f" >> "$$_exclude_list"; \ - done; \ + _sl="$(ZIP_OUTPUT_BASENAME)/bin/$(CONFIGURATION)/lib/xamarin.android/xbuild/.__sys_links.txt"; \ + if [ ! -f "$$_sl" ]; then continue; fi; \ + for f in `cat $$_sl` ; do \ + echo "$(ZIP_OUTPUT_BASENAME)/bin/$CONFIGURATION/lib/xamarin.android/xbuild/$$f" >> "$$_exclude_list"; \ done echo "Exclude List:" cat ".__exclude_list.txt"