This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
forked from microsoft/Font-Validator
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
203 lines (169 loc) · 7.3 KB
/
Makefile
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
# Copyright (c) Hin-Tak Leung
# All rights reserved.
# MIT License
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the ""Software""), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is furnished to do
# so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Overview:
# COMPAT_LIBRARIES: Compat - is the replacement stub dll for everything
# that Microsoft did not release; it needs to be built first unless
# genuine Micorsoft proprietry dlls (e.g. from the release binary) are
# present.
# LIBRARIES: OTFontFile ValCommon GMath Glyph OTFontFileVal -
# !!DO NOT CHANGE THE LISTED ORDER!! - the later listed one depends
# on the earlier ones, so they needs to be build in this order.
# GENDOC_EXE: GenerateFValData - this tool generates the help files and
# a few rarely changed source files from the complete list of tests and
# error status'es. So it only needs to be built and run when new tests
# or new types of errors are added.
# MAIN_EXE: FontVal(=GUI) FontValidator(=Cmd) - the executables.
# The constituents of the CHM file is dumped into NewHelp after
# GenerateFValData is run; the CHM file requires MS HTML Help Workshop
# to build.
COMPAT_LIBRARIES_1=Compat
COMPAT_LIBRARIES_2=Compat.2nd
LIBRARIES_1=OTFontFile
LIBRARIES_2=ValCommon GMath Glyph OTFontFileVal
# COMPAT_LIBRARIES_2 is not real.
COMPAT_LIBRARIES=$(COMPAT_LIBRARIES_1)
LIBRARIES=$(LIBRARIES_1) $(LIBRARIES_2)
GENDOC_EXE=GenerateFValData
MAIN_EXE=FontVal FontValidator DSIGInfo SVGInfo CFFInfo
MCS=mcs -debug- -optimize+
# IronPython <=2.6.2 needs this
EXTRA_IP_NET2_OPTS=-r:Microsoft.Scripting.Core.dll
ifeq "$(BUILD)" ".net2"
EXTRA_DEV_OPTS=/nostdlib /platform:AnyCPU /reference:/usr/lib/mono/2.0-api/System.dll \
/reference:/usr/lib/mono/2.0-api/mscorlib.dll \
-lib:/usr/lib/mono/2.0-api
else
ifeq "$(USE_MONO_SECURITY)" "true"
EXTRA_DEV_OPTS=-define:HAVE_MONO_X509 -r:Mono.Security
else
EXTRA_DEV_OPTS=
endif
endif
default:
mkdir -p bin
for target in $(COMPAT_LIBRARIES_1) $(LIBRARIES_1) $(COMPAT_LIBRARIES_2) $(LIBRARIES_2); do \
$(MAKE) bin/$${target}.dll ; \
done
for target in $(MAIN_EXE); do \
$(MAKE) bin/$${target}.exe ; \
done
.PHONY: clean gendoc default bin/Compat.2nd.dll
clean:
$(RM) GenerateFValData/bin/Debug/GenerateFValData.exe
for target in $(COMPAT_LIBRARIES) $(LIBRARIES); do \
$(RM) bin/$${target}.dll ; \
done
for target in $(MAIN_EXE); do \
$(RM) bin/$${target}.exe ; \
done
gendoc: GenerateFValData/bin/Debug/GenerateFValData.exe
bin/Compat.dll:
( cd Compat && \
$(MCS) -target:library $(EXTRA_DEV_OPTS) -lib:../bin/ -r:SharpFont -r:System.Windows.Forms -out:../$@ *.cs )
# Not a real target
bin/Compat.2nd.dll:
( cd Compat.2nd && \
$(MCS) -target:library $(EXTRA_DEV_OPTS) -lib:../bin/ \
-r:SharpFont -r:System.Windows.Forms \
-r:System.Security \
-r:OTFontFile \
-out:../bin/Compat.dll *.cs \
../DSIGInfo/DSIGInfo.cs \
../mcs-class-Mono.Security/ASN1.cs \
../mcs-class-Mono.Security/ASN1Convert.cs \
../Compat/*.cs )
bin/OTFontFile.dll:
( cd OTFontFile && \
$(MCS) -target:library $(EXTRA_DEV_OPTS) -out:../$@ *.cs )
bin/ValCommon.dll:
( cd ValCommon && \
$(MCS) -lib:../bin/ $(EXTRA_DEV_OPTS) -r:OTFontFile -target:library -out:../$@ *.cs )
bin/GMath.dll:
( cd GMath && \
$(MCS) -lib:../bin/ $(EXTRA_DEV_OPTS) -r:OTFontFile -r:ValCommon -target:library -out:../$@ *.cs )
bin/Glyph.dll:
( cd Glyph && \
$(MCS) -lib:../bin/ $(EXTRA_DEV_OPTS) -r:OTFontFile -r:ValCommon -r:GMath \
-resource:NS_Glyph.GErrStrings.resources \
-target:library -out:../$@ *.cs )
# running just xbuild (from monodevelop) plain also work for GenerateFValData.
# but it's implementation of PostBuildEvent is lacking.
GenerateFValData/bin/Debug/GenerateFValData.exe: GenerateFValData/ValTests.cs
( cd GenerateFValData && \
mkdir -p bin/Debug && \
$(MCS) -r:System.Web -target:exe \
-out:bin/Debug/GenerateFValData.exe *.cs Properties/AssemblyInfo.cs )
@mkdir -p NewHelp
@echo
@echo
@echo "The deposit location, etc mimics what msbuild/xbuild does;"
@echo "You should go into GenerateFValData/bin/Debug/ and run"
@echo "GenerateFValData at this point, there, which would write a lot of files"
@echo "into NewHelp, as well as info OTFontFileVal."
bin/OTFontFileVal.dll:
( cd OTFontFileVal && \
$(MCS) -lib:../bin/ $(EXTRA_DEV_OPTS) \
-r:Compat -r:System.Windows.Forms \
-r:OTFontFile -r:ValCommon -r:Glyph -r:GMath \
-resource:OTFontFileVal.ValStrings.resources \
-target:library -out:../$@ *.cs )
bin/FontValidator.exe:
( cd FontValidator && \
$(MCS) -lib:../bin/ $(EXTRA_DEV_OPTS) -r:OTFontFileVal -r:OTFontFile -r:ValCommon \
-r:IronPython.dll -r:Microsoft.Scripting.dll $(EXTRA_IP_NET2_OPTS) \
-target:exe -out:../$@ *.cs \
../Compat.3rd/EmbeddedIronPython.cs \
../Compat/Xsl.cs )
$(ELSEWHERE)/FontValidator.exe:
( cd FontValidator && \
$(MCS) -lib:../$(ELSEWHERE) $(EXTRA_DEV_OPTS) -define:OLD_INTERFACE -r:OTFontFileVal -r:OTFontFile -r:ValCommon \
-target:exe -out:../$@ *.cs \
../OTFontFileVal/ValDriver.cs \
../OTFontFileVal/ValidatorParameters.cs \
../Compat/Xsl.cs )
bin/FontVal.exe:
( cd FontVal && \
$(MCS) -lib:../bin/ $(EXTRA_DEV_OPTS) \
-r:OTFontFileVal -r:OTFontFile -r:ValCommon -r:System.Windows.Forms \
-r:System.Drawing -r:System.Data -r:Compat \
-resource:FontVal.Form1.resources \
-resource:FontVal.FormAbout.resources \
-resource:FontVal.FormReportOptions.resources \
-resource:FontVal.FormTransform.resources \
-resource:FontVal.ResultsForm.resources \
-target:winexe -out:../$@ *.cs )
bin/DSIGInfo.exe: DSIGInfo/DSIGInfo.cs
( cd DSIGInfo && \
$(MCS) -lib:../bin/ $(EXTRA_DEV_OPTS) \
-r:System.Security \
-target:exe -out:../$@ *.cs \
../mcs-class-Mono.Security/ASN1.cs \
../mcs-class-Mono.Security/ASN1Convert.cs \
../OTFontFile/*.cs )
bin/SVGInfo.exe: SVGInfo/SVGInfo.cs
( cd SVGInfo && \
$(MCS) -lib:../bin/ $(EXTRA_DEV_OPTS) \
-target:exe -out:../$@ *.cs \
../OTFontFile/*.cs )
bin/CFFInfo.exe: CFFInfo/CFFInfo.cs
( cd CFFInfo && \
$(MCS) -lib:../bin/ $(EXTRA_DEV_OPTS) \
-target:exe -out:../$@ *.cs \
../OTFontFileVal/Overlap.cs \
../OTFontFile/*.cs )