Fix mcs build to use Thread.Abort.
[mono.git] / mcs / mcs / Makefile
index 9d7484e02af0c648393ad5c6caad686c1179fecd..ef4f3e3c9172875db2711161333e38856f372bad 100644 (file)
@@ -1,16 +1,18 @@
+# To produce a debugging parser, use the version that says "-cvt"
+JAY_FLAGS=-c
+# JAY_FLAGS=-cvt
+
 thisdir := mcs
 SUBDIRS := 
 include ../build/rules.make
 
 EXTRA_DISTFILES = \
        mcs.csproj              \
-       compiler.doc            \
        mcs.sln         \
        cs-parser.jay           \
-       mcs.exe.sources         \
-       NOTES                   \
-       TODO                    \
-       ikvm.cs
+       mcs.exe.sources
+
+LIB_REFS = System System.Core System.Xml
 
 ifeq (basic, $(PROFILE))
 PROGRAM = basic.exe
@@ -18,10 +20,17 @@ sourcefile = mcs.exe.sources
 else
 PROGRAM_USE_INTERMEDIATE_FILE = true
 PROGRAM = mcs.exe
-LOCAL_MCS_FLAGS += -lib:$(topdir)/class/lib/build
+the_libdir = $(topdir)/class/lib/build/
+LOCAL_MCS_FLAGS += -lib:$(topdir)/class/lib/build -debug
 endif
 
-LOCAL_MCS_FLAGS += -d:STATIC,NO_SYMBOL_WRITER
+LOCAL_MCS_FLAGS += -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE
+
+ifndef NO_THREAD_ABORT
+REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
+endif
+
+LOCAL_MCS_FLAGS += $(REFERENCE_SOURCES_FLAGS)
 
 PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/4.5
 
@@ -32,23 +41,12 @@ BUILT_SOURCES = cs-parser.cs
 CLEAN_FILES += y.output
 
 %-parser.cs: %-parser.jay $(topdir)/jay/skeleton.cs
-       $(topdir)/jay/jay -c < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
+       $(topdir)/jay/jay $(JAY_FLAGS) < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@
 
 KEEP_OUTPUT_FILE_COPY = yes
 
 include ../build/executable.make
 
-csproj-local:
-       config_file=`basename $(PROGRAM) .exe`-$(PROFILE).input; \
-       echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
-       (echo $(is_boot); \
-       echo $(BOOTSTRAP_MCS);  \
-       echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS); \
-       echo $(PROGRAM); \
-       echo $(BUILT_SOURCES); \
-       echo $(PROGRAM); \
-       echo $(response)) > $(topdir)/../msvc/scripts/inputs/$$config_file
-
 #
 # Below this line we have local targets used for testing and development
 #
@@ -96,10 +94,10 @@ do-gettext:
 
 profile : $(PROGRAM)
        $(RUNTIME) $(RUNTIME_FLAGS) --profile=$(PROFILER) $(PROGRAM) $(USE_MCS_FLAGS) -target:exe -out:mcs2.exe $(BUILT_SOURCES) @$(response)
-       
+
 debug-parser:
-       $(topdir)/jay/jay -cvt < $(topdir)/jay/skeleton.cs cs-parser.jay > jay-tmp.out && mv jay-tmp.out cs-parser.cs
-       $(MAKE)
+       rm cs-parser.cs
+       $(MAKE) JAY_FLAGS=-cvt
 
 #
 # quick hack target, to quickly develop the gmcs compiler