[runtime] Replace mono_method_get_signature(_full) with the _checked variant.
[mono-project.git] / runtime / Makefile.am
blob7e5a019b82327daeef91eff2322b36b168ce450a
1 tmpinst = _tmpinst
3 noinst_SCRIPTS = mono-wrapper monodis-wrapper
5 etctmp = etc
6 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
8 if INSTALL_4_0
9 symlinks += etc/mono/4.0/machine.config etc/mono/4.0/web.config etc/mono/4.5/web.config etc/mono/4.5/machine.config etc/mono/4.0/Browsers/Compat.browser etc/mono/4.5/Browsers/Compat.browser
10 endif
12 etc/mono/2.0/machine.config: $(top_srcdir)/data/net_2_0/machine.config
13 etc/mono/2.0/web.config: $(top_srcdir)/data/net_2_0/web.config
14 etc/mono/browscap.ini: $(top_srcdir)/data/browscap.ini
15 etc/mono/2.0/Browsers/Compat.browser: $(top_srcdir)/data/Browsers/Compat.browser
16 etc/mono/4.0/Browsers/Compat.browser: $(top_srcdir)/data/Browsers/Compat.browser
17 etc/mono/4.5/Browsers/Compat.browser: $(top_srcdir)/data/Browsers/Compat.browser
18 etc/mono/4.0/machine.config: $(top_srcdir)/data/net_4_0/machine.config
19 etc/mono/4.0/web.config: $(top_srcdir)/data/net_4_0/web.config
20 etc/mono/4.5/machine.config: $(top_srcdir)/data/net_4_5/machine.config
21 etc/mono/4.5/web.config: $(top_srcdir)/data/net_4_5/web.config
23 $(symlinks):
24         cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
26 SUPPORT_FILES = $(symlinks) mono-wrapper etc/mono/config
28 if ONLY_MONOTOUCH
29 build_profiles = monotouch
30 else
31 if ONLY_XAMMAC
32 build_profiles = xammac
33 else
34 build_profiles = 
36 if INSTALL_2_0
37 build_profiles += net_2_0 net_3_5
38 al_profile = net_2_0
39 endif
41 if INSTALL_4_0
42 build_profiles += net_4_0
43 al_profile = net_4_0
44 endif
46 if INSTALL_4_5
47 build_profiles += net_4_5 xbuild_12 xbuild_14
48 al_profile = net_4_5
49 endif
51 if INSTALL_MONODROID
52 build_profiles += monodroid
53 endif
55 if INSTALL_MONOTOUCH
56 build_profiles += monotouch monotouch_runtime
57 endif
59 if INSTALL_XAMMAC
60 build_profiles += xammac
61 endif
63 test_profiles = $(build_profiles)
65 endif
66 endif
68 if BUILD_MCS
70 MAKE_FLAGS=$(if $(V),,--no-print-directory -s)
72 # The write check is to foil 'make distcheck'
73 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
74         if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
75         cd $(mcs_topdir) && $(MAKE) $(MAKE_FLAGS) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
77 # override automake
78 install: install-exec install-data
80 # override automake
81 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
82         cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
84 # override automake
85 install-data:
86         @:
88 # override automake
89 uninstall:
90         cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
92 ## mono --wapi=semdel will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
93 clean-local:
94         cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
95         -./mono-wrapper --wapi=semdel
96         -rm -fr $(etctmp) $(tmpinst) .wapi
98 endif BUILD_MCS
100 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/mcs $(tmpinst)/bin/gmcs $(tmpinst)/bin/dmcs $(tmpinst)/bin/al2 $(tmpinst)/bin/al
102 # now a misnomer, but it'll go away soon enough.
103 if ENABLE_NUNIT_TESTS
104 test_select =
105 else
106 test_select = ONLY_CENTUM_TESTS=yes
107 endif
109 mcs-do-test-profiles:
110         cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
112 mcs-do-run-test-profiles: test-support-files
113         cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' run-test-profiles
115 if HOST_WIN32
116 if CROSS_COMPILING
117 cur_dir_cmd = pwd
118 PLATFORM_PATH_SEPARATOR = :
119 else
120 cur_dir_cmd = cygpath -w -a .
121 PLATFORM_PATH_SEPARATOR = ;
122 endif
123 else
124 cur_dir_cmd = pwd
125 PLATFORM_PATH_SEPARATOR = :
126 endif
128 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
129 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
130 # Skip net 4.0 assemblies because the contain metadata only
131 mcs-compileall: mono-wrapper etc/mono/config
132         save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
133         for profile in $(test_profiles); do \
134           if [ "net_4_0" = "$$profile" ]; then \
135           continue; \
136       fi; \
137           if [ "net_3_5" = "$$profile" ]; then \
138                   MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
139           elif [ "xbuild_12" = "$$profile" ]; then \
140                   MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_5$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
141           elif [ "xbuild_14" = "$$profile" ]; then \
142                   MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_4_5$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
143           else \
144                   MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
145           fi; \
146           export MONO_PATH; \
147           for i in $(mcs_topdir)/class/lib/$$profile/*.{dll,exe}; do \
148                 if [ ! -f $$i ] ; then \
149                         continue ; \
150                 fi ;  \
151             if ./mono-wrapper --compile-all --verify-all --security=verifiable $$i; then \
152               echo $$i verified OK; \
153             else \
154               echo $$i verification failed; ok=false; \
155             fi; done; done; \
156         $$ok
158 if NACL_CODEGEN
159 check-local:
160 else
161 check-local: mcs-compileall mcs-do-test-profiles
162         $(MAKE) $(test_select) mcs-do-run-test-profiles
163 endif
165 # Compile all mcs tests
166 test: mcs-do-test-profiles
168 CLEANFILES = etc/mono/config
170 # depend on $(symlinks) to ensure 'etc/mono' directory exists
171 etc/mono/config: ../data/config Makefile $(symlinks)
172         d=`cd ../support && pwd`; \
173         sed 's,target="$(prefix)/$(reloc_libdir)/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
174         if test -z "$(libgdiplus_loc)"; then :; else \
175           sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@t > $@tt; \
176           mv -f $@tt $@t; fi
177         mv -f $@t $@
179 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
180         $(mkinstalldirs) $(tmpinst)/bin
181         cp mono-wrapper $@
183 $(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
184         echo '#! /bin/sh' > $@ ; \
185         r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
186         echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/build/mcs.exe"'" "$$@"' >> $@ ; \
187         chmod +x $@
189 $(tmpinst)/bin/gmcs: $(tmpinst)/bin/mono Makefile
190         echo '#! /bin/sh' > $@ ; \
191         r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
192         echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/build/mcs.exe -sdk:2"'" "$$@"' >> $@ ; \
193         chmod +x $@
195 $(tmpinst)/bin/dmcs: $(tmpinst)/bin/mono Makefile
196         echo '#! /bin/sh' > $@ ; \
197         r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
198         echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/build/mcs.exe -sdk:4"'" "$$@"' >> $@ ; \
199         chmod +x $@
201 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
202         echo '#! /bin/sh' > $@ ; \
203         r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
204         echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
205         chmod +x $@
207 $(tmpinst)/bin/al2: $(tmpinst)/bin/mono Makefile
208         echo '#! /bin/sh' > $@ ; \
209         r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
210         echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/al.exe"'" "$$@"' >> $@ ; \
211         chmod +x $@
213 $(tmpinst)/bin/al: $(tmpinst)/bin/mono Makefile
214         echo '#! /bin/sh' > $@ ; \
215         r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
216         echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(al_profile)/al.exe"'" "$$@"' >> $@ ; \
217         chmod +x $@
219 test-support-files: $(TEST_SUPPORT_FILES)
220         @:
222 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
223 MYDISTFILES = $(DIST_COMMON)
224 distdir: $(MYDISTFILES)
225         rm -fr $(distdir)
226         mkdir $(distdir)
227         test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
228           cp -p $$file $(distdir) ; done
229         find $(distdir) -type f -exec chmod a+r {} ';'