[build] Add the assemblies in LIB_REFS to LIB_MCS_FLAGS automatically to reduce dupli...
[mono-project.git] / mcs / class / System.XML / Makefile
blob2d0d84be4fab6183c8ab982c411b218489a9e764
1 thisdir = class/System.XML
2 SUBDIRS =
3 include ../../build/rules.make
5 LIBRARY = System.Xml.dll
7 lib_file := $(wildcard ../lib/$(PROFILE)/System.Xml.dll)
8 ifndef lib_file
9 USE_BOOT_COMPILE = yes
10 endif
12 ifdef USE_BOOT_COMPILE
13 LIBRARY_COMPILE = $(BOOT_COMPILE)
14 endif
16 PROFILE_ANY_MOBILE := $(filter monotouch monotouch_runtime monodroid xammac mobile mobile_static, $(PROFILE))
18 LIB_REFS = System
19 LIB_MCS_FLAGS = -r:$(corlib) -nowarn:0618,0612,0642
20 ifeq (2.1, $(FRAMEWORK_VERSION))
21 LIB_MCS_FLAGS += -unsafe -d:AGCLR -d:NET_2_1_HACK
22 endif
23 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 -r:System.Data.dll -r:System.Core.dll
25 ifndef PROFILE_ANY_MOBILE
26 FINAL_MCS_FLAGS = -r:System.Configuration.dll -d:CONFIGURATION_DEP
27 endif
29 ifneq (bare/,$(intermediate))
30 LIB_MCS_FLAGS += $(FINAL_MCS_FLAGS)
31 endif
33 LOCAL_MCS_FLAGS += -lib:$(bare_libdir)
35 nist_dom_files = \
36 ChangeLog ITest.cs readme.txt util.cs \
37 fundamental/ChangeLog \
38 files/ChangeLog files/noDTDXMLfile.xml files/otherDoc.xml files/staff.dtd files/staff.html files/staff.xml
40 xmlfiles_files = \
41 ChangeLog nested-included.dtd literal-data.xml nested-dtd-test.dtd nested-dtd-test.xml simple.xml \
42 xsl/ChangeLog xsl/empty.xsl \
43 XsdValidation/ChangeLog XsdValidation/1.xsd XsdValidation/2.xsd XsdValidation/3.xsd XsdValidation/4.xsd \
44 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
46 EXTRA_DISTFILES = \
47 System.Xml.Schema/BUGS-MS.txt \
48 System.Xml.Schema/BUGS.txt \
49 $(wildcard System.Xml.Serialization/standalone_tests/*.cs) \
50 $(wildcard System.Xml.Serialization/standalone_tests/*.output) \
51 System.Xml.XPath/Parser.jay \
52 Test/ChangeLog \
53 Test/Microsoft.Test.csproj \
54 Test/Mono.Test.csproj \
55 Test/MonoMicro.Test.csproj \
56 Test/XmlFiles/76102.xml \
57 Test/XmlFiles/79683.dtd \
58 Test/XmlFiles/496192.xml \
59 Test/XmlFiles/*.xsd \
60 $(wildcard Test/XmlFiles/xsd/*.xml) \
61 $(wildcard Test/XmlFiles/xsd/*.xsd) \
62 $(wildcard Test/XmlFiles/xsl/*.xml) \
63 $(wildcard Test/XmlFiles/xsl/*.xsl) \
64 Test/XmlFiles/xsl/current-in-select.ref \
65 Test/XmlFiles/xsl/ChangeLog \
66 $(xmlfiles_files:%=Test/XmlFiles/%) \
67 $(nist_dom_files:%=Test/System.Xml/nist_dom/%)
69 System.Xml.XPath/$(PROFILE)_Parser.cs: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
70 (cd System.Xml.XPath; $(topdir)/../jay/jay -ct < $(topdir)/../jay/skeleton.cs Parser.jay > $(PROFILE)_Parser.cs)
72 Mono.Xml.Xsl/$(PROFILE)_PatternParser.jay: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs
73 sed "s/\%start Expr/\%start Pattern/" $< >$@
75 Mono.Xml.Xsl/$(PROFILE)_PatternParser.cs: Mono.Xml.Xsl/$(PROFILE)_PatternParser.jay $(topdir)/jay/skeleton.cs
76 echo "#define XSLT_PATTERN" > $@
77 (cd Mono.Xml.Xsl; $(topdir)/../jay/jay -ct $(PROFILE)_PatternParser.jay < $(topdir)/../jay/skeleton.cs >> $(PROFILE)_PatternParser.cs)
79 Mono.Xml.Xsl/$(PROFILE)_PatternTokenizer.cs: System.Xml.XPath/Tokenizer.cs
80 echo "#define XSLT_PATTERN" > $@
81 cat $< >>$@
83 ifneq (moonlight_raw, $(PROFILE))
84 BUILT_SOURCES = System.Xml.XPath/$(PROFILE)_Parser.cs \
85 Mono.Xml.Xsl/$(PROFILE)_PatternParser.cs \
86 Mono.Xml.Xsl/$(PROFILE)_PatternTokenizer.cs
88 CLEAN_FILES = Test/XmlFiles/xsl/result.xml \
89 System.Xml.XPath/$(PROFILE)_Parser.cs \
90 Mono.Xml.Xsl/$(PROFILE)_PatternParser.cs \
91 Mono.Xml.Xsl/$(PROFILE)_PatternTokenizer.cs
92 endif
94 include ../../build/library.make
96 ifeq (bare/,$(intermediate))
97 build-bare:
98 else
99 $(bare_libdir)/System.Xml.dll:
100 $(MAKE) intermediate=bare/ $(bare_libdir)/System.Xml.dll
101 endif
103 system_xml_library_deps := \
104 $(bare_libdir)/System.dll \
105 $(bare_libdir)/System.Xml.dll
107 ifndef PROFILE_ANY_MOBILE
108 system_xml_library_deps += $(the_libdir_base)System.Configuration.dll
109 endif
111 artifacts = $(system_xml_library_deps) \
112 $(the_libdir_base)System.Configuration.dll
114 .NOTPARALLEL: $(artifacts)
116 CLEAN_FILES = $(bare_libdir)/System.Xml.dll $(bare_libdir)/System.Xml.dll.pdb
117 $(the_libdir_base)System.Xml.dll: $(system_xml_library_deps)
118 $(bare_libdir)/System.dll:
119 (cd ../System; $(MAKE) $@)
120 $(bare_libdir)/System.Xml.dll: $(bare_libdir)/System.dll
122 $(the_libdir_base)System.Configuration.dll:
123 (cd ../System.Configuration; $(MAKE) $@)
126 ifndef intermediate
127 ifneq ($(PROFILE),basic)
128 csproj-local:
129 $(MAKE) csproj-local intermediate=bare/
130 endif
131 endif