1 # To produce a debugging parser, use the version that says "-cvt"
7 include ../build/rules.make
15 LIB_REFS = System System.Core System.Xml
17 ifeq (basic, $(PROFILE))
19 sourcefile = mcs.exe.sources
21 PROGRAM_USE_INTERMEDIATE_FILE = true
23 the_libdir = $(topdir)/class/lib/build/
24 LOCAL_MCS_FLAGS += -lib:$(topdir)/class/lib/build -debug
27 LOCAL_MCS_FLAGS += -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE -r:System.Core.dll -r:System.Xml.dll
29 ifndef NO_THREAD_ABORT
30 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
33 ifndef NO_PROCESS_START
34 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_PROCESS_START
37 LOCAL_MCS_FLAGS += $(REFERENCE_SOURCES_FLAGS)
39 PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/4.5
41 PROGRAM_COMPILE = $(BOOT_COMPILE)
43 BUILT_SOURCES = cs-parser.cs
45 CLEAN_FILES += y.output
47 %-parser.cs: %-parser.jay $(topdir)/jay/skeleton.cs
48 $(topdir)/jay/jay $(JAY_FLAGS) < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
50 KEEP_OUTPUT_FILE_COPY = yes
52 include ../build/executable.make
55 # Below this line we have local targets used for testing and development
62 # This used to be called test, but that conflicts with the global
65 btest: mcs2.exe mcs3.exe
66 ls -l mcs2.exe mcs3.exe
69 $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
72 $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) ./mcs2.exe $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
75 wc -l $(BUILT_SOURCES) `cat $(sourcefile)`
77 # we need this because bash tries to use its own crappy timer
78 FRIENDLY_TIME = $(shell which time) -f'%U seconds'
83 @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs2.exe > /dev/null || (echo FAILED; exit 1)
86 @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs3.exe > /dev/null || (echo FAILED; exit 1)
91 @ rm -f ../class/lib/mscorlib.dll
92 @ cd ../class/corlib ; $(MAKE) BOOTSTRAP_MCS='$(FRIENDLY_TIME) mono $$(topdir)/class/lib/$(PROFILE)/mcs.exe' > /dev/null || (echo FAILED; exit 1)
97 xgettext --keyword='Report.Error:3' --keyword='Report.Error:2' --keyword='Report.Warning:3' --keyword='Report.Warning:2' -o mcs.po --language='C#' `cat gmcs.exe.sources | grep -v /`
100 $(RUNTIME) $(RUNTIME_FLAGS) --profile=$(PROFILER) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:mcs2.exe $(BUILT_SOURCES) @$(response)
104 $(MAKE) JAY_FLAGS=-cvt
107 # quick hack target, to quickly develop the gmcs compiler
111 echo 'System.Console.WriteLine ("Hello");' | mono csharp.exe
112 echo -e 'using System;\nConsole.WriteLine ("hello");' | mono csharp.exe
113 echo -e '"foo" == "bar";' | mono csharp.exe
114 echo -e 'var a = 1;\na + 2;' | mono csharp.exe
115 echo -e 'int j;\nj = 1;' | mono csharp.exe
116 echo -e 'var a = new int[]{1,2,3};\nfrom x in a select x;' | mono csharp.exe
117 echo -e 'var a = from f in System.IO.Directory.GetFiles ("/tmp") where f == "passwd" select f;' | mono csharp.exe