1 # hack to prevent 'check' from depending on 'all'
2 AUTOMAKE_OPTIONS = cygnus
6 noinst_SCRIPTS = mono-wrapper monodis-wrapper semdel-wrapper
9 symlinks = etc/mono/1.0/machine.config etc/mono/2.0/machine.config
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
15 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
17 SUPPORT_FILES = $(symlinks) mono-wrapper wrapper-config
19 # The write check is to foil 'make distcheck'
20 all-local: $(SUPPORT_FILES)
21 if test -w $(mcs_topdir); then :; else chmod -R +w $(mcs_topdir); fi
22 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' all-profiles
25 build_profiles = default net_2_0
27 build_profiles = default
31 install: install-exec install-data
34 install-exec: $(SUPPORT_FILES)
35 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) install-profiles
43 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' RUNTIME_HAS_CONSISTENT_GACDIR=yes prefix=$(prefix) uninstall-profiles
45 ## semdel-wrapper will probably not delete the semaphore if someone is crazy enough to do a 'make -j distclean' :-)
47 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' clean-profiles
49 -rm -fr $(etctmp) $(tmpinst) .wapi
52 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/bin/mbas $(tmpinst)/bin/ilasm $(tmpinst)/bin/gmcs
54 TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/bin/mbas $(tmpinst)/bin/ilasm
57 # now a misnomer, but it'll go away soon enough.
61 test_select = ONLY_CENTUM_TESTS=yes
65 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' test-profiles
67 mcs-do-run-test-profiles: test-support-files
68 d=`cd $(tmpinst) && pwd`; PATH=$$d/bin:$$PATH ; export PATH ; \
69 cd $(mcs_topdir) && $(MAKE) PROFILES='$(build_profiles)' run-test-profiles
72 cur_dir_cmd = cygpath -w -a .
73 PLATFORM_PATH_SEPARATOR = ;
76 PLATFORM_PATH_SEPARATOR = :
79 # Use --compile-all as a poor man's PEVerify to detect invalid IL
80 mcs-compileall: mono-wrapper wrapper-config
81 save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
82 for profile in $(build_profiles); do \
83 MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; export MONO_PATH; \
84 for i in $(mcs_topdir)/class/lib/$$profile/*.dll $(mcs_topdir)/class/lib/$$profile/*.exe $(mcs_topdir)/class/Microsoft.VisualBasic/fixup/$$profile/*.dll; do \
85 if ./mono-wrapper --compile-all $$i; then \
86 echo $$i verified OK; \
88 echo $$i verification failed; ok=false; \
92 check-local: mcs-compileall mcs-do-test-profiles
93 $(MAKE) $(test_select) mcs-do-run-test-profiles
95 CLEANFILES = wrapper-config
97 wrapper-config: ../data/config Makefile
98 d=`cd ../support && pwd`; \
99 sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@
100 if test -z "$(libgdiplus_loc)"; then :; else \
102 sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@; \
106 $(tmpinst)/bin/mono: mono-wrapper wrapper-config
110 $(MAKE) test-support-file target=$@ file=class/lib/default/mcs.exe
113 $(MAKE) test-support-file target=$@ file=mbas/mbas.exe
116 $(MAKE) test-support-file target=$@ file=gmcs/gmcs.exe
118 $(tmpinst)/bin/ilasm:
119 $(MAKE) test-support-file target=$@ file=ilasm/ilasm.exe
122 $(mkinstalldirs) $(tmpinst)/bin
123 $(MAKE) $(TEST_SUPPORT_FILES)
126 echo '#! /bin/sh' > $(target)
127 r=`pwd`; m=`cd $(mcs_topdir) && pwd`; echo 'exec "'"$$r/mono-wrapper"'" "'"$$m/$(file)"'" "$$@"' >> $(target)
130 $(tmpinst)/bin/pedump: $(srcdir)/Makefile.am
132 (b=`pwd`; echo '#! /bin/sh'; echo 'exec "'"$$b/libtool"'" --mode=execute "'"$$b/mono/metadata/pedump"'" "$$@"') > $@
135 # the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
136 MYDISTFILES = $(DIST_COMMON)
137 distdir: $(MYDISTFILES)
140 test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
141 cp -p $$file $(distdir) ; done
142 find $(distdir) -type f -exec chmod a+r {} ';'