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)/class/lib/monolite/ && cp *.exe *.dll ../basic ); \
37 ( cd $(topdir)/jay && $(MAKE) ); ( cd $(topdir)/mcs && $(MAKE) PROFILE=basic cs-parser.cs ); \
38 touch $(topdir)/class/lib/basic/*; \
40 echo "*** You need a C# compiler installed to build MCS. (make sure mcs works from the command line)" 1>&2 ; \
41 echo "*** Read INSTALL.txt for information on how to bootstrap a Mono installation." 1>&2 ; \
44 $(PROFILE_CS): $(topdir)/build/profiles/basic.make
45 echo 'public class X { public static void Main () { System.Console.WriteLine ("OK"); } }' > $@
47 $(PROFILE_EXE): $(PROFILE_CS)
48 $(EXTERNAL_MCS) /out:$@ $<
50 $(PROFILE_OUT): $(PROFILE_EXE)
51 $(EXTERNAL_RUNTIME) $< > $@ 2>&1
52 set x `wc -l $@`; case $$2 in 1) :;; *) exit 1;; esac
53 grep '^OK$$' $@ > /dev/null