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_MOBILE_STATIC
52 build_profiles += mobile_static
56 build_profiles += xammac xammac_net_4_5
59 test_profiles = $(build_profiles)
63 MAKE_FLAGS=$(if $(V),,--no-print-directory -s)
65 # The write check is to foil 'make distcheck'
66 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
67 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
68 cd $(mcs_topdir) && $(MAKE) $(MAKE_FLAGS) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
71 install: install-exec install-data
74 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
75 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
83 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
86 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
87 -rm -fr $(etctmp) $(tmpinst)
91 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/mcs $(tmpinst)/bin/al
94 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
96 mcs-do-run-test-profiles: test-support-files
97 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' run-test-profiles
102 PLATFORM_PATH_SEPARATOR = :
104 cur_dir_cmd = cygpath -w -a .
105 PLATFORM_PATH_SEPARATOR = ;
109 PLATFORM_PATH_SEPARATOR = :
112 if INSTALL_MOBILE_STATIC
113 # ILASM.exe has features which a mobile_static runtime will not support.
114 # It is invoked with an external mono when used in the runtime.
115 # We skip it here because otherwise it will fail to verify.
116 MOBILE_STATIC_FILTER=grep -v ilasm
118 MOBILE_STATIC_FILTER=echo
121 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
122 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
123 # Skip binary_reference_assemblies because they contain metadata only
124 mcs-compileall: mono-wrapper etc/mono/config
125 export verifiable_files=`ls "$(mcs_topdir)/class/lib/$$profile/" | grep -E '\.(dll|exe)$$' | $(MOBILE_STATIC_FILTER)` ; \
126 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
127 for profile in $(test_profiles); do \
128 if [ "binary_reference_assemblies" = "$$profile" ]; then \
131 if [ "xbuild_12" = "$$profile" ]; then \
132 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_x$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
133 elif [ "xbuild_14" = "$$profile" ]; then \
134 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_x$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
136 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
139 for stub in $$verifiable_files; do \
140 i=$(mcs_topdir)/class/lib/$$profile/$$stub ; \
142 if [ ! -f $$i ] ; then \
145 if ./mono-wrapper --compile-all --verify-all --security=verifiable $$i; then \
146 echo $$i verified OK; \
148 echo $$i verification failed; ok=false; \
155 check-local: mcs-compileall mcs-do-test-profiles
156 $(MAKE) mcs-do-run-test-profiles
159 # Compile all mcs tests
160 test: mcs-do-test-profiles
162 CLEANFILES = etc/mono/config
164 # depend on $(symlinks) to ensure 'etc/mono' directory exists
165 etc/mono/config: ../data/config Makefile $(symlinks)
166 d=`cd ../support && pwd`; \
167 sed 's,target="$$mono_libdir/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
168 if test -z "$(libgdiplus_loc)"; then :; else \
169 sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@t > $@tt; \
173 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
174 $(mkinstalldirs) $(tmpinst)/bin
177 $(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
178 echo '#! /bin/sh' > $@ ; \
179 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
180 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/build/mcs.exe"'" "$$@"' >> $@ ; \
183 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
184 echo '#! /bin/sh' > $@ ; \
185 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
186 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
189 $(tmpinst)/bin/al: $(tmpinst)/bin/mono Makefile
190 echo '#! /bin/sh' > $@ ; \
191 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
192 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(al_profile)/al.exe"'" "$$@"' >> $@ ; \
195 test-support-files: $(TEST_SUPPORT_FILES)
198 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
199 MYDISTFILES = $(DIST_COMMON)
200 distdir: $(MYDISTFILES)
203 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
204 cp -p $$file $(distdir) ; done
205 find $(distdir) -type f -exec chmod a+r {} ';'