* mcs/statement.cs (Foreach.ArrayForeach.Resolve): Set barrier after
[mono.git] / mcs / mcs / Makefile
1 thisdir := mcs
2 SUBDIRS := 
3 include ../build/rules.make
4
5 BUILT_SOURCES = cs-parser.cs
6
7 EXTRA_DISTFILES = \
8         compiler.csproj         \
9         compiler.doc            \
10         compiler.sln            \
11         cs-parser.jay           \
12         NOTES                   \
13         TODO
14
15 PROGRAM = $(topdir)/class/lib/$(PROFILE)/mcs.exe
16 PROGRAM_COMPILE = $(BOOT_COMPILE)
17
18 CLEAN_FILES = y.output *.exe *.mdb
19
20 cs-parser.cs: cs-parser.jay $(topdir)/jay/skeleton.cs
21         $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
22
23 include ../build/executable.make
24
25 ifeq (default, $(PROFILE))
26 # Utility rule to make debugging somewhat easier.
27 all-local: mcs.exe
28 mcs.exe: $(PROGRAM)
29         cp -p $< $@
30         test ! -f $<.mdb || cp -p $<.mdb $@.mdb
31 endif
32
33 # Testing targets
34
35 TIME = time
36
37 # This used to be called test, but that conflicts with the global
38 # recursive target.
39
40 btest: mcs2.exe mcs3.exe
41         ls -l mcs2.exe mcs3.exe
42
43 mcs2.exe: $(PROGRAM)
44         $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
45
46 mcs3.exe: mcs2.exe
47         $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) ./mcs2.exe $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
48
49 wc:
50         wc -l $(BUILT_SOURCES) `cat $(sourcefile)`
51
52 ctest: 
53         rm -f mcs2.exe mcs3.exe
54         $(MAKE) USE_MCS_FLAGS="-d:NET_1_1 -d:ONLY_1_1" btest
55
56 # we need this because bash tries to use its own crappy timer
57 FRIENDLY_TIME = $(shell which time) -f'%U seconds'
58
59 do-time : $(PROGRAM)
60         @ echo -n "Run 1:   "
61         @ rm -f mcs2.exe
62         @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs2.exe > /dev/null || (echo FAILED; exit 1)
63         @ echo -n "Run 2:   "
64         @ rm -f mcs3.exe
65         @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs3.exe > /dev/null || (echo FAILED; exit 1)
66         @ $(MAKE) do-corlib
67
68 do-corlib:
69         @ echo -n "corlib:  "
70         @ rm -f ../class/lib/mscorlib.dll
71         @ cd ../class/corlib ; $(MAKE) BOOTSTRAP_MCS='$(FRIENDLY_TIME) mono $$(topdir)/class/lib/$(PROFILE)/mcs.exe' > /dev/null || (echo FAILED; exit 1)
72
73 PROFILER=default
74
75 profile : $(PROGRAM)
76         $(RUNTIME) $(RUNTIME_FLAGS) --profile=$(PROFILER) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:mcs2.exe $(BUILT_SOURCES) @$(response)