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
29 build_profiles = monotouch
34 build_profiles += net_2_0 net_3_5
39 build_profiles += net_4_0
44 build_profiles += net_4_5
49 build_profiles += monodroid
53 build_profiles += monotouch monotouch_runtime
56 test_profiles = $(build_profiles)
62 MAKE_FLAGS=$(if $(V),,--no-print-directory -s)
64 # The write check is to foil 'make distcheck'
65 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
66 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
67 cd $(mcs_topdir) && $(MAKE) $(MAKE_FLAGS) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
70 install: install-exec install-data
73 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
74 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
82 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
84 ## mono --wapi=semdel will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
86 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
87 -./mono-wrapper --wapi=semdel
88 -rm -fr $(etctmp) $(tmpinst) .wapi
92 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/mcs $(tmpinst)/bin/gmcs $(tmpinst)/bin/dmcs $(tmpinst)/bin/al2 $(tmpinst)/bin/al
94 # now a misnomer, but it'll go away soon enough.
98 test_select = ONLY_CENTUM_TESTS=yes
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 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
121 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
122 # Skip net 4.0 assemblies because the contain metadata only
123 mcs-compileall: mono-wrapper etc/mono/config
124 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
125 for profile in $(test_profiles); do \
126 if [ "net_4_0" = "$$profile" ]; then \
129 if [ "net_3_5" = "$$profile" ]; then \
130 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
132 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
135 for i in $(mcs_topdir)/class/lib/$$profile/*.{dll,exe}; do \
136 if [ ! -f $$i ] ; then \
139 if ./mono-wrapper --compile-all --verify-all --security=verifiable $$i; then \
140 echo $$i verified OK; \
142 echo $$i verification failed; ok=false; \
149 check-local: mcs-compileall mcs-do-test-profiles
150 $(MAKE) $(test_select) mcs-do-run-test-profiles
153 # Compile all mcs tests
154 test: mcs-do-test-profiles
156 CLEANFILES = etc/mono/config
158 # depend on $(symlinks) to ensure 'etc/mono' directory exists
159 etc/mono/config: ../data/config Makefile $(symlinks)
160 d=`cd ../support && pwd`; \
161 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
162 if test -z "$(libgdiplus_loc)"; then :; else \
163 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" os="!windows"/>,' $@t > $@tt; \
167 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
168 $(mkinstalldirs) $(tmpinst)/bin
171 $(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
172 echo '#! /bin/sh' > $@ ; \
173 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
174 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/build/mcs.exe"'" "$$@"' >> $@ ; \
177 $(tmpinst)/bin/gmcs: $(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 -sdk:2"'" "$$@"' >> $@ ; \
183 $(tmpinst)/bin/dmcs: $(tmpinst)/bin/mono Makefile
184 echo '#! /bin/sh' > $@ ; \
185 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
186 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/build/mcs.exe -sdk:4"'" "$$@"' >> $@ ; \
189 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
190 echo '#! /bin/sh' > $@ ; \
191 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
192 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
195 $(tmpinst)/bin/al2: $(tmpinst)/bin/mono Makefile
196 echo '#! /bin/sh' > $@ ; \
197 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
198 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/al.exe"'" "$$@"' >> $@ ; \
201 $(tmpinst)/bin/al: $(tmpinst)/bin/mono Makefile
202 echo '#! /bin/sh' > $@ ; \
203 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
204 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(al_profile)/al.exe"'" "$$@"' >> $@ ; \
207 test-support-files: $(TEST_SUPPORT_FILES)
210 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
211 MYDISTFILES = $(DIST_COMMON)
212 distdir: $(MYDISTFILES)
215 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
216 cp -p $$file $(distdir) ; done
217 find $(distdir) -type f -exec chmod a+r {} ';'