forked from dotnet/Open-XML-SDK
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile-Linux-Mono
277 lines (247 loc) · 13.5 KB
/
Makefile-Linux-Mono
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
# Mono CSharp Compiler
CSC=mcs
CSCFLAGS=/nologo /warn:4 /debug:pdbonly /o /nowarn:3003
# Resource compiler flags
#Fix resgen paths in mono
RESGEN=export MONO_IOMAP=all; resgen
RC=rc
RCFLAGS=/usesourcepath
# Source dirs
OXAPIDIR=.
SRCDIR=$(OXAPIDIR)/src
TOOLSRCDIR=$(OXAPIDIR)/toolsrc
APIGENDIR=$(SRCDIR)/ApiGen
DOMGENDIR=$(SRCDIR)/DomGenV3
OXFRAMEWORKDIR=$(SRCDIR)/Framework
OFAPIDIR=$(SRCDIR)/ofapi
GENERATEDCODEDIR=$(SRCDIR)/GeneratedCode
OFAPI4SDBBUILDERDIR=$(TOOLSRCDIR)/Ofapi4SdbBuilder
SCHEMAPROCESSORDIR=$(TOOLSRCDIR)/SchemaProcessor
SDBBUILDERDIR=$(TOOLSRCDIR)/SdbBuilder
SEMANTICCONSTRAINTREGGENDIR=$(TOOLSRCDIR)/SemanticConstraintRegGen
SCHEMATRONGENDIR=$(TOOLSRCDIR)/SchematronGen
# Build dirs
BUILDDIR=$(OXAPIDIR)/build
APIGENBLDDIR=$(BUILDDIR)/ApiGen
DOMGENBLDDIR=$(BUILDDIR)/DomGenV3
FRAMEWORKBLDDIR=$(BUILDDIR)/Framework
OFAPIBLDDIR=$(BUILDDIR)/OpenXmlSdkLib
GENERATEDCODEBLDDIR=$(BUILDDIR)/GeneratedCode
OFAPI4SDBBUILDERBLDDIR=$(BUILDDIR)/Ofapi4SdbBuilder
SCHEMAPROCESSORBLDDIR=$(BUILDDIR)/SchemaProcessor
SDBBUILDERBLDDIR=$(BUILDDIR)/SdbBuilder
SEMANTICCONSTRAINTREGGENBLDDIR=$(BUILDDIR)/SemanticConstraintRegGen
SCHEMATRONGENBLDDIR=$(BUILDDIR)/SchematronGen
OPENXMLDLLDOC=index.xml
OPENXMLDLL=OpenXMLLib.dll
# Output
FILE_DLL=$(OFAPIBLDDIR)/$(OPENXMLDLL)
# Documentation File
DOC=$(OFAPIBLDDIR)/$(OPENXMLDLLDOC)
# Target
TARGET=/target:library
# References
REFERENCES=/reference:WindowsBase.dll
# Sources
FILES_SRC=\
$(OXFRAMEWORKDIR)/AlternateContent.cs \
$(OXFRAMEWORKDIR)/ConformanceClasses.cs \
$(OXFRAMEWORKDIR)/DataPartReferenceRelationship.cs \
$(OXFRAMEWORKDIR)/ExceptionMessages.Designer.cs \
$(OXFRAMEWORKDIR)/IFixedTypePart.cs \
$(OXFRAMEWORKDIR)/MediaDataPart.cs \
$(OXFRAMEWORKDIR)/NamespaceIdMap.cs \
$(OXFRAMEWORKDIR)/OpenXmlAttribute.cs \
$(OXFRAMEWORKDIR)/OpenXmlObsolete.cs \
$(OXFRAMEWORKDIR)/OpenXmlBasePart.cs \
$(OXFRAMEWORKDIR)/OpenXmlCompositeElement.cs \
$(OXFRAMEWORKDIR)/OpenXmlElement.cs \
$(OXFRAMEWORKDIR)/OpenXmlElement2.cs \
$(OXFRAMEWORKDIR)/OpenXmlElementContext.cs \
$(OXFRAMEWORKDIR)/OpenXmlElementList.cs \
$(OXFRAMEWORKDIR)/OpenXmlLeafElement.cs \
$(OXFRAMEWORKDIR)/OpenXmlLeafTextElement.cs \
$(OXFRAMEWORKDIR)/OpenXmlNonElementNode.cs \
$(OXFRAMEWORKDIR)/OpenXmlPackage.cs \
$(OXFRAMEWORKDIR)/OpenXmlPartRootElement.cs \
$(OXFRAMEWORKDIR)/OpenXmlReader.cs \
$(OXFRAMEWORKDIR)/OpenXmlSimpleType.cs \
$(OXFRAMEWORKDIR)/OpenXmlUnknownElement.cs \
$(OXFRAMEWORKDIR)/OpenXmlWriter.cs \
$(OXFRAMEWORKDIR)/PartConstraintRule.cs \
$(OXFRAMEWORKDIR)/PartContainer.cs \
$(OXFRAMEWORKDIR)/PartExtensionProvider.cs \
$(OXFRAMEWORKDIR)/ReferenceRelationship.cs \
$(OXFRAMEWORKDIR)/RelationshipTypeList.cs \
$(OXFRAMEWORKDIR)/ReservedElementTypeIds.cs \
$(OXFRAMEWORKDIR)/UnknownPart.cs \
$(OXFRAMEWORKDIR)/XmlDOMTextWriter.cs \
$(OXFRAMEWORKDIR)/Profiler.cs \
\
$(GENERATEDCODEDIR)/O12UnionHelper.cs \
$(GENERATEDCODEDIR)/O14UnionHelper.cs \
$(GENERATEDCODEDIR)/O15UnionHelper.cs \
$(GENERATEDCODEDIR)/package.cs \
$(GENERATEDCODEDIR)/PartialSemanticConstraintRegistry.cs \
$(GENERATEDCODEDIR)/PartParitalDef.cs \
$(GENERATEDCODEDIR)/RootElementFactory.cs \
$(GENERATEDCODEDIR)/schemas-microsoft-com_office_excel.cs \
$(GENERATEDCODEDIR)/schemas-microsoft-com_office_office.cs \
$(GENERATEDCODEDIR)/schemas-microsoft-com_office_powerpoint.cs \
$(GENERATEDCODEDIR)/schemas-microsoft-com_office_word.cs \
$(GENERATEDCODEDIR)/schemas-microsoft-com_vml.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_ink_2010_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_2006_01_customui.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_2006_activeX.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_2006_coverPageProps.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_2006_customDocumentInformationPanel.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_2006_metadata_contentType.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_2006_metadata_customXsn.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_2006_metadata_longProperties.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_2006_metadata_properties_metaAttributes.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_2009_07_customui.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2007_8_2_chart.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2008_diagram.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2010_chartDrawing.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2010_compatibility.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2010_diagram.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2010_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2010_picture.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2010_slicer.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2012_timeslicer.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_excel_2006_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_excel_2010_spreadsheetDrawing.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_powerpoint_2010_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_spreadsheetml_2009_9_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_word_2006_wordml.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_word_2010_wordml.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_word_2010_wordprocessingCanvas.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_word_2010_wordprocessingDrawing.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_word_2010_wordprocessingGroup.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_word_2010_wordprocessingShape.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_drawingml_2006_chart.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_drawingml_2006_chartDrawing.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_drawingml_2006_compatibility.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_drawingml_2006_diagram.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_drawingml_2006_lockedCanvas.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_drawingml_2006_main.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_drawingml_2006_picture.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_drawingml_2006_spreadsheetDrawing.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_drawingml_2006_wordprocessingDrawing.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_officeDocument_2006_bibliography.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_officeDocument_2006_characteristics.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_officeDocument_2006_custom-properties.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_officeDocument_2006_customXml.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_officeDocument_2006_docPropsVTypes.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_officeDocument_2006_extended-properties.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_officeDocument_2006_math.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_presentationml_2006_main.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_schemaLibrary_2006_main.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_spreadsheetml_2006_main.cs \
$(GENERATEDCODEDIR)/schemas_openxmlformats_org_wordprocessingml_2006_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_word_2012_wordml.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_webextensions_webextension_2010_11.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2012_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2012_chart.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_drawing_2012_chartStyle.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_powerpoint_2012_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_thememl_2012_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_webextensions_taskpanes_2010_11.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_spreadsheetml_2010_11_main.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_spreadsheetml_2011_1_ac.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_spreadsheetml_2010_11_ac.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_word_2012_wordprocessingDrawing.cs \
$(GENERATEDCODEDIR)/schemas_microsoft_com_office_powerpoint_2012_roamingSettings.cs \
$(GENERATEDCODEDIR)/www_w3_org_2003_04_emma.cs \
$(GENERATEDCODEDIR)/www_w3_org_2003_InkML.cs \
$(GENERATEDCODEDIR)/www_w3_org_XML_1998_namespace.cs \
\
$(OFAPIDIR)/BinaryTypeEnums.cs \
$(OFAPIDIR)/DocumentTypeDetector.cs \
$(OFAPIDIR)/DocumentTypeEnum.cs \
$(OFAPIDIR)/ExtensionMethods.cs \
$(OFAPIDIR)/GlobalSuppressions.cs \
$(OFAPIDIR)/ofapi.cs \
$(OFAPIDIR)/HelperPartialClass.cs \
$(OFAPIDIR)/PackageDocument.cs \
$(OFAPIDIR)/RootElementFactory1.cs \
$(OFAPIDIR)/SchemaInfoAttribute.cs \
$(OFAPIDIR)/Sources1.cs \
$(OFAPIDIR)/Wordprocessing.cs \
\
$(OFAPIDIR)/Properties/AssemblyInfo.cs.source \
\
$(OFAPIDIR)/Validation/PresentationDocumentValidator.cs \
$(OFAPIDIR)/Validation/SpreadsheetDocumentValidator.cs \
$(OFAPIDIR)/Validation/DocumentValidator.cs \
$(OFAPIDIR)/Validation/OpenXmlValidator.cs \
$(OFAPIDIR)/Validation/ValidationResources.Designer.cs \
$(OFAPIDIR)/Validation/ValidationContext.cs \
$(OFAPIDIR)/Validation/ValidationErrorInfo.cs \
$(OFAPIDIR)/Validation/ValidationResult.cs \
$(OFAPIDIR)/Validation/ValidationSettings.cs \
$(OFAPIDIR)/Validation/ValidationTraverser.cs \
$(OFAPIDIR)/Validation/WordprocessingDocumentValidator.cs \
$(OFAPIDIR)/Validation/XmlPath.cs \
\
$(OFAPIDIR)/Validation/SchemaValidation/AlternateContentValidator.cs \
$(OFAPIDIR)/Validation/SchemaValidation/SdbDataHead.cs \
$(OFAPIDIR)/Validation/SchemaValidation/UnionHelper.cs \
$(OFAPIDIR)/Validation/SchemaValidation/AllParticleValidator.cs \
$(OFAPIDIR)/Validation/SchemaValidation/AnyParticleValidator.cs \
$(OFAPIDIR)/Validation/SchemaValidation/AttributeConstraint.cs \
$(OFAPIDIR)/Validation/SchemaValidation/BinDataTypes.cs \
$(OFAPIDIR)/Validation/SchemaValidation/ChoiceParticleValidator.cs \
$(OFAPIDIR)/Validation/SchemaValidation/GroupParticleValidator.cs \
$(OFAPIDIR)/Validation/SchemaValidation/ParticleConstraint.cs \
$(OFAPIDIR)/Validation/SchemaValidation/ParticleValidator.cs \
$(OFAPIDIR)/Validation/SchemaValidation/SchemaTypeData.cs \
$(OFAPIDIR)/Validation/SchemaValidation/SchemaTypeValidator.cs \
$(OFAPIDIR)/Validation/SchemaValidation/SchemaValidator.cs \
$(OFAPIDIR)/Validation/SchemaValidation/SdbSchemaDatas.cs \
$(OFAPIDIR)/Validation/SchemaValidation/SequenceParticleValidator.cs \
$(OFAPIDIR)/Validation/SchemaValidation/SimpleTypes.cs \
\
$(OFAPIDIR)/Validation/SemanticValidation/Enums.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticValidator.cs \
\
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraintRegistry/SemanticConstraintRegistry.cs \
\
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeAbsentConditionToValue.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeAbsentConditionToNonValue.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeCannotOmitConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeValueLessEqualToAnother.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeMutualExclusive.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeRequiredConditionToValue.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeValueLengthConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeValuePatternConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeValueRangeConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeValueSetConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/AttributeValueConditionToAnother.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/IndexReferenceConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/ReferenceExistConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/RelationshipExistConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/RelationshipTypeConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/RootAttributeUniqueConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/SemanticConstraint.cs \
$(OFAPIDIR)/Validation/SemanticValidation/SemanticConstraint/UniqueAttributeValueConstraint.cs
EXCEPTIONMESSAGESRES=$(OXFRAMEWORKDIR)/ExceptionMessages
VALIDATIONRESOURCESRES=$(OFAPIDIR)/Validation/ValidationResources
RESOURCE=\
/resource:$(EXCEPTIONMESSAGESRES).resources,DocumentFormat.OpenXml.ExceptionMessages.resources \
/resource:$(VALIDATIONRESOURCESRES).resources,DocumentFormat.OpenXml.Validation.ValidationResources.resources \
# Rules
$(FILE_DLL): $(EXCEPTIONMESSAGESRES).resources $(VALIDATIONRESOURCESRES).resources
mkdir -p $(OFAPIBLDDIR)
$(CSC) $(CSCFLAGS) /out:$@ $(TARGET) $(FILES_SRC) $(RESOURCE) $(OXLIB) $(REFERENCES) /doc:$(DOC)
$(EXCEPTIONMESSAGESRES).resources: $(EXCEPTIONMESSAGESRES).resx
$(RESGEN) $(RCFLAGS) $(EXCEPTIONMESSAGESRES).resx $@
$(VALIDATIONRESOURCESRES).resources: $(VALIDATIONRESOURCESRES).resx
$(RESGEN) $(RCFLAGS) $(VALIDATIONRESOURCESRES).resx $@
build: $(FILE_DLL)
.PHONY: clean
clean:
rm -rf $(OFAPIBLDDIR)
rm -f $(EXCEPTIONMESSAGESRES).resources
rm -f $(VALIDATIONRESOURCESRES).resources