PageRenderTime 29ms CodeModel.GetById 12ms app.highlight 13ms RepoModel.GetById 1ms app.codeStats 0ms

/NRefactory/ICSharpCode.NRefactory.CSharp/Parser/mcs/Makefile

http://github.com/icsharpcode/ILSpy
Makefile | 126 lines | 82 code | 34 blank | 10 comment | 6 complexity | b0b16dfa582620a3246e0cb57fdf68aa MD5 | raw file
  1thisdir := mcs
  2SUBDIRS := 
  3include ../build/rules.make
  4
  5EXTRA_DISTFILES = \
  6	*mcs.csproj		\
  7	compiler.doc		\
  8	*mcs.sln		\
  9	*cs-parser.jay		\
 10	*.sources		\
 11	NOTES			\
 12	TODO			\
 13	*mcs.exe.config
 14
 15COMPILER_NAME = gmcs
 16
 17ifeq (net_2_0, $(PROFILE))
 18INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/gmcs.exe
 19endif
 20
 21ifeq (moonlight_bootstrap, $(PROFILE))
 22INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/gmcs.exe
 23endif
 24
 25ifeq (2.1, $(FRAMEWORK_VERSION))
 26LOCAL_MCS_FLAGS += -d:SMCS_SOURCE
 27COMPILER_NAME = smcs
 28endif
 29
 30ifeq (4.0, $(FRAMEWORK_VERSION))
 31COMPILER_NAME = dmcs
 32endif
 33
 34PROGRAM = $(topdir)/class/lib/$(PROFILE)/$(COMPILER_NAME).exe
 35
 36BUILT_SOURCES = cs-parser.cs
 37
 38PROGRAM_COMPILE = $(BOOT_COMPILE)
 39
 40CLEAN_FILES += y.output
 41
 42%-parser.cs: %-parser.jay $(topdir)/jay/skeleton.cs
 43	$(topdir)/jay/jay -cvt < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
 44
 45
 46KEEP_OUTPUT_FILE_COPY = yes
 47
 48include ../build/executable.make
 49
 50csproj-local:
 51	config_file=`basename $(PROGRAM) .exe`-$(PROFILE).input; \
 52	echo $(thisdir):$$config_file >> $(topdir)/../mono/msvc/scripts/order; \
 53	(echo $(is_boot); \
 54	echo $(BOOTSTRAP_MCS);	\
 55	echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS); \
 56	echo $(PROGRAM); \
 57	echo $(BUILT_SOURCES); \
 58	echo $(PROGRAM); \
 59	echo $(response)) > $(topdir)/../mono/msvc/scripts/inputs/$$config_file
 60
 61#
 62# Below this line we have local targets used for testing and development
 63#
 64
 65# Testing targets
 66
 67TIME = time
 68
 69# This used to be called test, but that conflicts with the global
 70# recursive target.
 71
 72btest: mcs2.exe mcs3.exe
 73	ls -l mcs2.exe mcs3.exe
 74
 75mcs2.exe: $(PROGRAM)
 76	$(TIME) $(RUNTIME) $(RUNTIME_FLAGS) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
 77
 78mcs3.exe: mcs2.exe
 79	$(TIME) $(RUNTIME) $(RUNTIME_FLAGS) ./mcs2.exe $(USE_MCS_FLAGS) -target:exe -out:$@ $(BUILT_SOURCES) @$(response)
 80
 81wc:
 82	wc -l $(BUILT_SOURCES) `cat $(sourcefile)`
 83
 84ctest: 
 85	rm -f mcs2.exe mcs3.exe
 86	$(MAKE) USE_MCS_FLAGS="-d:NET_1_1 -d:ONLY_1_1" btest
 87
 88# we need this because bash tries to use its own crappy timer
 89FRIENDLY_TIME = $(shell which time) -f'%U seconds'
 90
 91do-time : $(PROGRAM)
 92	@ echo -n "Run 1:   "
 93	@ rm -f mcs2.exe
 94	@ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs2.exe > /dev/null || (echo FAILED; exit 1)
 95	@ echo -n "Run 2:   "
 96	@ rm -f mcs3.exe
 97	@ $(MAKE) TIME="$(FRIENDLY_TIME)" mcs3.exe > /dev/null || (echo FAILED; exit 1)
 98	@ $(MAKE) do-corlib
 99
100do-corlib:
101	@ echo -n "corlib:  "
102	@ rm -f ../class/lib/mscorlib.dll
103	@ cd ../class/corlib ; $(MAKE) BOOTSTRAP_MCS='$(FRIENDLY_TIME) mono $$(topdir)/class/lib/$(PROFILE)/mcs.exe' > /dev/null || (echo FAILED; exit 1)
104
105PROFILER=default
106
107do-gettext:
108	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 /`
109
110profile : $(PROGRAM)
111	$(RUNTIME) $(RUNTIME_FLAGS) --profile=$(PROFILER) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:mcs2.exe $(BUILT_SOURCES) @$(response)
112
113#
114# quick hack target, to quickly develop the gmcs compiler
115# Update manually.
116
117q: cs-parser.cs qh
118	echo 'System.Console.WriteLine ("Hello");' | mono csharp.exe
119	echo -e 'using System;\nConsole.WriteLine ("hello");' | mono csharp.exe
120	echo -e '"foo" == "bar";' | mono csharp.exe
121	echo -e 'var a = 1;\na + 2;' | mono csharp.exe
122	echo -e 'int j;\nj = 1;' | mono csharp.exe
123	echo -e 'var a = new int[]{1,2,3};\nfrom x in a select x;' | mono csharp.exe
124	echo -e 'var a = from f in System.IO.Directory.GetFiles ("/tmp") where f == "passwd" select f;' | mono csharp.exe
125
126