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
39 moon-do-build: $(SUPPORT_FILES)
40 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' all-profiles
43 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' clean-profiles
48 build_profiles += net_4_0
49 #test_profiles += net_4_0
53 build_profiles += monodroid
57 build_profiles += monotouch
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) 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/gmcs $(tmpinst)/bin/dmcs $(tmpinst)/bin/al2
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 2.1 assemblies for now because of visibility problems
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 [ "moonlight" = "$$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=validil $$i; then \
140 echo $$i verified OK; \
142 echo $$i verification failed; ok=false; \
146 check-local: mcs-compileall mcs-do-test-profiles
147 $(MAKE) $(test_select) mcs-do-run-test-profiles
149 CLEANFILES = etc/mono/config
151 # depend on $(symlinks) to ensure 'etc/mono' directory exists
152 etc/mono/config: ../data/config Makefile $(symlinks)
153 d=`cd ../support && pwd`; \
154 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
155 if test -z "$(libgdiplus_loc)"; then :; else \
156 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
160 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
161 $(mkinstalldirs) $(tmpinst)/bin
164 $(tmpinst)/bin/gmcs: $(tmpinst)/bin/mono Makefile
165 echo '#! /bin/sh' > $@ ; \
166 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
167 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/gmcs.exe"'" "$$@"' >> $@ ; \
170 $(tmpinst)/bin/dmcs: $(tmpinst)/bin/mono Makefile
171 echo '#! /bin/sh' > $@ ; \
172 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
173 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_4_0/dmcs.exe"'" "$$@"' >> $@ ; \
176 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
177 echo '#! /bin/sh' > $@ ; \
178 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
179 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
182 $(tmpinst)/bin/al2: $(tmpinst)/bin/mono Makefile
183 echo '#! /bin/sh' > $@ ; \
184 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
185 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/al.exe"'" "$$@"' >> $@ ; \
188 test-support-files: $(TEST_SUPPORT_FILES)
191 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
192 MYDISTFILES = $(DIST_COMMON)
193 distdir: $(MYDISTFILES)
196 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
197 cp -p $$file $(distdir) ; done
198 find $(distdir) -type f -exec chmod a+r {} ';'