3 include ../build/rules.make
16 ifeq (basic, $(PROFILE))
17 LOCAL_MCS_FLAGS += -d:STATIC
19 PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/2.0
22 ifeq (net_2_0, $(PROFILE))
26 ifeq (2.1, $(FRAMEWORK_VERSION))
27 LOCAL_MCS_FLAGS += -d:SMCS_SOURCE
31 ifeq (4.0, $(FRAMEWORK_VERSION))
35 PROGRAM = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe
37 BUILT_SOURCES = cs-parser.cs
39 PROGRAM_COMPILE = $(BOOT_COMPILE)
41 CLEAN_FILES += y.output
43 # Use -cvt for parser debug version
44 %-parser.cs: %-parser.jay $(topdir)/jay/skeleton.cs
45 $(topdir)/jay/jay -cv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
48 KEEP_OUTPUT_FILE_COPY = yes
50 include ../build/executable.make
53 config_file=`basename $(PROGRAM) .exe`-$(PROFILE).input; \
54 echo $(thisdir):$$config_file >> $(topdir)/../mono/msvc/scripts/order; \
56 echo $(BOOTSTRAP_MCS); \
57 echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS); \
59 echo $(BUILT_SOURCES); \
61 echo $(response)) > $(topdir)/../mono/msvc/scripts/inputs/$$config_file
63 ifeq (basic, $(PROFILE))
65 $(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
66 $(INSTALL_BIN) $(PROGRAM) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
67 test ! -f $(PROGRAM).mdb || $(INSTALL_BIN) $(PROGRAM).mdb $(DESTDIR)$(PROGRAM_INSTALL_DIR)
71 # Below this line we have local targets used for testing and development
78 # This used to be called test, but that conflicts with the global
81 btest: mcs2.exe mcs3.exe
82 ls -l mcs2.exe mcs3.exe
85 $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
88 $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) ./mcs2.exe $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
91 wc -l $(BUILT_SOURCES) `cat $(sourcefile)`
94 rm -f mcs2.exe mcs3.exe
95 $(MAKE) USE_MCS_FLAGS="-d:NET_1_1 -d:ONLY_1_1" btest
97 # we need this because bash tries to use its own crappy timer
98 FRIENDLY_TIME = $(shell which time) -f'%U seconds'
103 @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs2.exe > /dev/null || (echo FAILED; exit 1)
106 @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs3.exe > /dev/null || (echo FAILED; exit 1)
111 @ rm -f ../class/lib/mscorlib.dll
112 @ cd ../class/corlib ; $(MAKE) BOOTSTRAP_MCS='$(FRIENDLY_TIME) mono $$(topdir)/class/lib/$(PROFILE)/mcs.exe' > /dev/null || (echo FAILED; exit 1)
117 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 /`
120 $(RUNTIME) $(RUNTIME_FLAGS) --profile=$(PROFILER) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:mcs2.exe $(BUILT_SOURCES) @$(response)
123 # quick hack target, to quickly develop the gmcs compiler
127 echo 'System.Console.WriteLine ("Hello");' | mono csharp.exe
128 echo -e 'using System;\nConsole.WriteLine ("hello");' | mono csharp.exe
129 echo -e '"foo" == "bar";' | mono csharp.exe
130 echo -e 'var a = 1;\na + 2;' | mono csharp.exe
131 echo -e 'int j;\nj = 1;' | mono csharp.exe
132 echo -e 'var a = new int[]{1,2,3};\nfrom x in a select x;' | mono csharp.exe
133 echo -e 'var a = from f in System.IO.Directory.GetFiles ("/tmp") where f == "passwd" select f;' | mono csharp.exe