This commit was manufactured by cvs2svn to create branch 'mono-1-0'.
[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         mcs.exe.config          \
13         NOTES                   \
14         TODO
15
16 PROGRAM = mcs.exe
17 PROGRAM_COMPILE = $(BOOT_COMPILE)
18 PROGRAM_INSTALL_DIR = $(prefix)/lib/mono/1.0
19
20 CLEAN_FILES = y.output
21
22 cs-parser.cs: cs-parser.jay $(topdir)/jay/skeleton.cs
23         $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
24
25 include ../build/executable.make
26
27 # Testing targets
28
29 TIME = time
30
31 # This used to be called test, but that conflicts with the global
32 # recursive target.
33
34 btest: mcs2.exe mcs3.exe
35         ls -l mcs2.exe mcs3.exe
36
37 mcs2.exe: mcs.exe
38         $(TIME) $(RUNTIME) ./mcs.exe $(USE_MCS_FLAGS) /target:exe /out:$@ $(BUILT_SOURCES) @$(response)
39
40 mcs3.exe: mcs2.exe
41         $(TIME) $(RUNTIME) ./mcs2.exe $(USE_MCS_FLAGS) /target:exe /out:$@ $(BUILT_SOURCES) @$(response)
42
43 wc:
44         wc -l $(BUILT_SOURCES) `cat $(sourcefile)`
45
46 ctest: 
47         rm -f mcs2.exe mcs3.exe
48         $(MAKE) USE_MCS_FLAGS= btest
49
50 # we need this because bash tries to use its own crappy timer
51 FRIENDLY_TIME = $(shell which time) -f'%U seconds'
52
53 do-time : mcs.exe
54         @ echo -n "Run 1:   "
55         @ rm -f mcs2.exe
56         @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs2.exe > /dev/null || (echo FAILED; exit 1)
57         @ echo -n "Run 2:   "
58         @ rm -f mcs3.exe
59         @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs3.exe > /dev/null || (echo FAILED; exit 1)
60         @ $(MAKE) do-corlib
61
62 do-corlib:
63         @ echo -n "corlib:  "
64         @ rm -f ../class/lib/mscorlib.dll
65         @ cd ../class/corlib ; $(MAKE) BOOTSTRAP_MCS="$(FRIENDLY_TIME) mono ../../mcs/mcs.exe" > /dev/null || (echo FAILED; exit 1)
66
67 PROFILER=default
68
69 profile : mcs.exe
70         $(RUNTIME) --profile=$(PROFILER) ./mcs.exe $(USE_MCS_FLAGS) /target:exe /out:mcs2.exe $(BUILT_SOURCES) @$(response)