-
Notifications
You must be signed in to change notification settings - Fork 36
/
verify.src
207 lines (186 loc) · 10.8 KB
/
verify.src
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
# Here is where we check for all the nonsense that people put in sources files that
# shouldn't be done that way.
#
# Errors we check for and what they mean.
#
# BLD1000 - LINKLIB abuse
# BLD1001 - vccomsup.lib listed explicitly - should be USE_VCCOM=1
# BLD1002 - IOSTREAM lib listed explicitly - should be USE_IOSTREAM=1
# BLD1003 - STL lib listed explicitly - should be USE_STL=1
# BLD1004 - MSVCRT lib listed explicitly - should be USE_MSVCRT=1
# BLD1005 - LIBCMT lib listed explicitly - should be USE_LIBCMT=1
# BLD1006 - LIBC lib listed explicitly
# BLD1007 - BROWSER_INFO defined in sources file (this is a user environment setting)
# BLD1008 - SXS_ASSEMBLY_VERSION contains invalid characters
# BLD1009 - SXS_ASSEMBLY_NAME contains invalid characters
# BLD1010 - ASSERT(SXS_ASSEMBLY_LANGUAGE xor SXS_ASSEMBLY_LANGUAGE_INDEPENDENT)
# BLD1011 - SXS..
# BLD1012 - SXS..
# BLD1013 - SXS..
# BLD1014 - SXS..
# BLD1015 - SXS..
#
!if !defined(IGNORE_LINKLIB_ABUSE) && ("$(TARGETTYPE)" == "DYNLINK")
! if "$(LINKLIBS)" != "$(LINKLIBS:kernel32=)"
!message BUILDMSG: warning BLD1000 : LINKLIB abuse (kernel32 used by mistake) ($(MAKEDIR))
! endif
! if "$(LINKLIBS)" != "$(LINKLIBS:advapi32=)"
!message BUILDMSG: warning BLD1000 : LINKLIB abuse (advapi32 used by mistake) ($(MAKEDIR))
! endif
! if "$(LINKLIBS)" != "$(LINKLIBS:ole32=)"
!message BUILDMSG: warning BLD1000 : LINKLIB abuse (ole32 used by mistake) ($(MAKEDIR))
! endif
!endif
!if "$(TARGETLIBS)" != "$(TARGETLIBS:vccomsup=)"
!message BUILDMSG: warning BLD1001 : vccomsup.lib listed explicitly - use USE_VCCOM=1 ($(MAKEDIR))
!endif
!if "$(TARGETLIBS)" != "$(TARGETLIBS:msvcirt=)" || \
"$(TARGETLIBS)" != "$(TARGETLIBS:libcimt=)" || \
"$(TARGETLIBS)" != "$(TARGETLIBS:libci=)"
!message BUILDMSG: warning BLD1002 : IOSTREAM lib listed explicitly - use USE_IOSTREAM=1 ($(MAKEDIR))
!endif
!if "$(TARGETLIBS)" != "$(TARGETLIBS:msvcprt=)" || \
"$(TARGETLIBS)" != "$(TARGETLIBS:libcpmt=)" || \
"$(TARGETLIBS)" != "$(TARGETLIBS:libcp=)"
!message BUILDMSG: warning BLD1003 : STL lib listed explicitly - use USE_STL=1 ($(MAKEDIR))
!endif
!if !defined(IGNORE_MSVCRT_ABUSE) && "$(TARGETLIBS)" != "$(TARGETLIBS:msvcrt=)"
!message BUILDMSG: warning BLD1004 : MSVCRT lib listed explicitly - use USE_MSVCRT=1 ($(MAKEDIR))
!endif
!if "$(TARGETLIBS)" != "$(TARGETLIBS:libcmt=)"
!message BUILDMSG: warning BLD1005 : LIBCMT lib listed explicitly - use USE_LIBCMT=1 ($(MAKEDIR))
!endif
!if "$(TARGETLIBS)" != "$(TARGETLIBS:libc.lib=)"
!message BUILDMSG: warning BLD1006 : LIBC lib listed explicitly ($(MAKEDIR))
!endif
!if defined(BROWSER_INFO) && !defined(USER_ENV_BROWSER_INFO)
!message BUILDMSG: warning BLD1007 : BROWSER_INFO defined in sources file - this is a user environment setting ($(MAKEDIR))
!endif
!if "$(SXS_ASSEMBLY_NAME)" != ""
!if defined(SXS_ASSEMBLY_VERSION)
#
# SXS_ASSEMBLY_VERSION may only [0-9.].
# Removing them should leave nothing.
#
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_ASSEMBLY_VERSION)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:.=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:0=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:1=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:2=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:3=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:4=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:5=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:6=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:7=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:8=)
SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS=$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS:9=)
!if "$(SXS_CHECK_ASSEMBLY_VERSION_CHARACTERS)" != ""
!message BUILDMSG: warning BLD1008 : SXS_ASSEMBLY_VERSION ($(SXS_ASSEMBLY_VERSION)) may only contain [0-9.].
!endif
!endif
!if defined(SXS_ASSEMBLY_NAME)
#
# SXS_ASSEMBLY_NAME may only contain [A-Za-z0-9.-].
# Removing them should leave nothing.
#
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_ASSEMBLY_NAME)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:.=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:-=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:0=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:1=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:2=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:3=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:4=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:5=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:6=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:7=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:8=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:9=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:a=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:b=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:c=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:d=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:e=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:f=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:g=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:h=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:i=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:j=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:k=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:l=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:m=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:n=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:o=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:p=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:q=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:r=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:s=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:t=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:u=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:v=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:w=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:x=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:y=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:z=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:A=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:B=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:C=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:D=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:E=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:F=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:G=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:H=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:I=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:J=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:K=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:L=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:M=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:N=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:O=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:P=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:Q=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:R=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:S=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:T=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:U=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:V=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:W=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:X=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:Y=)
SXS_CHECK_ASSEMBLY_NAME_CHARACTERS=$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS:Z=)
!if "$(SXS_CHECK_ASSEMBLY_NAME_CHARACTERS)" != ""
!message BUILDMSG: warning BLD1009 : SXS_ASSEMBLY_NAME ($(SXS_ASSEMBLY_NAME)) may only contain [A-Za-z0-9.-].
!endif
!endif
# SXS_SHORT_ASSEMBLY_NAME may only contains A-Za-z0-9
# SXS_SHORT_ASSEMBLY_NAME may only contain 8 character elements
#
# ASSERT(SXS_ASSEMBLY_LANGUAGE xor SXS_ASSEMBLY_LANGUAGE_INDEPENDENT)
#
!if (!defined(SXS_ASSEMBLY_LANGUAGE) && !defined(SXS_ASSEMBLY_LANGUAGE_INDEPENDENT)) \
|| ( defined(SXS_ASSEMBLY_LANGUAGE) && defined(SXS_ASSEMBLY_LANGUAGE_INDEPENDENT))
!message BUILDMSG: warning BLD1010 : Must specify SXS_ASSEMBLY_LANGUAGE or SXS_ASSEMBLY_LANGUAGE_INDEPENDENT, not both.
!endif
!if defined(SXS_MANIFEST_IN_RESOURCES) && !defined(SXS_MANIFEST)
!message BUILDMSG: warning BLD1011 : You must specify SXS_MANIFEST if you specify SXS_MANIFEST_IN_RESOURCES.
!endif
!if defined(SXS_ASSEMBLY_VERSION) && !defined(SXS_ASSEMBLY_NAME)
!message BUILDMSG: warning BLD1012 : You may not specify SXS_ASSEMBLY_VERSION without SXS_ASSEMBLY_NAME or SXS_SHORT_ASSEMBLY_NAME.
!endif
!if (defined(SXS_ASSEMBLY_LANGUAGE) || defined(SXS_ASSEMBLY_LANGUAGE_INDEPENDENT)) && !defined(SXS_ASSEMBLY_NAME)
!message BUILDMSG: warning BLD1013 : You may not specify SXS_ASSEMBLY_LANGUAGE or SXS_ASSEMBLY_LANGUAGE_INDEPENDENT without SXS_ASSEMBLY_NAME or SXS_SHORT_ASSEMBLY_NAME.
!endif
!if defined(SXS_BINPLACE_ALSO_ROOT) && !defined(SXS_ASSEMBLY_NAME)
!message BUILDMSG: warning BLD1014 : You may not specify SXS_BINPLACE_ALSO_ROOT without SXS_ASSEMBLY_NAME or SXS_SHORT_ASSEMBLY_NAME.
!endif
!if defined(SXS_MANIFEST)
#
# If removing .manifest or .Manifest from SXS_MANIFEST leaves it unchanged,
# it doesn't contain either one and is invalid.
#
!if "$(SXS_MANIFEST:.Manifest=)" == "$(SXS_MANIFEST)" \
&& "$(SXS_MANIFEST:.manifest=)" == "$(SXS_MANIFEST)"
!message BUILDMSG: warning BLD1015 : SXS_MANIFEST ($(SXS_MANIFEST)) must contain ".Manifest", it must end in ".Manifest or ".Manifest-src"
!endif
!endif
!endif