-# Build stripped down versions of 'mcs', 'mscorlib.dll' and 'System.dll' with installed 'mcs'
-## remove System.Xml.dll since it's a soft-dependency of System.dll
-stage1-mcs:
- rm -f $(mcs_topdir)/mcs/mcs.exe $(mcs_topdir)/class/lib/default/mscorlib.dll
- rm -f $(mcs_topdir)/class/lib/default/System.dll $(mcs_topdir)/class/lib/default/System.Xml.dll
- cd $(mcs_topdir)/jay && $(MAKE)
- cd $(mcs_topdir)/mcs && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
- cd $(mcs_topdir)/class/corlib && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
- cd $(mcs_topdir)/class/System && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB" MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
+bootstrap-clean: clean mcs-do-clean-profiles
+bootstrap-check: check mcs-do-run-test
+
+# building with monolite
+
+get-monolite-latest:
+ wget -O $(srcdir)/../monolite-latest.tar.gz http://www.go-mono.com/daily/monolite-latest.tar.gz
+
+monolite-bootstrap: tmpinst-monolite mono-do-runtime-only
+ rm -f $(MCS_FILES)
+ $(MAKE) tmpinst-mcs-short-build
+ $(MAKE) fasterstrap
+
+# internal targets
+
+tmpinst-mcs-basic-build: mcs-do-basic-build tmpinst-dir
+ mv -f $(MCS_BASIC_FILES) _tmpinst/lib
+
+tmpinst-mcs-short-build: mcs-do-short-build
+ mv -f $(MCS_FILES) _tmpinst/lib
+
+tmpinst-mcs-full-build: mcs-do-full-build
+ cp -f $(MCS_FILES) _tmpinst/lib
+
+tmpinst-monolite: tmpinst-dir
+ -rm -f _tmpinst/lib/mcs.exe _tmpinst/lib/*.dll
+ -rm -fr _tmpinst/monolite-*
+ srcdir=`cd $(srcdir) && pwd` && cd _tmpinst && ( gzip -d -c $$srcdir/../monolite-latest.tar.gz | tar xf - )
+ mv -f _tmpinst/monolite-*/mcs.exe _tmpinst/monolite-*/*.dll _tmpinst/lib
+ rm -fr _tmpinst/monolite-*