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