* profiles/basic.make (MCS): Run the INTERNAL_MCS.
[mono.git] / mcs / build / profiles / basic.make
1 # -*- makefile -*-
2
3 BOOTSTRAP_MCS = $(EXTERNAL_MCS)
4 MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(INTERNAL_MCS)
5
6 PROFILE_MCS_FLAGS = -d:NET_1_1 -d:ONLY_1_1 -d:BOOTSTRAP_WITH_OLDLIB
7 NO_SIGN_ASSEMBLY = yes
8 NO_TEST = yes
9 NO_INSTALL = yes
10
11 profile-check:
12         @:
13
14 ifeq (.,$(thisdir))
15 all-recursive: real-profile-check
16 endif
17
18 real-profile-check:
19         -rm -f basic-profile-check.cs basic-profile-check.exe
20         @ok=:; \
21         $$ok && echo 'class X { static void Main () { System.Console.Write("OK");}}' > basic-profile-check.cs; \
22         $$ok && { $(EXTERNAL_MCS) basic-profile-check.cs || ok=false; }; \
23         $$ok && { test -f basic-profile-check.exe || ok=false; }; \
24         $$ok && { $(EXTERNAL_RUNTIME) ./basic-profile-check.exe > /dev/null || ok=false; }; \
25         rm -f basic-profile-check.cs basic-profile-check.exe; \
26         if $$ok; then :; else \
27             echo "*** The compiler '$(EXTERNAL_MCS)' doesn't appear to be usable." 1>&2 ; \
28             if test -f $(topdir)/class/lib/basic.tar.gz; then \
29                 echo "*** Falling back to using pre-compiled binaries.  Be warned, this may not work." 1>&2 ; \
30                 ( cd $(topdir)/class/lib; gzip -dc basic.tar.gz | tar xvf - ); \
31                 ( cd $(topdir)/jay && $(MAKE) ); ( cd $(topdir)/mcs && $(MAKE) PROFILE=basic cs-parser.cs ); \
32                 touch $(topdir)/class/lib/basic/*; \
33             else \
34                 echo "*** You need a C# compiler installed to build MCS. (make sure mcs works from the command line)" 1>&2 ; \
35                 echo "*** Read INSTALL.txt for information on how to bootstrap a Mono installation." 1>&2 ; \
36                 exit 1; fi; fi
37
38 install-local: no-install
39 no-install:
40         exit 1