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/1.0/machine.config: $(top_srcdir)/data/net_1_1/machine.config
16 etc/mono/2.0/machine.config: $(top_srcdir)/data/net_2_0/machine.config
17 etc/mono/2.0/web.config: $(top_srcdir)/data/net_2_0/web.config
18 etc/mono/browscap.ini: $(top_srcdir)/data/browscap.ini
19 etc/mono/2.0/Browsers/Compat.browser: $(top_srcdir)/data/net_2_0/Browsers/Compat.browser
20 etc/mono/4.0/machine.config: $(top_srcdir)/data/net_4_0/machine.config
21 etc/mono/4.0/web.config: $(top_srcdir)/data/net_4_0/web.config
24 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
26 SUPPORT_FILES = $(symlinks) mono-wrapper etc/mono/config
28 build_profiles = net_1_1
29 test_profiles = $(build_profiles)
32 build_profiles += net_2_0 net_3_5
33 test_profiles += net_2_0 net_3_5
37 build_profiles += net_4_0
38 #test_profiles += net_4_0
42 build_profiles += net_2_1_raw
43 test_profiles += net_2_1_raw
47 build_profiles += monotouch
52 # The write check is to foil 'make distcheck'
53 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
54 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
55 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
58 install: install-exec install-data
61 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
62 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
70 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
72 ## mono --wapi=semdel will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
74 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
75 -./mono-wrapper --wapi=semdel
76 -rm -fr $(etctmp) $(tmpinst) .wapi
80 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/bin/ilasm $(tmpinst)/bin/gmcs
82 # now a misnomer, but it'll go away soon enough.
86 test_select = ONLY_CENTUM_TESTS=yes
90 moon-do-build: test-support-files
91 cd $(top_builddir)/../moon/class && $(MAKE) all
98 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
100 mcs-do-run-test-profiles: test-support-files
101 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' run-test-profiles
106 PLATFORM_PATH_SEPARATOR = :
108 cur_dir_cmd = cygpath -w -a .
109 PLATFORM_PATH_SEPARATOR = ;
113 PLATFORM_PATH_SEPARATOR = :
116 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
117 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
118 # Skip net 2.1 assemblies for now because of visibility problems
119 mcs-compileall: mono-wrapper etc/mono/config
120 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
121 for profile in $(test_profiles); do \
122 if [ "net_2_1" = "$$profile" ]; then \
125 if [ "net_3_5" = "$$profile" ]; then \
126 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
128 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
131 for i in $(mcs_topdir)/class/lib/$$profile/*.{dll,exe}; do \
132 if [ ! -f $$i ] ; then \
135 if ./mono-wrapper --compile-all --verify-all --security=validil $$i; then \
136 echo $$i verified OK; \
138 echo $$i verification failed; ok=false; \
142 check-local: mcs-compileall mcs-do-test-profiles
143 $(MAKE) $(test_select) mcs-do-run-test-profiles
145 CLEANFILES = etc/mono/config
147 # depend on $(symlinks) to ensure 'etc/mono' directory exists
148 etc/mono/config: ../data/config Makefile $(symlinks)
149 d=`cd ../support && pwd`; \
150 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
151 if test -z "$(libgdiplus_loc)"; then :; else \
152 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
156 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
157 $(mkinstalldirs) $(tmpinst)/bin
160 $(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
161 echo '#! /bin/sh' > $@ ; \
162 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
163 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_1_1/mcs.exe"'" "$$@"' >> $@ ; \
166 $(tmpinst)/bin/gmcs: $(tmpinst)/bin/mono Makefile
167 echo '#! /bin/sh' > $@ ; \
168 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
169 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/gmcs.exe"'" "$$@"' >> $@ ; \
172 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
173 echo '#! /bin/sh' > $@ ; \
174 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
175 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
178 test-support-files: $(TEST_SUPPORT_FILES)
181 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
182 MYDISTFILES = $(DIST_COMMON)
183 distdir: $(MYDISTFILES)
186 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
187 cp -p $$file $(distdir) ; done
188 find $(distdir) -type f -exec chmod a+r {} ';'