3 noinst_SCRIPTS = mono-wrapper monodis-wrapper
6 symlinks = etc/mono/1.0/machine.config etc/mono/2.0/machine.config etc/mono/2.0/web.config etc/mono/browscap.ini etc/mono/2.0/Browsers/Compat.browser
9 symlinks += etc/mono/4.0/machine.config etc/mono/4.0/web.config etc/mono/4.5/web.config etc/mono/4.5/machine.config etc/mono/4.0/Browsers/Compat.browser etc/mono/4.5/Browsers/Compat.browser
12 etc/mono/2.0/machine.config: $(top_srcdir)/data/net_2_0/machine.config
13 etc/mono/2.0/web.config: $(top_srcdir)/data/net_2_0/web.config
14 etc/mono/browscap.ini: $(top_srcdir)/data/browscap.ini
15 etc/mono/2.0/Browsers/Compat.browser: $(top_srcdir)/data/Browsers/Compat.browser
16 etc/mono/4.0/Browsers/Compat.browser: $(top_srcdir)/data/Browsers/Compat.browser
17 etc/mono/4.5/Browsers/Compat.browser: $(top_srcdir)/data/Browsers/Compat.browser
18 etc/mono/4.0/machine.config: $(top_srcdir)/data/net_4_0/machine.config
19 etc/mono/4.0/web.config: $(top_srcdir)/data/net_4_0/web.config
20 etc/mono/4.5/machine.config: $(top_srcdir)/data/net_4_5/machine.config
21 etc/mono/4.5/web.config: $(top_srcdir)/data/net_4_5/web.config
24 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
26 SUPPORT_FILES = $(symlinks) mono-wrapper etc/mono/config
31 build_profiles += binary_reference_assemblies net_4_x xbuild_12 xbuild_14
36 build_profiles += monodroid
40 build_profiles += monotouch monotouch_runtime
43 if INSTALL_MONOTOUCH_WATCH
44 build_profiles += monotouch_watch monotouch_watch_runtime
47 if INSTALL_MONOTOUCH_TV
48 build_profiles += monotouch_tv monotouch_tv_runtime
51 if INSTALL_TESTING_AOT_HYBRID
52 build_profiles += testing_aot_hybrid
55 if INSTALL_TESTING_AOT_FULL
56 build_profiles += testing_aot_full
60 build_profiles += winaot
64 build_profiles += xammac xammac_net_4_5
68 build_profiles += orbis
71 test_profiles = $(build_profiles)
75 MAKE_FLAGS=$(if $(V),,--no-print-directory -s)
77 # The write check is to foil 'make distcheck'
78 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
79 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
80 cd $(mcs_topdir) && $(MAKE) $(MAKE_FLAGS) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
83 install: install-exec install-data
86 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
87 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
95 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
98 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
99 -rm -fr $(etctmp) $(tmpinst)
103 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/csc $(tmpinst)/bin/mcs $(tmpinst)/bin/al
105 mcs-do-test-profiles:
106 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
108 mcs-do-run-test-profiles: test-support-files
109 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' run-test-profiles
114 PLATFORM_PATH_SEPARATOR = :
116 cur_dir_cmd = cygpath -w -a .
117 PLATFORM_PATH_SEPARATOR = ;
121 PLATFORM_PATH_SEPARATOR = :
125 # ILASM.exe has features which a testing_aot_full runtime will not support.
126 # It is invoked with an external mono when used in the runtime.
127 # We skip it here because otherwise it will fail to verify.
128 FULL_AOT_TESTS_FILTER=grep -v ilasm
130 FULL_AOT_TESTS_FILTER=echo
133 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
134 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
135 # Skip binary_reference_assemblies because they contain metadata only
136 mcs-compileall: mono-wrapper etc/mono/config
137 export verifiable_files=`ls "$(mcs_topdir)/class/lib/$$profile/" | grep -E '\.(dll|exe)$$' | $(FULL_AOT_TESTS_FILTER)` ; \
138 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
139 for profile in $(test_profiles); do \
140 if [ "binary_reference_assemblies" = "$$profile" ]; then \
143 if [ "xbuild_12" = "$$profile" ]; then \
144 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_x$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
145 elif [ "xbuild_14" = "$$profile" ]; then \
146 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_x$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
148 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
151 for stub in $$verifiable_files; do \
152 i=$(mcs_topdir)/class/lib/$$profile/$$stub ; \
154 if [ ! -f $$i ] ; then \
157 if ./mono-wrapper --compile-all --verify-all --security=verifiable $$i; then \
158 echo $$i verified OK; \
160 echo $$i verification failed; ok=false; \
167 check-local: mcs-compileall mcs-do-test-profiles
168 $(MAKE) mcs-do-run-test-profiles
171 # Compile all mcs tests
172 test: mcs-do-test-profiles
174 CLEANFILES = etc/mono/config
176 # depend on $(symlinks) to ensure 'etc/mono' directory exists
177 etc/mono/config: ../data/config Makefile $(symlinks)
178 d=`cd ../support && pwd`; \
179 sed 's,target="$$mono_libdir/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
180 d=`cd ../mono/btls/build-shared && pwd`; \
181 sed 's,target="$$mono_libdir/libmono-btls-shared$(libsuffix)",target="'$$d'/libmono-btls-shared$(libsuffix)",' $@t > $@tt
182 if test -z "$(libgdiplus_loc)"; then :; else \
183 sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@tt > $@ttt; \
188 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
189 $(mkinstalldirs) $(tmpinst)/bin
192 $(tmpinst)/bin/csc: $(tmpinst)/bin/mono Makefile
193 echo '#! /bin/sh' > $@ ; \
194 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
195 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$(CSC)"'" "$$@"' >> $@ ; \
198 $(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
199 echo '#! /bin/sh' > $@ ; \
200 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
201 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(net_profile)/mcs.exe"'" "$$@"' >> $@ ; \
204 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
205 echo '#! /bin/sh' > $@ ; \
206 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
207 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
210 $(tmpinst)/bin/al: $(tmpinst)/bin/mono Makefile
211 echo '#! /bin/sh' > $@ ; \
212 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
213 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(net_profile)/al.exe"'" "$$@"' >> $@ ; \
216 test-support-files: $(TEST_SUPPORT_FILES)
219 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
220 MYDISTFILES = $(DIST_COMMON)
221 distdir: $(MYDISTFILES)
224 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
225 cp -p $$file $(distdir) ; done
226 find $(distdir) -type f -exec chmod a+r {} ';'