X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fgmcs%2FMakefile;h=ea5a1eb8826d647fb4a4293f5fc0de3cb45f4665;hb=e0d91b9b5de36805a1ec4b2b1fbe096185e40a2d;hp=72da6f3b6964f33e50d82957613e5175e66969db;hpb=17e12ece4b15c2a1b677ef6a4c7b71bff08b3354;p=mono.git diff --git a/mcs/gmcs/Makefile b/mcs/gmcs/Makefile index 72da6f3b696..ea5a1eb8826 100644 --- a/mcs/gmcs/Makefile +++ b/mcs/gmcs/Makefile @@ -2,91 +2,59 @@ thisdir := gmcs SUBDIRS := include ../build/rules.make -COMPILER_SOURCES = \ - AssemblyInfo.cs \ - anonymous.cs \ - assign.cs \ - attribute.cs \ - driver.cs \ - cs-tokenizer.cs \ - cfold.cs \ - class.cs \ - codegen.cs \ - const.cs \ - constant.cs \ - convert.cs \ - decl.cs \ - delegate.cs \ - enum.cs \ - ecore.cs \ - expression.cs \ - flowanalysis.cs \ - generic.cs \ - iterators.cs \ - literal.cs \ - location.cs \ - modifiers.cs \ - namespace.cs \ - parameter.cs \ - pending.cs \ - report.cs \ - rootcontext.cs \ - statement.cs \ - support.cs \ - typemanager.cs \ - symbolwriter.cs \ - tree.cs \ - CryptoConvert.cs \ - $(topdir)/class/Mono.CSharp.Debugger/MonoSymbolFile.cs \ - $(topdir)/class/Mono.CSharp.Debugger/MonoSymbolTable.cs \ - $(topdir)/class/Mono.CSharp.Debugger/MonoSymbolWriter.cs - -all_sources = $(COMPILER_SOURCES) cs-parser.cs - -DISTFILES = \ - $(COMPILER_SOURCES) \ - compiler.csproj \ - compiler.doc \ - compiler.sln \ - cs-parser.jay \ - gmcs.exe.config \ - NOTES \ - TODO #uncomment to enable some debug stuff #DEBUG_FLAGS=/define:MCS_DEBUG -all-local: gmcs.exe +LOCAL_MCS_FLAGS += -d:GMCS_SOURCE -install-local: gmcs.exe - $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib/mono/2.0 - $(INSTALL_BIN) gmcs.exe $(DESTDIR)$(prefix)/lib/mono/2.0 - $(INSTALL_DATA) gmcs.exe.config $(DESTDIR)$(prefix)/lib/mono/2.0 - $(INSTALL_DATA) gmcs.exe.mdb $(DESTDIR)$(prefix)/lib/mono/2.0 +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/mcs.exe $(DEBUG_FLAGS) -uninstall-local: - -rm -f $(DESTDIR)$(prefix)/bin/mcs.exe +BUILT_SOURCES = cs-parser.cs -test-local run-test-local: +EXTRA_DISTFILES = cs-parser.jay -clean-local: - rm -f *.exe *.pdb cs-parser.cs y.output *.mdb +PROGRAM = $(topdir)/class/lib/$(PROFILE)/gmcs.exe +PROGRAM_COMPILE = $(BOOT_COMPILE) -dist-local: dist-default +CLEAN_FILES = y.output *.exe *.mdb -gmcs.exe: $(all_sources) - MONO_PATH="../class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" mono ../mcs/mcs.exe $(DEBUG_FLAGS) -2 /target:exe /debug /out:$@ $^ +cs-parser.cs: cs-parser.jay $(topdir)/jay/skeleton.cs + $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@ -gmcs2.exe: $(all_sources) - MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time mcs -2 /target:exe /debug /out:$@ $^ $(DEBUG_FLAGS) +include ../build/executable.make -gmcs3.exe: $(all_sources) - MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time $(RUNTIME) ./gmcs2.exe $(USE_MCS_FLAGS) $(DEBUG_FLAGS) -2 /target:exe /debug /out:$@ $^ +ifeq (net_2_0, $(PROFILE)) +# Utility rule to make debugging somewhat easier. +all-local: gmcs.exe +gmcs.exe: $(PROGRAM) + cp -p $< $@ + test ! -f $<.mdb || cp -p $<.mdb $@.mdb +endif -gmcs4.exe: $(all_sources) - MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time $(RUNTIME) ./gmcs3.exe $(USE_MCS_FLAGS) $(DEBUG_FLAGS) -2 /target:exe /debug /out:$@ $^ +clean-local: clean-net_2_0_bootstrap +clean-net_2_0_bootstrap: + cd .. && $(MAKE) 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/%) + +$(bootstrap_libfiles): bootstrap-libs + @: +.PHONY: bootstrap-libs +bootstrap-libs: + cd .. && $(MAKE) PROFILE=net_2_0_bootstrap all + +$(PROGRAM): $(bootstrap_libfiles) + +gmcs2.exe: $(PROGRAM) + MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time $(RUNTIME) $(RUNTIME_FLAGS) $(PROGRAM) /target:exe /debug /out:$@ -d:GMCS_SOURCE -d:NET_1_1 -d:NET_2_0 cs-parser.cs @gmcs.exe.sources + +gmcs3.exe: gmcs2.exe + MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time $(RUNTIME) $(RUNTIME_FLAGS) ./gmcs2.exe /target:exe /debug /out:$@ -d:GMCS_SOURCE -d:NET_1_1 -d:NET_2_0 cs-parser.cs @gmcs.exe.sources + +gmcs4.exe: gmcs3.exe + MONO_PATH="../class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" time $(RUNTIME) $(RUNTIME_FLAGS) ./gmcs3.exe /target:exe /debug /out:$@ -d:GMCS_SOURCE -d:NET_1_1 -d:NET_2_0 cs-parser.cs @gmcs.exe.sources -cs-parser.cs: cs-parser.jay $(topdir)/jay/skeleton.cs - $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@ # Testing targets @@ -110,9 +78,9 @@ FRIENDLY_TIME = $(shell which time) -f'%U seconds' do-time : mcs.exe @ echo -n "Run 1: " - $(FRIENDLY_TIME) $(RUNTIME) ./mcs.exe $(USE_MCS_FLAGS) /target:exe /out:mcs2.exe $(all_sources) > /dev/null || (echo FAILED; exit 1) + $(FRIENDLY_TIME) $(RUNTIME) $(RUNTIME_FLAGS) ./mcs.exe $(USE_MCS_FLAGS) /target:exe /out:mcs2.exe $(all_sources) > /dev/null || (echo FAILED; exit 1) @ echo -n "Run 2: " - @ $(FRIENDLY_TIME) $(RUNTIME) ./mcs2.exe $(USE_MCS_FLAGS) /target:exe /out:mcs3.exe $(all_sources) > /dev/null || (echo FAILED; exit 1) + @ $(FRIENDLY_TIME) $(RUNTIME) $(RUNTIME_FLAGS) ./mcs2.exe $(USE_MCS_FLAGS) /target:exe /out:mcs3.exe $(all_sources) > /dev/null || (echo FAILED; exit 1) @ echo -n "corlib: " @ rm -f ../class/lib/mscorlib.dll @ (cd ../class/corlib ; make BOOTSTRAP_MCS="$(FRIENDLY_TIME) mono ../../mcs/mcs.exe" > /dev/null ) || (echo FAILED; exit 1) @@ -125,7 +93,15 @@ do-corlib: PROFILER=default profile : gmcs2.exe - make gmcs3.exe RUNTIME="$(RUNTIME) --profile" + -rm -f gmcs3.exe + make gmcs3.exe RUNTIME_FLAGS='--profile=$(PROFILER)' + +typetest: + mono gmcs.exe --typetest ../mcs/lambda.test + +l: + mono --debug gmcs.exe -langversion:linq l1.cs -response: - echo $(all_sources) > res +qh: + make cs-parser.cs + MONO_PATH="../class/lib/net_2_0_bootstrap:$MONO_PATH" /cvs/mono/runtime/mono-wrapper ../class/lib/net_2_0_bootstrap/mcs.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