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 += xammac xammac_net_4_5
64 build_profiles += orbis
67 test_profiles = $(build_profiles)
71 MAKE_FLAGS=$(if $(V),,--no-print-directory -s)
73 # The write check is to foil 'make distcheck'
74 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
75 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
76 cd $(mcs_topdir) && $(MAKE) $(MAKE_FLAGS) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
79 install: install-exec install-data
82 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
83 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
91 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
94 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
95 -rm -fr $(etctmp) $(tmpinst)
99 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/csc $(tmpinst)/bin/mcs $(tmpinst)/bin/al
101 mcs-do-test-profiles:
102 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
104 mcs-do-run-test-profiles: test-support-files
105 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' run-test-profiles
110 PLATFORM_PATH_SEPARATOR = :
112 cur_dir_cmd = cygpath -w -a .
113 PLATFORM_PATH_SEPARATOR = ;
117 PLATFORM_PATH_SEPARATOR = :
120 if INSTALL_TESTING_AOT_FULL
121 # ILASM.exe has features which a testing_aot_full runtime will not support.
122 # It is invoked with an external mono when used in the runtime.
123 # We skip it here because otherwise it will fail to verify.
124 TESTING_AOT_FULL_FILTER=grep -v ilasm
126 TESTING_AOT_FULL_FILTER=echo
129 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
130 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
131 # Skip binary_reference_assemblies because they contain metadata only
132 mcs-compileall: mono-wrapper etc/mono/config
133 export verifiable_files=`ls "$(mcs_topdir)/class/lib/$$profile/" | grep -E '\.(dll|exe)$$' | $(TESTING_AOT_FULL_FILTER)` ; \
134 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
135 for profile in $(test_profiles); do \
136 if [ "binary_reference_assemblies" = "$$profile" ]; then \
139 if [ "xbuild_12" = "$$profile" ]; then \
140 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_x$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
141 elif [ "xbuild_14" = "$$profile" ]; then \
142 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_x$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
144 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
147 for stub in $$verifiable_files; do \
148 i=$(mcs_topdir)/class/lib/$$profile/$$stub ; \
150 if [ ! -f $$i ] ; then \
153 if ./mono-wrapper --compile-all --verify-all --security=verifiable $$i; then \
154 echo $$i verified OK; \
156 echo $$i verification failed; ok=false; \
163 check-local: mcs-compileall mcs-do-test-profiles
164 $(MAKE) mcs-do-run-test-profiles
167 # Compile all mcs tests
168 test: mcs-do-test-profiles
170 CLEANFILES = etc/mono/config
172 # depend on $(symlinks) to ensure 'etc/mono' directory exists
173 etc/mono/config: ../data/config Makefile $(symlinks)
174 d=`cd ../support && pwd`; \
175 sed 's,target="$$mono_libdir/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
176 d=`cd ../mono/btls/build-shared && pwd`; \
177 sed 's,target="$$mono_libdir/libmono-btls-shared$(libsuffix)",target="'$$d'/libmono-btls-shared$(libsuffix)",' $@t > $@tt
178 if test -z "$(libgdiplus_loc)"; then :; else \
179 sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@tt > $@ttt; \
184 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
185 $(mkinstalldirs) $(tmpinst)/bin
188 $(tmpinst)/bin/csc: $(tmpinst)/bin/mono Makefile
189 echo '#! /bin/sh' > $@ ; \
190 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
191 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$(CSC)"'" "$$@"' >> $@ ; \
194 $(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
195 echo '#! /bin/sh' > $@ ; \
196 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
197 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(net_profile)/mcs.exe"'" "$$@"' >> $@ ; \
200 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
201 echo '#! /bin/sh' > $@ ; \
202 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
203 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
206 $(tmpinst)/bin/al: $(tmpinst)/bin/mono Makefile
207 echo '#! /bin/sh' > $@ ; \
208 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
209 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(net_profile)/al.exe"'" "$$@"' >> $@ ; \
212 test-support-files: $(TEST_SUPPORT_FILES)
215 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
216 MYDISTFILES = $(DIST_COMMON)
217 distdir: $(MYDISTFILES)
220 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
221 cp -p $$file $(distdir) ; done
222 find $(distdir) -type f -exec chmod a+r {} ';'