X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2FMakefile;h=da6ea0cd9fe3fe73b0ee8bd6413b371b50e2091e;hb=109bb0350beed07567ae9d5e9aa26e0d37e05342;hp=217e9e8bb25c73b6f017e9db0c71fd04bd4a170d;hpb=eb122748b6568629025c17786f2c898a8dcb102b;p=mono.git diff --git a/mcs/mcs/Makefile b/mcs/mcs/Makefile index 217e9e8bb25..da6ea0cd9fe 100644 --- a/mcs/mcs/Makefile +++ b/mcs/mcs/Makefile @@ -9,36 +9,34 @@ EXTRA_DISTFILES = \ *cs-parser.jay \ *.sources \ generic.cs \ - linq.cs \ NOTES \ TODO \ gmcs.exe.config -GMCS_PROFILE := $(filter net_2_0_bootstrap net_2_0 net_2_1, $(PROFILE)) +ifeq (1.0, $(FRAMEWORK_VERSION)) +COMPILER_NAME = mcs +endif -ifdef GMCS_PROFILE - BUILT_SOURCES = gcs-parser.cs - LOCAL_MCS_FLAGS += -d:GMCS_SOURCE +ifeq (2.0, $(FRAMEWORK_VERSION)) +LOCAL_MCS_FLAGS += -d:GMCS_SOURCE +COMPILER_NAME = gmcs +endif - ifeq (net_2_1, $(PROFILE)) - INTERNAL_SMCS = $(INTERNAL_GMCS) - LOCAL_MCS_FLAGS += -nowarn:618 -noconfig -r:mscorlib -r:System.dll - PROGRAM = $(topdir)/class/lib/$(PROFILE)/smcs.exe - else - BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0_bootstrap/gmcs.exe $(DEBUG_FLAGS) - PROGRAM = $(topdir)/class/lib/$(PROFILE)/gmcs.exe - endif -else - BUILT_SOURCES = cs-parser.cs - PROGRAM = $(topdir)/class/lib/$(PROFILE)/mcs.exe +ifeq (2.1, $(FRAMEWORK_VERSION)) +LOCAL_MCS_FLAGS += -d:GMCS_SOURCE -d:SMCS_SOURCE +COMPILER_NAME = smcs endif +PROGRAM = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe + +BUILT_SOURCES = cs-parser.cs + PROGRAM_COMPILE = $(BOOT_COMPILE) CLEAN_FILES += y.output %-parser.cs: %-parser.jay $(topdir)/jay/skeleton.cs - $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@ + $(topdir)/jay/jay -cv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@ ifeq (net_2_0_bootstrap, $(PROFILE)) @@ -51,15 +49,9 @@ clean-local: clean-program clean-program: rm -f $(PROGRAM) $(PROGRAM).config -progdir = $(dir $(PROGRAM)) - -$(progdir)/.stamp: - $(MKINSTALLDIRS) $(@D) - touch $@ - -$(PROGRAM) $(PROGRAM).config: $(progdir)/.stamp +$(PROGRAM) $(PROGRAM).config: $(dir $(PROGRAM))/.stamp -$(PROGRAM): $(topdir)/class/lib/default/mcs.exe +$(PROGRAM): $(topdir)/class/lib/net_1_1/mcs.exe cp $< $@ $(PROGRAM).config: gmcs.exe.config @@ -69,9 +61,11 @@ else ifeq (net_2_0, $(PROFILE)) +BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0_bootstrap/gmcs.exe $(DEBUG_FLAGS) + clean-local: clean-net_2_0_bootstrap clean-net_2_0_bootstrap: - cd .. && $(MAKE) PROFILE=net_2_0_bootstrap clean + cd .. && $(MAKE) NO_DIR_CHECK=yes PROFILE=net_2_0_bootstrap clean bootstrap_libs = mscorlib.dll System.dll System.Xml.dll Mono.CompilerServices.SymbolWriter.dll bootstrap_libfiles = $(bootstrap_libs:%=$(topdir)/class/lib/net_2_0_bootstrap/%) @@ -80,7 +74,7 @@ $(bootstrap_libfiles): bootstrap-libs @: .PHONY: bootstrap-libs bootstrap-libs: - cd .. && $(MAKE) PROFILE=net_2_0_bootstrap all + cd .. && $(MAKE) NO_DIR_CHECK=yes PROFILE=net_2_0_bootstrap all $(PROGRAM): $(bootstrap_libfiles) endif @@ -90,6 +84,10 @@ KEEP_OUTPUT_FILE_COPY = yes include ../build/executable.make endif +# +# Below this line we have local targets used for testing and development +# + # Testing targets TIME = time @@ -132,8 +130,27 @@ do-corlib: PROFILER=default +do-gettext: + 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 /` + profile : $(PROGRAM) $(RUNTIME) $(RUNTIME_FLAGS) --profile=$(PROFILER) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:mcs2.exe $(BUILT_SOURCES) @$(response) +# +# quick hack target, to quickly develop the gmcs compiler +# Update manually. qh: - MONO_PATH="../class/lib/net_2_0_bootstrap:$MONO_PATH" /cvs/mono/runtime/mono-wrapper ../class/lib/net_2_0_bootstrap/gmcs.exe /codepage:65001 -d:GMCS_SOURCE -d:NET_1_1 -d:NET_2_0 -debug -target:exe -out:gmcs.exe gcs-parser.cs @gmcs.exe.sources + MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) ../class/lib/net_2_0/gmcs.exe /codepage:65001 -d:GMCS_SOURCE -d:NET_1_1 -d:NET_2_0 -debug -target:exe -out:gmcs.exe cs-parser.cs @gmcs.exe.sources + @ cp $(COMPILER_NAME).exe* $(topdir)/class/lib/$(PROFILE)/ + +q: cs-parser.cs qh + echo 'System.Console.WriteLine ("Hello");' | mono csharp.exe + echo -e 'using System;\nConsole.WriteLine ("hello");' | mono csharp.exe + echo -e '"foo" == "bar";' | mono csharp.exe + echo -e 'var a = 1;\na + 2;' | mono csharp.exe + echo -e 'int j;\nj = 1;' | mono csharp.exe + echo -e 'var a = new int[]{1,2,3};\nfrom x in a select x;' | mono csharp.exe + echo -e 'var a = from f in System.IO.Directory.GetFiles ("/tmp") where f == "passwd" select f;' | mono csharp.exe + + +