1 # hack to prevent 'check' from depending on 'all'
2 AUTOMAKE_OPTIONS = cygnus
6 noinst_SCRIPTS = mono-wrapper monodis-wrapper
9 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
12 symlinks += etc/mono/4.0/machine.config etc/mono/4.0/web.config
15 etc/mono/2.0/machine.config: $(top_srcdir)/data/net_2_0/machine.config
16 etc/mono/2.0/web.config: $(top_srcdir)/data/net_2_0/web.config
17 etc/mono/browscap.ini: $(top_srcdir)/data/browscap.ini
18 etc/mono/2.0/Browsers/Compat.browser: $(top_srcdir)/data/net_2_0/Browsers/Compat.browser
19 etc/mono/4.0/machine.config: $(top_srcdir)/data/net_4_0/machine.config
20 etc/mono/4.0/web.config: $(top_srcdir)/data/net_4_0/web.config
23 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
25 SUPPORT_FILES = $(symlinks) mono-wrapper etc/mono/config
28 moon-do-basic: Makefile $(SUPPORT_FILES)
29 cd $(mcs_topdir)/class/Mono.Cecil && $(MAKE) PROFILE=basic
30 cd $(mcs_topdir)/class/Mono.Cecil.Mdb && $(MAKE) PROFILE=basic
31 cd $(mcs_topdir)/tools/linker && $(MAKE) PROFILE=basic
32 cd $(mcs_topdir)/tools/tuner && $(MAKE) PROFILE=basic
35 cd $(mcs_topdir)/class/Mono.Cecil && $(MAKE) PROFILE=basic clean
36 cd $(mcs_topdir)/class/Mono.Cecil.Mdb && $(MAKE) PROFILE=basic clean
37 cd $(mcs_topdir)/tools/linker && $(MAKE) PROFILE=basic clean
38 cd $(mcs_topdir)/tools/tuner && $(MAKE) PROFILE=basic clean
42 build_profiles = moonlight_raw
43 test_profiles = moonlight_raw
46 build_profiles = net_2_0 net_3_5
47 test_profiles = $(build_profiles)
50 build_profiles += moonlight_raw
51 test_profiles += moonlight_raw
53 moon-do-moonlight-raw: Makefile $(SUPPORT_FILES)
54 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' all-profiles
56 moon-do-moonlight-raw-clean:
57 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' clean-profiles
59 moon-do-build: moon-do-moonlight-raw moon-do-basic
60 moon-do-clean: moon-do-moonlight-raw-clean moon-do-basic-clean
65 build_profiles += net_4_0
66 #test_profiles += net_4_0
70 build_profiles += monodroid
74 build_profiles += monotouch
81 # The write check is to foil 'make distcheck'
82 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
83 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
84 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
87 install: install-exec install-data
90 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
91 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
99 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
101 ## mono --wapi=semdel will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
103 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
104 -./mono-wrapper --wapi=semdel
105 -rm -fr $(etctmp) $(tmpinst) .wapi
109 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/gmcs $(tmpinst)/bin/dmcs $(tmpinst)/bin/al2 $(tmpinst)/bin/al
111 # now a misnomer, but it'll go away soon enough.
112 if ENABLE_NUNIT_TESTS
115 test_select = ONLY_CENTUM_TESTS=yes
118 mcs-do-test-profiles:
119 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
121 mcs-do-run-test-profiles: test-support-files
122 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' run-test-profiles
127 PLATFORM_PATH_SEPARATOR = :
129 cur_dir_cmd = cygpath -w -a .
130 PLATFORM_PATH_SEPARATOR = ;
134 PLATFORM_PATH_SEPARATOR = :
137 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
138 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
139 # Skip net 2.1 assemblies for now because of visibility problems
140 mcs-compileall: mono-wrapper etc/mono/config
141 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
142 for profile in $(test_profiles); do \
143 if [ "moonlight" = "$$profile" ]; then \
146 if [ "net_3_5" = "$$profile" ]; then \
147 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
149 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
152 for i in $(mcs_topdir)/class/lib/$$profile/*.{dll,exe}; do \
153 if [ ! -f $$i ] ; then \
156 if ./mono-wrapper --compile-all --verify-all --security=validil $$i; then \
157 echo $$i verified OK; \
159 echo $$i verification failed; ok=false; \
163 check-local: mcs-compileall mcs-do-test-profiles
164 $(MAKE) $(test_select) mcs-do-run-test-profiles
166 CLEANFILES = etc/mono/config
168 # depend on $(symlinks) to ensure 'etc/mono' directory exists
169 etc/mono/config: ../data/config Makefile $(symlinks)
170 d=`cd ../support && pwd`; \
171 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
172 if test -z "$(libgdiplus_loc)"; then :; else \
173 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
177 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
178 $(mkinstalldirs) $(tmpinst)/bin
181 $(tmpinst)/bin/gmcs: $(tmpinst)/bin/mono Makefile
182 echo '#! /bin/sh' > $@ ; \
183 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
184 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/gmcs.exe"'" "$$@"' >> $@ ; \
187 $(tmpinst)/bin/dmcs: $(tmpinst)/bin/mono Makefile
188 echo '#! /bin/sh' > $@ ; \
189 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
190 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_4_0/dmcs.exe"'" "$$@"' >> $@ ; \
193 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
194 echo '#! /bin/sh' > $@ ; \
195 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
196 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
199 $(tmpinst)/bin/al2: $(tmpinst)/bin/mono Makefile
200 echo '#! /bin/sh' > $@ ; \
201 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
202 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/al.exe"'" "$$@"' >> $@ ; \
205 $(tmpinst)/bin/al: $(tmpinst)/bin/mono Makefile
206 echo '#! /bin/sh' > $@ ; \
207 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
208 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_4_0/al.exe"'" "$$@"' >> $@ ; \
211 test-support-files: $(TEST_SUPPORT_FILES)
214 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
215 MYDISTFILES = $(DIST_COMMON)
216 distdir: $(MYDISTFILES)
219 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
220 cp -p $$file $(distdir) ; done
221 find $(distdir) -type f -exec chmod a+r {} ';'