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
11 etc/mono/1.0/machine.config: $(top_srcdir)/data/net_1_1/machine.config
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/net_2_0/Browsers/Compat.browser
18 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
20 SUPPORT_FILES = $(symlinks) mono-wrapper etc/mono/config
24 build_profiles = default net_2_0 net_3_5 net_2_1
26 build_profiles = default net_2_0 net_3_5
29 build_profiles = default
34 # The write check is to foil 'make distcheck'
35 all-local: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
36 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
37 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' CC='$(CC)' all-profiles
40 install: install-exec install-data
43 install-exec: $(SUPPORT_FILES) $(TEST_SUPPORT_FILES)
44 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
52 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
54 ## mono --wapi=semdel will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
56 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' clean-profiles
57 -./mono-wrapper --wapi=semdel
58 -rm -fr $(etctmp) $(tmpinst) .wapi
62 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/bin/ilasm $(tmpinst)/bin/gmcs
64 # now a misnomer, but it'll go away soon enough.
68 test_select = ONLY_CENTUM_TESTS=yes
72 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' test-profiles
74 mcs-do-run-test-profiles: test-support-files
75 cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(build_profiles)' run-test-profiles
78 cur_dir_cmd = cygpath -w -a .
79 PLATFORM_PATH_SEPARATOR = ;
82 PLATFORM_PATH_SEPARATOR = :
85 # Compile all assemblies with the verifier turned on. Code must be valid but not verifiable.
86 # TODO it would be nice to split assemblies without unsafe code to use the verifier with verifiable mode.
87 # Skip net 2.1 assemblies for now because of visibility problems
88 mcs-compileall: mono-wrapper etc/mono/config
89 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
90 for profile in $(build_profiles); do \
91 if [ "net_2_1" = "$$profile" ]; then \
94 if [ "net_3_5" = "$$profile" ]; then \
95 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$mcs_topdir/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
97 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; \
100 for i in $(mcs_topdir)/class/lib/$$profile/*.{dll,exe}; do \
101 if [ ! -f $$i ] ; then \
104 if ./mono-wrapper --compile-all --security=validil --verify-all $$i; then \
105 echo $$i verified OK; \
107 echo $$i verification failed; ok=false; \
111 check-local: mcs-compileall mcs-do-test-profiles
112 $(MAKE) $(test_select) mcs-do-run-test-profiles
114 CLEANFILES = etc/mono/config
116 # depend on $(symlinks) to ensure 'etc/mono' directory exists
117 etc/mono/config: ../data/config Makefile $(symlinks)
118 d=`cd ../support && pwd`; \
119 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
120 if test -z "$(libgdiplus_loc)"; then :; else \
121 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
125 $(tmpinst)/bin/mono: mono-wrapper etc/mono/config
126 $(mkinstalldirs) $(tmpinst)/bin
129 $(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
130 echo '#! /bin/sh' > $@ ; \
131 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
132 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/default/mcs.exe"'" "$$@"' >> $@ ; \
135 $(tmpinst)/bin/gmcs: $(tmpinst)/bin/mono Makefile
136 echo '#! /bin/sh' > $@ ; \
137 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
138 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/gmcs.exe"'" "$$@"' >> $@ ; \
141 $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
142 echo '#! /bin/sh' > $@ ; \
143 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
144 echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
147 test-support-files: $(TEST_SUPPORT_FILES)
150 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
151 MYDISTFILES = $(DIST_COMMON)
152 distdir: $(MYDISTFILES)
155 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
156 cp -p $$file $(distdir) ; done
157 find $(distdir) -type f -exec chmod a+r {} ';'