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)/ && $(MAKE) NO_DIR_CHECK=1 PROFILE=moonlight_raw
32 cd $(mcs_topdir)/ && $(MAKE) NO_DIR_CHECK=1 PROFILE=moonlight_raw clean
36 build_profiles = moonlight_raw
37 test_profiles = moonlight_raw
40 build_profiles = net_2_0 net_3_5
41 test_profiles = $(build_profiles)
44 build_profiles += moonlight_raw
45 test_profiles += moonlight_raw
47 moon-do-moonlight-raw: Makefile $(SUPPORT_FILES)
48 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' all-profiles
50 moon-do-moonlight-raw-clean:
51 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' clean-profiles
53 moon-do-build: moon-do-moonlight-raw moon-do-basic
54 moon-do-clean: moon-do-moonlight-raw-clean moon-do-basic-clean
59 build_profiles += net_4_0
60 #test_profiles += net_4_0
64 build_profiles += monodroid
68 build_profiles += monotouch
75 # The write check is to foil 'make distcheck'
76 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
77 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
78 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
81 install: install-exec install-data
84 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
85 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
93 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
95 ## mono --wapi=semdel will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
97 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
98 -./mono-wrapper --wapi=semdel
99 -rm -fr $(etctmp) $(tmpinst) .wapi
103 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/mcs $(tmpinst)/bin/gmcs $(tmpinst)/bin/dmcs $(tmpinst)/bin/al2 $(tmpinst)/bin/al
105 # now a misnomer, but it'll go away soon enough.
106 if ENABLE_NUNIT_TESTS
109 test_select = ONLY_CENTUM_TESTS=yes
112 mcs-do-test-profiles:
113 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
115 mcs-do-run-test-profiles: test-support-files
116 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' run-test-profiles
121 PLATFORM_PATH_SEPARATOR = :
123 cur_dir_cmd = cygpath -w -a .
124 PLATFORM_PATH_SEPARATOR = ;
128 PLATFORM_PATH_SEPARATOR = :
131 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
132 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
133 # Skip net 2.1 assemblies for now because of visibility problems
134 mcs-compileall: mono-wrapper etc/mono/config
135 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
136 for profile in $(test_profiles); do \
137 if [ "moonlight" = "$$profile" ]; then \
140 if [ "net_3_5" = "$$profile" ]; then \
141 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
143 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
146 for i in $(mcs_topdir)/class/lib/$$profile/*.{dll,exe}; do \
147 if [ ! -f $$i ] ; then \
150 if ./mono-wrapper --compile-all --verify-all --security=validil $$i; then \
151 echo $$i verified OK; \
153 echo $$i verification failed; ok=false; \
157 check-local: mcs-compileall mcs-do-test-profiles
158 $(MAKE) $(test_select) mcs-do-run-test-profiles
160 CLEANFILES = etc/mono/config
162 # depend on $(symlinks) to ensure 'etc/mono' directory exists
163 etc/mono/config: ../data/config Makefile $(symlinks)
164 d=`cd ../support && pwd`; \
165 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
166 if test -z "$(libgdiplus_loc)"; then :; else \
167 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
171 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
172 $(mkinstalldirs) $(tmpinst)/bin
175 $(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
176 echo '#! /bin/sh' > $@ ; \
177 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
178 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/build/mcs.exe"'" "$$@"' >> $@ ; \
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/build/mcs.exe -sdk:2"'" "$$@"' >> $@ ; \
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/build/mcs.exe -sdk:4"'" "$$@"' >> $@ ; \
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 {} ';'