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 build_profiles = moonlight_raw
29 test_profiles = moonlight_raw
32 build_profiles = net_2_0 net_3_5
33 test_profiles = $(build_profiles)
36 build_profiles += moonlight_raw
37 test_profiles += moonlight_raw
41 build_profiles += net_4_0
42 #test_profiles += net_4_0
46 build_profiles += monodroid
50 build_profiles += monotouch
57 # The write check is to foil 'make distcheck'
58 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
59 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
60 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
63 install: install-exec install-data
66 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
67 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
75 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
77 ## mono --wapi=semdel will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
79 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
80 -./mono-wrapper --wapi=semdel
81 -rm -fr $(etctmp) $(tmpinst) .wapi
85 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/gmcs $(tmpinst)/bin/dmcs $(tmpinst)/bin/al2
87 # now a misnomer, but it'll go away soon enough.
91 test_select = ONLY_CENTUM_TESTS=yes
95 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
97 mcs-do-run-test-profiles: test-support-files
98 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' run-test-profiles
103 PLATFORM_PATH_SEPARATOR = :
105 cur_dir_cmd = cygpath -w -a .
106 PLATFORM_PATH_SEPARATOR = ;
110 PLATFORM_PATH_SEPARATOR = :
113 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
114 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
115 # Skip net 2.1 assemblies for now because of visibility problems
116 mcs-compileall: mono-wrapper etc/mono/config
117 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
118 for profile in $(test_profiles); do \
119 if [ "moonlight" = "$$profile" ]; then \
122 if [ "net_3_5" = "$$profile" ]; then \
123 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
125 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
128 for i in $(mcs_topdir)/class/lib/$$profile/*.{dll,exe}; do \
129 if [ ! -f $$i ] ; then \
132 if ./mono-wrapper --compile-all --verify-all --security=validil $$i; then \
133 echo $$i verified OK; \
135 echo $$i verification failed; ok=false; \
139 check-local: mcs-compileall mcs-do-test-profiles
140 $(MAKE) $(test_select) mcs-do-run-test-profiles
142 CLEANFILES = etc/mono/config
144 # depend on $(symlinks) to ensure 'etc/mono' directory exists
145 etc/mono/config: ../data/config Makefile $(symlinks)
146 d=`cd ../support && pwd`; \
147 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
148 if test -z "$(libgdiplus_loc)"; then :; else \
149 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
153 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
154 $(mkinstalldirs) $(tmpinst)/bin
157 $(tmpinst)/bin/gmcs: $(tmpinst)/bin/mono Makefile
158 echo '#! /bin/sh' > $@ ; \
159 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
160 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/gmcs.exe"'" "$$@"' >> $@ ; \
163 $(tmpinst)/bin/dmcs: $(tmpinst)/bin/mono Makefile
164 echo '#! /bin/sh' > $@ ; \
165 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
166 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_4_0/dmcs.exe"'" "$$@"' >> $@ ; \
169 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
170 echo '#! /bin/sh' > $@ ; \
171 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
172 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
175 $(tmpinst)/bin/al2: $(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/net_2_0/al.exe"'" "$$@"' >> $@ ; \
181 test-support-files: $(TEST_SUPPORT_FILES)
184 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
185 MYDISTFILES = $(DIST_COMMON)
186 distdir: $(MYDISTFILES)
189 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
190 cp -p $$file $(distdir) ; done
191 find $(distdir) -type f -exec chmod a+r {} ';'