-$(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 etc/mono/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; 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 = etc/mono/config
+
+# depend on $(symlinks) to ensure 'etc/mono' directory exists
+etc/mono/config: ../data/config Makefile $(symlinks)
+ d=`cd ../support && pwd`; \
+ sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
+ if test -z "$(libgdiplus_loc)"; then :; else \
+ sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
+ mv -f $@tt $@t; fi
+ mv -f $@t $@
+
+$(tmpinst)/bin/mono: mono-wrapper etc/mono/config
+ $(mkinstalldirs) $(tmpinst)/bin
+ cp mono-wrapper $@
+
+$(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
+ echo '#! /bin/sh' > $@ ; \
+ r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
+ echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/default/mcs.exe"'" "$$@"' >> $@ ; \
+ chmod +x $@
+
+$(tmpinst)/bin/gmcs: $(tmpinst)/bin/mono Makefile
+ echo '#! /bin/sh' > $@ ; \
+ r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
+ echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/net_2_0/gmcs.exe"'" "$$@"' >> $@ ; \
+ chmod +x $@
+
+$(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
+ echo '#! /bin/sh' > $@ ; \
+ r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
+ echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/ilasm/ilasm.exe"'" "$$@"' >> $@ ; \
+ chmod +x $@
+
+test-support-files: $(TEST_SUPPORT_FILES)
+ @:
+
+# 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 {} ';'