Răsfoiți Sursa

Integrate binary reference assemblies for v2.0/3.5 into the build system

Rename the net_4_0 profile which is already only used to trigger copying of reference assemblies
to binary_reference_assemblies and include the 2.0/3.5 files there. This should make it easier
to add more profiles in the future and doesn't clutter the build system as much as making separate
net_2_0 and net_3_5 profiles that do the same.
Alexander Köplinger 10 ani în urmă
părinte
comite
25f5d50737

+ 1 - 1
Makefile.am

@@ -52,7 +52,7 @@ dist-hook:
 	d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
 	rm -rf `find $(top_distdir)/external -path '*\.git'`
 	rm -f `find $(top_distdir)/external -path '*\.exe'`
-	rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/v4\.0*'`
+	rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*'`
 	cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
 	cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
 # Disable this for now because it is very slow and causes wrench to timeout:

+ 3 - 3
mcs/Makefile

@@ -12,7 +12,7 @@ monotouch_runtime_SUBDIRS := build class
 xammac_SUBDIRS := build class
 mobile_SUBDIRS := build class
 mobile_static_SUBDIRS := build class
-net_4_0_SUBDIRS := build class
+binary_reference_assemblies_SUBDIRS := build class
 net_4_5_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
 xbuild_12_SUBDIRS := build class tools/xbuild
 xbuild_14_SUBDIRS := build class tools/xbuild
@@ -30,7 +30,7 @@ dir-check:
 
 # fun specialty targets
 
-PROFILES = net_4_5 net_4_0 xbuild_12 xbuild_14
+PROFILES = net_4_5 binary_reference_assemblies xbuild_12 xbuild_14
 
 .PHONY: all-profiles $(STD_TARGETS:=-profiles)
 all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
@@ -51,7 +51,7 @@ profiles-do--run-test:
 _boot_ = all clean install
 $(_boot_:%=profile-do--xbuild_14--%):         profile-do--xbuild_14--%:         profile-do--net_4_5--%
 $(_boot_:%=profile-do--xbuild_12--%):         profile-do--xbuild_12--%:         profile-do--net_4_5--%
-$(_boot_:%=profile-do--net_4_0--%):           profile-do--net_4_0--%:           profile-do--build--%
+$(_boot_:%=profile-do--binary_reference_assemblies--%):           profile-do--binary_reference_assemblies--%:           profile-do--build--%
 $(_boot_:%=profile-do--net_4_5--%):           profile-do--net_4_5--%:           profile-do--build--%
 $(_boot_:%=profile-do--monodroid--%):         profile-do--monodroid--%:         profile-do--build--%
 $(_boot_:%=profile-do--monotouch--%):         profile-do--monotouch--%:         profile-do--build--%

+ 1 - 1
mcs/build/Makefile

@@ -18,7 +18,7 @@ PLATFORMS = darwin linux win32
 PROFILES = \
 	basic \
 	build \
-	net_4_0 \
+	binary_reference_assemblies \
 	net_4_5 \
 	xbuild_12 \
 	xbuild_14

+ 7 - 0
mcs/build/profiles/binary_reference_assemblies.make

@@ -0,0 +1,7 @@
+# -*- makefile -*-
+
+profile-check:
+	@:
+
+NO_BUILD = yes
+NO_TEST = yes

+ 0 - 12
mcs/build/profiles/net_4_0.make

@@ -1,12 +0,0 @@
-# -*- makefile -*-
-
-profile-check:
-	@:
-
-FRAMEWORK_VERSION = 4.0
-XBUILD_VERSION = 4.0
-
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
-
-NO_BUILD = yes
-NO_TEST = yes

+ 1 - 1
mcs/class/Makefile

@@ -223,7 +223,7 @@ monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
 mobile_static_SUBDIRS := $(mobile_static_dirs)
 mobile_SUBDIRS := $(mobile_dynamic_dirs)
 xammac_SUBDIRS := $(xammac_dirs)
-net_4_0_SUBDIRS := reference-assemblies
+binary_reference_assemblies_SUBDIRS := reference-assemblies
 net_4_5_SUBDIRS := $(net_4_5_dirs) $(xbuild_4_0_dirs)
 net_4_5_PARALLEL_SUBDIRS := $(net_4_5_parallel_dirs) aot-compiler
 xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)

+ 9 - 3
mcs/class/reference-assemblies/Makefile

@@ -4,10 +4,16 @@ include ../../build/rules.make
 
 all-local:
 
+PROFILE_DIR=$(DESTDIR)$(mono_libdir)/mono/
+
 install-local:
-	$(MKINSTALLDIRS) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
-	$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.0/* $(DESTDIR)$(LIBRARY_INSTALL_DIR)
+	$(MKINSTALLDIRS) $(PROFILE_DIR)/2.0
+	$(MKINSTALLDIRS) $(PROFILE_DIR)/3.5
+	$(MKINSTALLDIRS) $(PROFILE_DIR)/4.0
+	$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v2.0/* $(PROFILE_DIR)/2.0
+	$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v3.5/* $(PROFILE_DIR)/3.5
+	$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.0/* $(PROFILE_DIR)/4.0
 
-DISTFILES = $(wildcard ../../../external/binary-reference-assemblies/v4.0/*) Makefile
+DISTFILES = $(wildcard ../../../external/binary-reference-assemblies/v4.0/*) $(wildcard ../../../external/binary-reference-assemblies/v3.5/*) $(wildcard ../../../external/binary-reference-assemblies/v2.0/*) Makefile
 
 dist-local: dist-default

+ 4 - 0
mcs/tools/xbuild/Makefile

@@ -41,8 +41,12 @@ install-bin-data:
 install-frameworks:
 	$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v$(FRAMEWORK_VERSION)/RedistList
 	$(INSTALL_DATA) frameworks/net_$(FRAMEWORK_VERSION).xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v$(FRAMEWORK_VERSION)/RedistList/FrameworkList.xml
+	$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v2.0/RedistList
+	$(INSTALL_DATA) frameworks/net_2.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v2.0/RedistList/FrameworkList.xml
 	$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.0/RedistList
 	$(INSTALL_DATA) frameworks/net_3.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.0/RedistList/FrameworkList.xml
+	$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.5/RedistList
+	$(INSTALL_DATA) frameworks/net_3.5.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v3.5/RedistList/FrameworkList.xml
 	$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList
 	$(INSTALL_DATA) frameworks/net_4.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList/FrameworkList.xml
 	$(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList

+ 3 - 3
runtime/Makefile.am

@@ -34,7 +34,7 @@ else
 build_profiles = 
 
 if INSTALL_4_5
-build_profiles += net_4_0 net_4_5 xbuild_12 xbuild_14
+build_profiles += binary_reference_assemblies net_4_5 xbuild_12 xbuild_14
 al_profile = net_4_5
 endif
 
@@ -108,11 +108,11 @@ endif
 
 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
-# Skip net 4.0 assemblies because they contain metadata only
+# Skip binary_reference_assemblies because they contain metadata only
 mcs-compileall: mono-wrapper etc/mono/config
 	save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
 	for profile in $(test_profiles); do \
-	  if [ "net_4_0" = "$$profile" ]; then \
+	  if [ "binary_reference_assemblies" = "$$profile" ]; then \
           continue; \
       fi; \
 	  if [ "xbuild_12" = "$$profile" ]; then \