3 with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
4 with_mono_path_monolite = MONO_PATH="$(topdir)/class/lib/monolite$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
6 monolite_flag := $(depsdir)/use-monolite
7 use_monolite := $(wildcard $(monolite_flag))
10 PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
11 BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/monolite/mcs.exe
13 PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
14 BOOTSTRAP_MCS = $(EXTERNAL_MCS)
17 MCS = $(with_mono_path) $(INTERNAL_MCS)
19 PROFILE_MCS_FLAGS = -d:NET_1_1 -d:ONLY_1_1 -d:BOOTSTRAP_WITH_OLDLIB
20 NO_SIGN_ASSEMBLY = yes
23 FRAMEWORK_VERSION = 1.0
25 .PHONY: profile-check do-profile-check
30 all-recursive: do-profile-check
31 all-local: post-profile-cleanup
32 clean-local: clean-profile
36 -rm -f $(PROFILE_CS) $(PROFILE_EXE) $(PROFILE_OUT) $(monolite_flag)
39 @rm -f $(monolite_flag)
41 PROFILE_CS = $(depsdir)/basic-profile-check.cs
42 PROFILE_EXE = $(PROFILE_CS:.cs=.exe)
43 PROFILE_OUT = $(PROFILE_CS:.cs=.out)
47 rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
48 $(MAKE) -s $(PROFILE_OUT) > /dev/null || ok=false; \
49 rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
50 if $$ok; then :; else \
51 if test -f $(topdir)/class/lib/monolite/mcs.exe; then \
52 $(MAKE) -s do-profile-check-monolite ; \
54 echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
55 echo "*** You need a C# compiler installed to build MCS (make sure mcs works from the command line)" 1>&2 ; \
56 echo "*** Read INSTALL.txt for information on how to bootstrap a Mono installation." 1>&2 ; \
62 do-profile-check-monolite:
63 echo "*** The contents of your 'monolite' directory may be out-of-date" 1>&2
64 echo "*** You may want to try 'make get-monolite-latest'" 1>&2
65 rm -f $(monolite_flag)
70 do-profile-check-monolite: $(depsdir)/.stamp
71 echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2
72 echo "*** Trying the 'monolite' directory." 1>&2
73 echo dummy > $(monolite_flag)
74 $(MAKE) do-profile-check
78 $(PROFILE_CS): $(topdir)/build/profiles/basic.make $(depsdir)/.stamp
79 echo 'class X { static int Main () { return 0; } }' > $@
81 $(PROFILE_EXE): $(PROFILE_CS)
82 $(BOOTSTRAP_MCS) /out:$@ $<
84 $(PROFILE_OUT): $(PROFILE_EXE)
85 $(PROFILE_RUNTIME) $< > $@ 2>&1