-$(monoone_DATA) $(monotwo_DATA) $(monobins_DATA):
- @case "$@" in \
- mcs.exe) d=mcs ;; \
- mbas.exe) d=mbas ;; \
- monoresgen.exe) d=monoresgen ;; \
- ilasm.exe) d=ilasm ;; \
- cilc.exe) d=tools/cilc ;; \
- xsd.exe) d=tools/mono-xsd ;; \
- wsdl.exe) d=tools/wsdl ;; \
- genxs.exe) d=tools/genxs ;; \
- al.exe) d=tools/al ;; \
- disco.exe) d=tools/disco ;; \
- soapsuds.exe) d=tools/soapsuds ;; \
- sqlsharp.exe) d=tools/SqlSharp ;; \
- chktrust.exe) d=tools/security ;; \
- signcode.exe) d=tools/security ;; \
- MakeCert.exe) d=tools/security ;; \
- cert2spc.exe) d=tools/security ;; \
- certmgr.exe) d=tools/security ;; \
- secutil.exe) d=tools/security ;; \
- setreg.exe) d=tools/security ;; \
- sn.exe) d=tools/security ;; \
- monop.exe) d=tools/monop ;; \
- mono-find-provides.exe) d=tools/mono-rpm-helpers/mono-find-provides ;; \
- mono-find-requires.exe) d=tools/mono-rpm-helpers/mono-find-requires ;; \
- browsercaps-updater.exe) d=tools/browsercaps-updater ;; \
- gacutil.exe) d=tools/gacutil ;; \
- gmcs.exe) d=gmcs ;; \
- esac; \
- echo "test -f $(top_srcdir)/../mcs/$$d/$@" ; \
- test -f $(top_srcdir)/../mcs/$$d/$@ || exit 1 ; \
- echo "rm -f $(srcdir)/$@" ; \
- rm -f $(srcdir)/$@ ; \
- echo "cd $(srcdir) && $(LN_S) ../../mcs/$$d/$@ $@" ; \
- cd $(srcdir) && $(LN_S) ../../mcs/$$d/$@ $@
-
-copy_dlls:
- cp /nt/mono/mcs/class/*/*.dll .
-
-push_dlls:
- scp -o "Protocol 1" *.dll *.exe snapshot@mono-cvs.ximian.com:dlls
-
-cleanassemblies:
- find -name \*.dll -exec rm -vf {} \;
- find -name \*.exe -exec rm -vf {} \;
+# Use --compile-all as a poor man's PEVerify to detect invalid IL
+mcs-compileall: mono-wrapper wrapper-config
+ save_MONO_PATH=$$MONO_PATH; mcs_topdir=`cd $(mcs_topdir) && $(cur_dir_cmd)`; ok=:; \
+ for profile in $(build_profiles); do \
+ MONO_PATH="$$mcs_topdir/class/lib/$$profile$(PLATFORM_PATH_SEPARATOR)$$save_MONO_PATH"; export MONO_PATH; \
+ for i in $(mcs_topdir)/class/lib/$$profile/*.dll $(mcs_topdir)/class/lib/$$profile/*.exe $(mcs_topdir)/class/Microsoft.VisualBasic/fixup/$$profile/*.dll; do \
+ if ./mono-wrapper --compile-all $$i; then \
+ echo $$i verified OK; \
+ else \
+ echo $$i verification failed; ok=false; \
+ fi; done; done; \
+ $$ok
+
+check-local: mcs-compileall mcs-do-test-profiles
+ $(MAKE) $(test_select) mcs-do-run-test-profiles
+
+CLEANFILES = wrapper-config
+
+wrapper-config: ../data/config Makefile
+ d=`cd ../support && pwd`; \
+ sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@
+ if test -z "$(libgdiplus_loc)"; then :; else \
+ mv $@ $@t; \
+ sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@; \
+ rm -f $@t; \
+ fi
+
+$(tmpinst)/bin/mono: mono-wrapper wrapper-config
+ cp mono-wrapper $@
+
+$(tmpinst)/bin/mcs:
+ $(MAKE) test-support-file target=$@ file=class/lib/default/mcs.exe
+
+$(tmpinst)/bin/mbas:
+ $(MAKE) test-support-file target=$@ file=mbas/mbas.exe
+
+$(tmpinst)/bin/gmcs:
+ $(MAKE) test-support-file target=$@ file=gmcs/gmcs.exe
+
+$(tmpinst)/bin/ilasm:
+ $(MAKE) test-support-file target=$@ file=ilasm/ilasm.exe
+
+test-support-files:
+ $(mkinstalldirs) $(tmpinst)/bin
+ $(MAKE) $(TEST_SUPPORT_FILES)
+
+test-support-file:
+ echo '#! /bin/sh' > $(target)
+ r=`pwd`; m=`cd $(mcs_topdir) && pwd`; echo 'exec "'"$$r/mono-wrapper"'" "'"$$m/$(file)"'" "$$@"' >> $(target)
+ chmod +x $(target)
+
+$(tmpinst)/bin/pedump: $(srcdir)/Makefile.am
+ $(mkdir_p) $(@D)
+ (b=`pwd`; echo '#! /bin/sh'; echo 'exec "'"$$b/libtool"'" --mode=execute "'"$$b/mono/metadata/pedump"'" "$$@"') > $@
+ chmod +x $@
+
+# the 'cygnus' option also disables the default 'distdir:' target, which we _do_ want
+MYDISTFILES = $(DIST_COMMON)
+distdir: $(MYDISTFILES)
+ rm -fr $(distdir)
+ mkdir $(distdir)
+ test -z '$(MYDISTFILES)' || for file in ''$(MYDISTFILES); do \
+ cp -p $$file $(distdir) ; done
+ find $(distdir) -type f -exec chmod a+r {} ';'