X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2FMakefile;h=6b2e653609dc3e84dc3656b8aef03c96ee0c4332;hb=e0df8328d11d79623c1b0369cf15544b26a18db0;hp=abdfbbdc569755a2f349ec00dc54eb7202220b35;hpb=9b979541abfc56db1e68028deefc735ee9c88e74;p=mono.git diff --git a/mcs/mcs/Makefile b/mcs/mcs/Makefile index abdfbbdc569..6b2e653609d 100644 --- a/mcs/mcs/Makefile +++ b/mcs/mcs/Makefile @@ -2,76 +2,33 @@ thisdir := mcs 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 \ - genericparser.cs \ - interface.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 - -all_sources = $(COMPILER_SOURCES) cs-parser.cs - -DISTFILES = \ - $(COMPILER_SOURCES) \ +BUILT_SOURCES = cs-parser.cs + +EXTRA_DISTFILES = \ compiler.csproj \ - compiler.csproj.user \ compiler.doc \ compiler.sln \ cs-parser.jay \ - mcs.exe.config \ NOTES \ TODO -all-local: mcs.exe - -install-local: mcs.exe - $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/bin - $(INSTALL_BIN) mcs.exe $(DESTDIR)$(prefix)/bin +PROGRAM = $(topdir)/class/lib/$(PROFILE)/mcs.exe +PROGRAM_COMPILE = $(BOOT_COMPILE) -uninstall-local: - -rm -f $(DESTDIR)$(prefix)/bin/mcs.exe +CLEAN_FILES = y.output *.exe *.mdb -test-local run-test-local: - -clean-local: - rm -f *.exe *.pdb cs-parser.cs y.output - -dist-local: dist-default +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 $@ -mcs.exe: $(all_sources) - $(BOOT_COMPILE) /target:exe /out:$@ $^ +include ../build/executable.make -cs-parser.cs: cs-parser.jay $(topdir)/jay/skeleton.cs - $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $< >$@ +ifeq (default, $(PROFILE)) +# Utility rule to make debugging somewhat easier. +all-local: mcs.exe +mcs.exe: $(PROGRAM) + cp -p $< $@ + test ! -f $<.mdb || cp -p $<.mdb $@.mdb +endif # Testing targets @@ -83,24 +40,37 @@ TIME = time btest: mcs2.exe mcs3.exe ls -l mcs2.exe mcs3.exe -mcs2.exe: mcs.exe - $(TIME) $(RUNTIME) ./mcs.exe $(USE_MCS_FLAGS) /target:exe /out:$@ $(all_sources) +mcs2.exe: $(PROGRAM) + $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response) mcs3.exe: mcs2.exe - $(TIME) $(RUNTIME) ./mcs2.exe $(USE_MCS_FLAGS) /target:exe /out:$@ $(all_sources) + $(TIME) $(RUNTIME) $(RUNTIME_FLAGS) ./mcs2.exe $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response) + +wc: + wc -l $(BUILT_SOURCES) `cat $(sourcefile)` ctest: - -rm mcs2.exe mcs3.exe - make btest USE_MCS_FLAGS= + rm -f mcs2.exe mcs3.exe + $(MAKE) USE_MCS_FLAGS="-d:NET_1_1 -d:ONLY_1_1" btest # we need this because bash tries to use its own crappy timer FRIENDLY_TIME = $(shell which time) -f'%U seconds' -do-time : mcs.exe +do-time : $(PROGRAM) @ 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) + @ rm -f mcs2.exe + @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs2.exe > /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) + @ rm -f mcs3.exe + @ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs3.exe > /dev/null || (echo FAILED; exit 1) + @ $(MAKE) do-corlib + +do-corlib: + @ echo -n "corlib: " + @ rm -f ../class/lib/mscorlib.dll + @ cd ../class/corlib ; $(MAKE) BOOTSTRAP_MCS='$(FRIENDLY_TIME) mono $$(topdir)/class/lib/$(PROFILE)/mcs.exe' > /dev/null || (echo FAILED; exit 1) + +PROFILER=default -response: - echo $(all_sources) > res +profile : $(PROGRAM) + $(RUNTIME) $(RUNTIME_FLAGS) --profile=$(PROFILER) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:mcs2.exe $(BUILT_SOURCES) @$(response)