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
31 build_profiles = net_2_0 net_3_5
32 test_profiles = $(build_profiles)
36 build_profiles += net_4_0
37 #test_profiles += net_4_0
41 build_profiles += monotouch
46 # The write check is to foil 'make distcheck'
47 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
48 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
49 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
52 install: install-exec install-data
55 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
56 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
64 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
66 ## mono --wapi=semdel will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
68 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
69 -./mono-wrapper --wapi=semdel
70 -rm -fr $(etctmp) $(tmpinst) .wapi
74 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/gmcs $(tmpinst)/bin/al2
76 # now a misnomer, but it'll go away soon enough.
80 test_select = ONLY_CENTUM_TESTS=yes
84 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
86 mcs-do-run-test-profiles: test-support-files
87 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' run-test-profiles
92 PLATFORM_PATH_SEPARATOR = :
94 cur_dir_cmd = cygpath -w -a .
95 PLATFORM_PATH_SEPARATOR = ;
99 PLATFORM_PATH_SEPARATOR = :
102 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
103 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
104 # Skip net 2.1 assemblies for now because of visibility problems
105 mcs-compileall: mono-wrapper etc/mono/config
106 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
107 for profile in $(test_profiles); do \
108 if [ "moonlight" = "$$profile" ]; then \
111 if [ "net_3_5" = "$$profile" ]; then \
112 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
114 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
117 for i in $(mcs_topdir)/class/lib/$$profile/*.{dll,exe}; do \
118 if [ ! -f $$i ] ; then \
121 if ./mono-wrapper --compile-all --verify-all --security=validil $$i; then \
122 echo $$i verified OK; \
124 echo $$i verification failed; ok=false; \
128 check-local: mcs-compileall mcs-do-test-profiles
129 $(MAKE) $(test_select) mcs-do-run-test-profiles
131 CLEANFILES = etc/mono/config
133 # depend on $(symlinks) to ensure 'etc/mono' directory exists
134 etc/mono/config: ../data/config Makefile $(symlinks)
135 d=`cd ../support && pwd`; \
136 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
137 if test -z "$(libgdiplus_loc)"; then :; else \
138 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
142 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
143 $(mkinstalldirs) $(tmpinst)/bin
146 $(tmpinst)/bin/gmcs: $(tmpinst)/bin/mono Makefile
147 echo '#! /bin/sh' > $@ ; \
148 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
149 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/gmcs.exe"'" "$$@"' >> $@ ; \
152 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
153 echo '#! /bin/sh' > $@ ; \
154 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
155 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
158 $(tmpinst)/bin/al2: $(tmpinst)/bin/mono Makefile
159 echo '#! /bin/sh' > $@ ; \
160 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
161 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/al.exe"'" "$$@"' >> $@ ; \
164 test-support-files: $(TEST_SUPPORT_FILES)
167 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
168 MYDISTFILES = $(DIST_COMMON)
169 distdir: $(MYDISTFILES)
172 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
173 cp -p $$file $(distdir) ; done
174 find $(distdir) -type f -exec chmod a+r {} ';'