Import changes from mainline
[mono.git] / mcs / gmcs / Makefile
1 thisdir := gmcs
2 SUBDIRS := 
3 include ../build/rules.make
4
5 COMPILER_SOURCES = \
6         AssemblyInfo.cs                 \
7         anonymous.cs                    \
8         assign.cs                       \
9         attribute.cs                    \
10         driver.cs                       \
11         cs-tokenizer.cs                 \
12         cfold.cs                        \
13         class.cs                        \
14         codegen.cs                      \
15         const.cs                        \
16         constant.cs                     \
17         convert.cs                      \
18         decl.cs                         \
19         delegate.cs                     \
20         enum.cs                         \
21         ecore.cs                        \
22         expression.cs                   \
23         flowanalysis.cs                 \
24         generic.cs                      \
25         interface.cs                    \
26         iterators.cs                    \
27         literal.cs                      \
28         location.cs                     \
29         modifiers.cs                    \
30         namespace.cs                    \
31         parameter.cs                    \
32         pending.cs                      \
33         report.cs                       \
34         rootcontext.cs                  \
35         statement.cs                    \
36         support.cs                      \
37         typemanager.cs                  \
38         symbolwriter.cs                 \
39         tree.cs
40
41 all_sources = $(COMPILER_SOURCES) cs-parser.cs
42
43 DISTFILES = \
44         $(COMPILER_SOURCES)     \
45         compiler.csproj         \
46         compiler.csproj.user    \
47         compiler.doc            \
48         compiler.sln            \
49         cs-parser.jay           \
50         mcs.exe.config          \
51         NOTES                   \
52         TODO
53
54 all-local: gmcs.exe
55
56 install-local: gmcs.exe
57         $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/bin
58         $(INSTALL_BIN) gmcs.exe $(DESTDIR)$(prefix)/bin
59
60 test-local run-test-local:
61
62 clean-local:
63         rm -f *.exe *.pdb cs-parser.cs y.output
64
65 dist-local: dist-default
66
67 gmcs.exe: $(all_sources)
68         $(BOOT_COMPILE) /target:exe /out:$@ $^
69
70 cs-parser.cs: cs-parser.jay $(topdir)/jay/skeleton.cs
71         $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< >$@
72
73 # Testing targets
74
75 TIME = 
76
77 # This used to be called test, but that conflicts with the global
78 # recursive target.
79
80 btest: mcs2.exe mcs3.exe
81         ls -l mcs2.exe mcs3.exe
82
83 mcs2.exe: gmcs.exe
84         $(TIME) $(RUNTIME) ./gmcs.exe $(USE_MCS_FLAGS) /target:exe /out:$@ $(all_sources)
85
86 mcs3.exe: mcs2.exe
87         $(TIME) $(RUNTIME) ./mcs2.exe $(USE_MCS_FLAGS) /target:exe /out:$@ $(all_sources)
88
89 response:
90         echo $(all_sources) > res