Link simple and 2.0 bootrap profiles
[mono.git] / mcs / class / System.XML / Makefile
1 thisdir = class/System.XML
2 SUBDIRS = 
3 include ../../build/rules.make
4
5 LIBRARY = System.Xml.dll
6 LIBRARY_USE_INTERMEDIATE_FILE = yes
7
8 lib_file := $(wildcard ../lib/$(PROFILE)/System.Xml.dll)
9 ifndef lib_file
10 # In the basic profile, System.Xml.dll is _not_ a dependency of mcs.exe.  So, don't use boot compilation.
11 # In other profiles, it _is_ a dependency of mcs.exe.  So, use boot compilation.
12 ifeq (basic, $(PROFILE))
13 USE_BOOT_COMPILE = yes
14 endif
15 ifeq (net_2_0_bootstrap, $(PROFILE))
16 USE_BOOT_COMPILE = yes
17 endif
18 endif
19
20 ifeq (net_2_0, $(PROFILE))
21 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)
22 endif
23
24 ifeq (monotouch, $(PROFILE))
25 BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/monotouch$(PLATFORM_PATH_SEPARATOR)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
26 endif
27
28 ifdef USE_BOOT_COMPILE
29 LIBRARY_COMPILE = $(BOOT_COMPILE)
30 endif
31
32 LIB_MCS_FLAGS = -r:$(corlib) -r:System.dll -nowarn:0618,0612,0642
33 ifeq (net_1_1_java, $(PROFILE))
34 LIB_MCS_FLAGS += \
35         -r:System.Xml.dll               \
36         -r:rt.dll                       \
37         -r:J2SE.Helpers.dll             \
38         -r:unresolved.dll               \
39         /lib:../../class/lib/$(PROFILE)
40 endif
41 ifeq (2.1, $(FRAMEWORK_VERSION))
42 LIB_MCS_FLAGS += -unsafe -d:AGCLR -d:NET_2_1_HACK
43 endif
44 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
45
46 ifeq (2.0, $(FRAMEWORK_VERSION))
47 # Happens on net_2_0_bootstrap and net_2_0 profiles
48 CONFIGURATION_DEP := System.Configuration.dll
49 CONFIGURATION_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(CONFIGURATION_DEP))
50 CYCLIC_DEPS += $(CONFIGURATION_DEP)
51 CYCLIC_DEP_FILES += $(CONFIGURATION_DEP_FILE)
52 TEST_MCS_FLAGS += -r:System.Configuration
53 endif
54
55 ifdef CONFIGURATION_DEP_FILE
56 LIB_MCS_FLAGS += -define:CONFIGURATION_DEP -r:$(CONFIGURATION_DEP)
57 $(the_lib): $(CONFIGURATION_DEP_FILE)
58 endif
59
60 nist_dom_files = \
61         ChangeLog ITest.cs readme.txt util.cs \
62         fundamental/ChangeLog \
63         files/ChangeLog files/noDTDXMLfile.xml files/otherDoc.xml files/staff.dtd files/staff.html files/staff.xml
64
65 xmlfiles_files = \
66         ChangeLog nested-included.dtd literal-data.xml nested-dtd-test.dtd nested-dtd-test.xml simple.xml \
67         xsl/ChangeLog xsl/empty.xsl \
68         XsdValidation/ChangeLog XsdValidation/1.xsd XsdValidation/2.xsd XsdValidation/3.xsd XsdValidation/4.xsd \
69         xsd/ChangeLog xsd/1.xsd xsd/2.xsd xsd/3.xsd xsd/4.xsd xsd/5.xsd xsd/6.xsd xsd/xml.xsd xsd/81360.xsd xsd/81360inc1.xsd xsd/81360inc2.xsd
70
71 EXTRA_DISTFILES = \
72         System.Xml.Schema/BUGS-MS.txt   \
73         System.Xml.Schema/BUGS.txt      \
74         $(wildcard System.Xml.Serialization/standalone_tests/*.cs) \
75         $(wildcard System.Xml.Serialization/standalone_tests/*.output) \
76         System.Xml.XPath/Parser.jay     \
77         Test/ChangeLog                  \
78         Test/Microsoft.Test.csproj      \
79         Test/Mono.Test.csproj           \
80         Test/MonoMicro.Test.csproj      \
81         Test/XmlFiles/76102.xml         \
82         Test/XmlFiles/79683.dtd         \
83         Test/XmlFiles/496192.xml        \
84         Test/XmlFiles/496192.xsd        \
85         $(wildcard Test/XmlFiles/xsd/*.xml) \
86         $(wildcard Test/XmlFiles/xsd/*.xsd) \
87         $(wildcard Test/XmlFiles/xsl/*.xml) \
88         $(wildcard Test/XmlFiles/xsl/*.xsl) \
89         Test/XmlFiles/xsl/current-in-select.ref \
90         Test/XmlFiles/xsl/ChangeLog \
91         $(xmlfiles_files:%=Test/XmlFiles/%) \
92         $(nist_dom_files:%=Test/System.Xml/nist_dom/%)
93
94 System.Xml.XPath/Parser.cs: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
95         $(topdir)/jay/jay -ct < $(topdir)/jay/skeleton.cs $< >$@
96
97 Mono.Xml.Xsl/PatternParser.jay: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
98         sed "s/\%start Expr/\%start Pattern/" $< >$@
99
100 Mono.Xml.Xsl/PatternParser.cs: Mono.Xml.Xsl/PatternParser.jay $(topdir)/jay/skeleton.cs
101         echo "#define XSLT_PATTERN" > $@
102         $(topdir)/jay/jay -ct $< < $(topdir)/jay/skeleton.cs >>$@
103
104 Mono.Xml.Xsl/PatternTokenizer.cs: System.Xml.XPath/Tokenizer.cs
105         echo "#define XSLT_PATTERN" > $@
106         cat $< >>$@
107
108 ifneq (net_2_1_raw, $(PROFILE))
109 BUILT_SOURCES = System.Xml.XPath/Parser.cs \
110         Mono.Xml.Xsl/PatternParser.cs \
111         Mono.Xml.Xsl/PatternTokenizer.cs
112
113 CLEAN_FILES = Test/XmlFiles/xsl/result.xml \
114         System.Xml.XPath/Parser.cs \
115         Mono.Xml.Xsl/PatternParser.cs \
116         Mono.Xml.Xsl/PatternTokenizer.cs
117 endif
118
119 include ../../build/library.make