3 BOOTSTRAP_MCS = $(EXTERNAL_MCS)
4 MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MCS)
6 PROFILE_MCS_FLAGS = -d:NET_1_1 -d:ONLY_1_1 -d:BOOTSTRAP_WITH_OLDLIB
11 .PHONY: profile-check do-profile-check
16 all-recursive: do-profile-check
17 clean-local: clean-profile
21 -rm -f $(PROFILE_CS) $(PROFILE_EXE) $(PROFILE_OUT)
23 PROFILE_CS = $(topdir)/build/deps/basic-profile-check.cs
24 PROFILE_EXE = $(PROFILE_CS:.cs=.exe)
25 PROFILE_OUT = $(PROFILE_CS:.cs=.out)
29 rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
30 $(MAKE) -s $(PROFILE_OUT) || ok=false; \
31 rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
32 if $$ok; then :; else \
33 echo "*** The compiler '$(EXTERNAL_MCS)' doesn't appear to be usable." 1>&2 ; \
34 if test -f $(topdir)/class/lib/monolite/mcs.exe; then \
35 echo "*** Falling back to using pre-compiled binaries. Be warned, this may not work." 1>&2 ; \
36 ( cd $(topdir)/jay && $(MAKE) ); \
37 ( cd $(topdir)/mcs && $(MAKE) PROFILE=basic cs-parser.cs ); \
38 ( cd $(topdir)/class/lib/monolite/ && cp *.exe *.dll ../basic ); \
39 case `ls -1t $(topdir)/class/lib/basic/mcs.exe $(topdir)/mcs/cs-parser.cs | sed 1q` in \
40 $(topdir)/class/lib/basic/mcs.exe) : ;; \
41 *) sleep 5; cp $(topdir)/class/lib/monolite/mcs.exe $(topdir)/class/lib/basic ;; \
44 echo "*** You need a C# compiler installed to build MCS. (make sure mcs works from the command line)" 1>&2 ; \
45 echo "*** Read INSTALL.txt for information on how to bootstrap a Mono installation." 1>&2 ; \
48 $(PROFILE_CS): $(topdir)/build/profiles/basic.make
49 echo 'class X { static int Main () { return 0; } }' > $@
51 $(PROFILE_EXE): $(PROFILE_CS)
52 $(EXTERNAL_MCS) /out:$@ $<
54 $(PROFILE_OUT): $(PROFILE_EXE)
55 $(EXTERNAL_RUNTIME) $< > $@ 2>&1