include ../../build/rules.make
LIBRARY = System.Xml.dll
+LIBRARY_USE_INTERMEDIATE_FILE = yes
ifeq ($(PROFILE),atomic)
SCARY_LIB=
SCARY_LIB=/lib:$(prefix)/lib /noconfig
endif
-LIB_MCS_FLAGS = $(SCARY_LIB) /unsafe /r:$(corlib) /r:System.dll
-TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+lib_file := $(wildcard ../lib/$(PROFILE)/System.Xml.dll)
+ifndef lib_file
+# In the basic profile, System.Xml.dll is _not_ a dependency of mcs.exe. So, don't use boot compilation.
+# In other profiles, it _is_ a dependency of mcs.exe. So, use boot compilation.
+ifneq (basic, $(PROFILE))
+USE_BOOT_COMPILE = yes
+endif
+endif
+
+ifeq (net_2_0, $(PROFILE))
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+endif
+
+ifdef USE_BOOT_COMPILE
+LIBRARY_COMPILE = $(BOOT_COMPILE)
+endif
+
+LIB_MCS_FLAGS = $(SCARY_LIB) /unsafe /r:$(corlib) /r:System.dll /nowarn:0162 /nowarn:0618 /nowarn:0612
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
EXTRA_DISTFILES = \
Mono.System.XML.csproj \
System.Xml.XPath/Parser.cs: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
$(topdir)/jay/jay -ct < $(topdir)/jay/skeleton.cs $< >$@
-CLEAN_FILES = Test/XmlFiles/xsl/result.xml System.Xml.XPath/Parser.cs
+Mono.Xml.Xsl/PatternParser.jay: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
+ sed "s/\%start Expr/\%start Pattern/" $< >$@
+
+Mono.Xml.Xsl/PatternParser.cs: Mono.Xml.Xsl/PatternParser.jay $(topdir)/jay/skeleton.cs
+ echo "#define XSLT_PATTERN" > $@
+ $(topdir)/jay/jay -ct $< < $(topdir)/jay/skeleton.cs >>$@
+
+Mono.Xml.Xsl/PatternTokenizer.cs: System.Xml.XPath/Tokenizer.cs
+ echo "#define XSLT_PATTERN" > $@
+ cat $< >>$@
+
+BUILT_SOURCES = System.Xml.XPath/Parser.cs \
+ Mono.Xml.Xsl/PatternParser.cs \
+ Mono.Xml.Xsl/PatternTokenizer.cs
+
+CLEAN_FILES = Test/XmlFiles/xsl/result.xml \
+ System.Xml.XPath/Parser.cs \
+ Mono.Xml.Xsl/PatternParser.cs \
+ Mono.Xml.Xsl/PatternTokenizer.cs
include ../../build/library.make