2008-04-11 Jonathan Pobst <monkey@jpobst.com>
[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 ifneq (basic, $(PROFILE))
13 USE_BOOT_COMPILE = yes
14 endif
15 endif
16
17 ifeq (net_2_0, $(PROFILE))
18 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)
19 endif
20
21 ifdef USE_BOOT_COMPILE
22 LIBRARY_COMPILE = $(BOOT_COMPILE)
23 endif
24
25 LIB_MCS_FLAGS = -r:$(corlib) -r:System.dll -nowarn:0162,0618,0612,0642,1595
26 ifeq (net_1_1_java, $(PROFILE))
27 LIB_MCS_FLAGS += \
28         -r:System.Xml.dll               \
29         -r:rt.dll                       \
30         -r:J2SE.Helpers.dll             \
31         -r:unresolved.dll               \
32         /lib:../../class/lib/$(PROFILE)
33 endif
34 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
35
36 ifeq (2.0, $(FRAMEWORK_VERSION))
37 # Happens on net_2_0_bootstrap and net_2_0 profiles
38 CONFIGURATION_DEP := System.Configuration.dll
39 CONFIGURATION_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(CONFIGURATION_DEP))
40 CYCLIC_DEPS += $(CONFIGURATION_DEP)
41 CYCLIC_DEP_FILES += $(CONFIGURATION_DEP_FILE)
42 TEST_MCS_FLAGS += -r:System.Configuration
43 endif
44
45 ifdef CONFIGURATION_DEP_FILE
46 LIB_MCS_FLAGS += -define:CONFIGURATION_DEP -r:$(CONFIGURATION_DEP)
47 $(the_lib): $(CONFIGURATION_DEP_FILE)
48 endif
49
50 nist_dom_files = \
51         ChangeLog ITest.cs readme.txt util.cs \
52         fundamental/ChangeLog \
53         files/ChangeLog files/noDTDXMLfile.xml files/otherDoc.xml files/staff.dtd files/staff.html files/staff.xml
54
55 xmlfiles_files = \
56         ChangeLog nested-included.dtd literal-data.xml nested-dtd-test.dtd nested-dtd-test.xml simple.xml \
57         xsl/ChangeLog xsl/empty.xsl \
58         XsdValidation/ChangeLog XsdValidation/1.xsd XsdValidation/2.xsd XsdValidation/3.xsd XsdValidation/4.xsd \
59         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
60
61 EXTRA_DISTFILES = \
62         System.Xml.Schema/BUGS-MS.txt   \
63         System.Xml.Schema/BUGS.txt      \
64         $(wildcard System.Xml.Serialization/standalone_tests/*.cs) \
65         $(wildcard System.Xml.Serialization/standalone_tests/*.output) \
66         System.Xml.XPath/Parser.jay     \
67         Test/ChangeLog                  \
68         Test/Microsoft.Test.csproj      \
69         Test/Mono.Test.csproj           \
70         Test/MonoMicro.Test.csproj      \
71         Test/XmlFiles/76102.xml         \
72         Test/XmlFiles/79683.dtd         \
73         Test/XmlFiles/xsd/multi-schemaLocation.xml \
74         Test/XmlFiles/xsd/datatypesTest.xsd \
75         Test/XmlFiles/xsd/336625.xsd    \
76         Test/XmlFiles/xsd/358408.xsd    \
77         Test/XmlFiles/xsd/361818.xsd    \
78         Test/XmlFiles/xsd/361818-2.xsd  \
79         Test/XmlFiles/xsd/361818-3.xsd  \
80         Test/XmlFiles/xsd/376395.xml    \
81         Test/XmlFiles/xsd/376395.xsd    \
82         Test/XmlFiles/xsd/77687.xsd     \
83         Test/XmlFiles/xsd/77687inc.xsd  \
84         Test/XmlFiles/xsd/78985.xml     \
85         Test/XmlFiles/xsd/78985.xsd     \
86         Test/XmlFiles/xsd/79650.xsd     \
87         Test/XmlFiles/xsd/82010.xml     \
88         Test/XmlFiles/xsd/82010.xsd     \
89         Test/XmlFiles/xsd/82078.xsd     \
90         Test/XmlFiles/xsd/inter-inc-1.xsd \
91         Test/XmlFiles/xsl/82493.xml     \
92         Test/XmlFiles/xsl/82493.xsl     \
93         Test/XmlFiles/xsl/91834.xml     \
94         Test/XmlFiles/xsl/91834.xsl     \
95         Test/XmlFiles/xsl/91834a.xml    \
96         Test/XmlFiles/xsl/325482.xml    \
97         Test/XmlFiles/xsl/325482.xsl    \
98         Test/XmlFiles/xsl/stripspace.xsl \
99         Test/XmlFiles/xsl/stripspace.xml \
100         Test/XmlFiles/xsl/current-in-select.xsl \
101         Test/XmlFiles/xsl/current-in-select.xml \
102         Test/XmlFiles/xsl/current-in-select.ref \
103         Test/XmlFiles/xsl/ChangeLog \
104         $(xmlfiles_files:%=Test/XmlFiles/%) \
105         $(nist_dom_files:%=Test/System.Xml/nist_dom/%)
106
107 System.Xml.XPath/Parser.cs: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
108         $(topdir)/jay/jay -ct < $(topdir)/jay/skeleton.cs $< >$@
109
110 Mono.Xml.Xsl/PatternParser.jay: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
111         sed "s/\%start Expr/\%start Pattern/" $< >$@
112
113 Mono.Xml.Xsl/PatternParser.cs: Mono.Xml.Xsl/PatternParser.jay $(topdir)/jay/skeleton.cs
114         echo "#define XSLT_PATTERN" > $@
115         $(topdir)/jay/jay -ct $< < $(topdir)/jay/skeleton.cs >>$@
116
117 Mono.Xml.Xsl/PatternTokenizer.cs: System.Xml.XPath/Tokenizer.cs
118         echo "#define XSLT_PATTERN" > $@
119         cat $< >>$@
120
121 BUILT_SOURCES = System.Xml.XPath/Parser.cs \
122         Mono.Xml.Xsl/PatternParser.cs \
123         Mono.Xml.Xsl/PatternTokenizer.cs
124
125 CLEAN_FILES = Test/XmlFiles/xsl/result.xml \
126         System.Xml.XPath/Parser.cs \
127         Mono.Xml.Xsl/PatternParser.cs \
128         Mono.Xml.Xsl/PatternTokenizer.cs
129
130 include ../../build/library.make