Rubber-stamped by Brady Eidson.
[webbrowser.git] / WebCore / DerivedSources.make
blob8191222dd3256cf4e058899f7db9c331c7721c54
1 # Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
2 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
3 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
7 # are met:
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
14 # 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
15 # its contributors may be used to endorse or promote products derived
16 # from this software without specific prior written permission.
18 # THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
19 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 # DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
22 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 VPATH = \
30 $(WebCore) \
31 $(WebCore)/bindings/js \
32 $(WebCore)/bindings/objc \
33 $(WebCore)/css \
34 $(WebCore)/dom \
35 $(WebCore)/html \
36 $(WebCore)/html/canvas \
37 $(WebCore)/inspector \
38 $(WebCore)/loader/appcache \
39 $(WebCore)/notifications \
40 $(WebCore)/page \
41 $(WebCore)/plugins \
42 $(WebCore)/storage \
43 $(WebCore)/xml \
44 $(WebCore)/wml \
45 $(WebCore)/workers \
46 $(WebCore)/svg \
47 $(WebCore)/websockets \
50 DOM_CLASSES = \
51 AbstractView \
52 AbstractWorker \
53 Attr \
54 BarInfo \
55 BeforeLoadEvent \
56 CDATASection \
57 CSSCharsetRule \
58 CSSFontFaceRule \
59 CSSImportRule \
60 CSSMediaRule \
61 CSSPageRule \
62 CSSPrimitiveValue \
63 CSSRule \
64 CSSRuleList \
65 CSSStyleDeclaration \
66 CSSStyleRule \
67 CSSStyleSheet \
68 CSSUnknownRule \
69 CSSValue \
70 CSSValueList \
71 CSSVariablesRule \
72 CSSVariablesDeclaration \
73 WebGLActiveInfo \
74 WebGLArray \
75 WebGLArrayBuffer \
76 WebGLBuffer \
77 WebGLByteArray \
78 WebGLFloatArray \
79 WebGLFramebuffer \
80 CanvasGradient \
81 WebGLIntArray \
82 CanvasPattern \
83 WebGLProgram \
84 WebGLRenderbuffer \
85 CanvasRenderingContext \
86 CanvasRenderingContext2D \
87 WebGLRenderingContext \
88 WebGLShader \
89 WebGLShortArray \
90 WebGLTexture \
91 WebGLUniformLocation \
92 WebGLUnsignedByteArray \
93 WebGLUnsignedIntArray \
94 WebGLUnsignedShortArray \
95 CharacterData \
96 ClientRect \
97 ClientRectList \
98 Clipboard \
99 Comment \
100 CompositionEvent \
101 Console \
102 Coordinates \
103 Counter \
104 DataGridColumn \
105 DataGridColumnList \
106 DedicatedWorkerContext \
107 DOMApplicationCache \
108 DOMCoreException \
109 DOMImplementation \
110 DOMParser \
111 DOMSelection \
112 DOMWindow \
113 Database \
114 Document \
115 DocumentFragment \
116 DocumentType \
117 Element \
118 ElementTimeControl \
119 Entity \
120 EntityReference \
121 ErrorEvent \
122 Event \
123 EventException \
124 EventListener \
125 EventSource \
126 EventTarget \
127 File \
128 FileList \
129 Geolocation \
130 Geoposition \
131 HTMLAllCollection \
132 HTMLAnchorElement \
133 HTMLAppletElement \
134 HTMLAreaElement \
135 HTMLAudioElement \
136 HTMLBRElement \
137 HTMLBaseElement \
138 HTMLBaseFontElement \
139 HTMLBlockquoteElement \
140 HTMLBodyElement \
141 HTMLButtonElement \
142 HTMLCanvasElement \
143 HTMLCollection \
144 HTMLDataGridElement \
145 HTMLDataGridCellElement \
146 HTMLDataGridColElement \
147 HTMLDataGridRowElement \
148 HTMLDataListElement \
149 HTMLDListElement \
150 HTMLDirectoryElement \
151 HTMLDivElement \
152 HTMLDocument \
153 HTMLElement \
154 HTMLEmbedElement \
155 HTMLFieldSetElement \
156 HTMLFontElement \
157 HTMLFormElement \
158 HTMLFrameElement \
159 HTMLFrameSetElement \
160 HTMLHRElement \
161 HTMLHeadElement \
162 HTMLHeadingElement \
163 HTMLHtmlElement \
164 HTMLIFrameElement \
165 HTMLImageElement \
166 HTMLInputElement \
167 HTMLIsIndexElement \
168 HTMLLIElement \
169 HTMLLabelElement \
170 HTMLLegendElement \
171 HTMLLinkElement \
172 HTMLMapElement \
173 HTMLMarqueeElement \
174 HTMLMediaElement \
175 HTMLMenuElement \
176 HTMLMetaElement \
177 HTMLModElement \
178 HTMLOListElement \
179 HTMLObjectElement \
180 HTMLOptGroupElement \
181 HTMLOptionElement \
182 HTMLOptionsCollection \
183 HTMLParagraphElement \
184 HTMLParamElement \
185 HTMLPreElement \
186 HTMLQuoteElement \
187 HTMLScriptElement \
188 HTMLSelectElement \
189 HTMLSourceElement \
190 HTMLStyleElement \
191 HTMLTableCaptionElement \
192 HTMLTableCellElement \
193 HTMLTableColElement \
194 HTMLTableElement \
195 HTMLTableRowElement \
196 HTMLTableSectionElement \
197 HTMLTextAreaElement \
198 HTMLTitleElement \
199 HTMLUListElement \
200 HTMLVideoElement \
201 History \
202 ImageData \
203 InjectedScriptHost \
204 InspectorBackend \
205 InspectorFrontendHost \
206 KeyboardEvent \
207 Location \
208 Media \
209 MediaError \
210 MediaList \
211 MessageChannel \
212 MessageEvent \
213 MessagePort \
214 MimeType \
215 MimeTypeArray \
216 MouseEvent \
217 MutationEvent \
218 NamedNodeMap \
219 Navigator \
220 Node \
221 NodeFilter \
222 NodeIterator \
223 NodeList \
224 Notation \
225 Notification \
226 NotificationCenter \
227 OverflowEvent \
228 PageTransitionEvent \
229 Plugin \
230 PluginArray \
231 PopStateEvent \
232 PositionError \
233 ProcessingInstruction \
234 ProgressEvent \
235 RGBColor \
236 Range \
237 RangeException \
238 Rect \
239 SharedWorker \
240 SharedWorkerContext \
241 SQLError \
242 SQLResultSet \
243 SQLResultSetRowList \
244 SQLTransaction \
245 Storage \
246 StorageEvent \
247 SVGAElement \
248 SVGAltGlyphElement \
249 SVGAngle \
250 SVGAnimateColorElement \
251 SVGAnimateElement \
252 SVGAnimateTransformElement \
253 SVGAnimatedAngle \
254 SVGAnimatedBoolean \
255 SVGAnimatedEnumeration \
256 SVGAnimatedInteger \
257 SVGAnimatedLength \
258 SVGAnimatedLengthList \
259 SVGAnimatedNumber \
260 SVGAnimatedNumberList \
261 SVGAnimatedPathData \
262 SVGAnimatedPoints \
263 SVGAnimatedPreserveAspectRatio \
264 SVGAnimatedRect \
265 SVGAnimatedString \
266 SVGAnimatedTransformList \
267 SVGAnimationElement \
268 SVGCircleElement \
269 SVGClipPathElement \
270 SVGColor \
271 SVGComponentTransferFunctionElement \
272 SVGCursorElement \
273 SVGDefsElement \
274 SVGDescElement \
275 SVGDocument \
276 SVGElement \
277 SVGElementInstance \
278 SVGElementInstanceList \
279 SVGEllipseElement \
280 SVGException \
281 SVGExternalResourcesRequired \
282 SVGFEBlendElement \
283 SVGFEColorMatrixElement \
284 SVGFEComponentTransferElement \
285 SVGFECompositeElement \
286 SVGFEDiffuseLightingElement \
287 SVGFEDisplacementMapElement \
288 SVGFEDistantLightElement \
289 SVGFEFloodElement \
290 SVGFEFuncAElement \
291 SVGFEFuncBElement \
292 SVGFEFuncGElement \
293 SVGFEFuncRElement \
294 SVGFEGaussianBlurElement \
295 SVGFEImageElement \
296 SVGFEMergeElement \
297 SVGFEMergeNodeElement \
298 SVGFEMorphologyElement \
299 SVGFEOffsetElement \
300 SVGFEPointLightElement \
301 SVGFESpecularLightingElement \
302 SVGFESpotLightElement \
303 SVGFETileElement \
304 SVGFETurbulenceElement \
305 SVGFilterElement \
306 SVGFilterPrimitiveStandardAttributes \
307 SVGFitToViewBox \
308 SVGFontElement \
309 SVGFontFaceElement \
310 SVGFontFaceFormatElement \
311 SVGFontFaceNameElement \
312 SVGFontFaceSrcElement \
313 SVGFontFaceUriElement \
314 SVGForeignObjectElement \
315 SVGGElement \
316 SVGGlyphElement \
317 SVGGradientElement \
318 SVGHKernElement \
319 SVGImageElement \
320 SVGLangSpace \
321 SVGLength \
322 SVGLengthList \
323 SVGLineElement \
324 SVGLinearGradientElement \
325 SVGLocatable \
326 SVGMarkerElement \
327 SVGMaskElement \
328 SVGMatrix \
329 SVGMetadataElement \
330 SVGMissingGlyphElement \
331 SVGNumber \
332 SVGNumberList \
333 SVGPaint \
334 SVGPathElement \
335 SVGPathSeg \
336 SVGPathSegArcAbs \
337 SVGPathSegArcRel \
338 SVGPathSegClosePath \
339 SVGPathSegCurvetoCubicAbs \
340 SVGPathSegCurvetoCubicRel \
341 SVGPathSegCurvetoCubicSmoothAbs \
342 SVGPathSegCurvetoCubicSmoothRel \
343 SVGPathSegCurvetoQuadraticAbs \
344 SVGPathSegCurvetoQuadraticRel \
345 SVGPathSegCurvetoQuadraticSmoothAbs \
346 SVGPathSegCurvetoQuadraticSmoothRel \
347 SVGPathSegLinetoAbs \
348 SVGPathSegLinetoHorizontalAbs \
349 SVGPathSegLinetoHorizontalRel \
350 SVGPathSegLinetoRel \
351 SVGPathSegLinetoVerticalAbs \
352 SVGPathSegLinetoVerticalRel \
353 SVGPathSegList \
354 SVGPathSegMovetoAbs \
355 SVGPathSegMovetoRel \
356 SVGPatternElement \
357 SVGPoint \
358 SVGPointList \
359 SVGPolygonElement \
360 SVGPolylineElement \
361 SVGPreserveAspectRatio \
362 SVGRadialGradientElement \
363 SVGRect \
364 SVGRectElement \
365 SVGRenderingIntent \
366 SVGSVGElement \
367 SVGScriptElement \
368 SVGSetElement \
369 SVGStopElement \
370 SVGStringList \
371 SVGStylable \
372 SVGStyleElement \
373 SVGSwitchElement \
374 SVGSymbolElement \
375 SVGTRefElement \
376 SVGTSpanElement \
377 SVGTests \
378 SVGTextContentElement \
379 SVGTextElement \
380 SVGTextPathElement \
381 SVGTextPositioningElement \
382 SVGTitleElement \
383 SVGTransform \
384 SVGTransformList \
385 SVGTransformable \
386 SVGURIReference \
387 SVGUnitTypes \
388 SVGUseElement \
389 SVGViewElement \
390 SVGZoomAndPan \
391 SVGZoomEvent \
392 Screen \
393 StyleSheet \
394 StyleSheetList \
395 Text \
396 TextEvent \
397 TextMetrics \
398 TimeRanges \
399 TreeWalker \
400 UIEvent \
401 ValidityState \
402 WebKitAnimationEvent \
403 WebKitCSSKeyframeRule \
404 WebKitCSSKeyframesRule \
405 WebKitCSSMatrix \
406 WebKitCSSTransformValue \
407 WebKitPoint \
408 WebKitTransitionEvent \
409 WebSocket \
410 WheelEvent \
411 Worker \
412 WorkerContext \
413 WorkerLocation \
414 WorkerNavigator \
415 XMLHttpRequest \
416 XMLHttpRequestException \
417 XMLHttpRequestProgressEvent \
418 XMLHttpRequestUpload \
419 XMLSerializer \
420 XPathEvaluator \
421 XPathException \
422 XPathExpression \
423 XPathNSResolver \
424 XPathResult \
425 XSLTProcessor \
428 .PHONY : all
430 JS_DOM_HEADERS=$(filter-out JSEventListener.h JSEventTarget.h,$(DOM_CLASSES:%=JS%.h))
432 all : \
433 $(JS_DOM_HEADERS) \
435 JSJavaScriptCallFrame.h \
437 CSSGrammar.cpp \
438 CSSPropertyNames.h \
439 CSSValueKeywords.h \
440 ColorData.c \
441 DocTypeStrings.cpp \
442 HTMLElementFactory.cpp \
443 HTMLEntityNames.c \
444 HTMLNames.cpp \
445 WMLElementFactory.cpp \
446 WMLNames.cpp \
447 JSSVGElementWrapperFactory.cpp \
448 SVGElementFactory.cpp \
449 SVGNames.cpp \
450 UserAgentStyleSheets.h \
451 XLinkNames.cpp \
452 XMLNames.cpp \
453 MathMLElementFactory.cpp \
454 MathMLNames.cpp \
455 XPathGrammar.cpp \
456 tokenizer.cpp \
459 # --------
461 ADDITIONAL_IDL_DEFINES :=
463 ifeq ($(OS),MACOS)
465 FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
467 ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_DASHBOARD_SUPPORT | cut -d' ' -f3), 1)
468 ENABLE_DASHBOARD_SUPPORT = 1
469 else
470 ENABLE_DASHBOARD_SUPPORT = 0
471 endif
473 ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_ORIENTATION_EVENTS | cut -d' ' -f3), 1)
474 ENABLE_ORIENTATION_EVENTS = 1
475 else
476 ENABLE_ORIENTATION_EVENTS = 0
477 endif
479 else
481 ifndef ENABLE_DASHBOARD_SUPPORT
482 ENABLE_DASHBOARD_SUPPORT = 0
483 endif
485 ifndef ENABLE_ORIENTATION_EVENTS
486 ENABLE_ORIENTATION_EVENTS = 0
487 endif
489 endif # MACOS
491 ifeq ($(ENABLE_ORIENTATION_EVENTS), 1)
492 ADDITIONAL_IDL_DEFINES := $(ADDITIONAL_IDL_DEFINES) ENABLE_ORIENTATION_EVENTS
493 endif
495 # --------
497 # CSS property names and value keywords
499 WEBCORE_CSS_PROPERTY_NAMES := $(WebCore)/css/CSSPropertyNames.in
500 WEBCORE_CSS_VALUE_KEYWORDS := $(WebCore)/css/CSSValueKeywords.in
502 ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
503 WEBCORE_CSS_PROPERTY_NAMES := $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/SVGCSSPropertyNames.in
504 WEBCORE_CSS_VALUE_KEYWORDS := $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css/SVGCSSValueKeywords.in
505 endif
507 ifeq ($(ENABLE_DASHBOARD_SUPPORT), 1)
508 WEBCORE_CSS_PROPERTY_NAMES := $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/DashboardSupportCSSPropertyNames.in
509 endif
511 # The grep commands below reject output containing anything other than:
512 # 1. Lines beginning with '#'
513 # 2. Lines containing only whitespace
514 # These two types of lines will be ignored by make{prop,values}.pl.
515 CSSPropertyNames.h : $(WEBCORE_CSS_PROPERTY_NAMES) css/makeprop.pl
516 if sort $(WEBCORE_CSS_PROPERTY_NAMES) | uniq -d | grep -E -v '(^#)|(^[[:space:]]*$$)'; then echo 'Duplicate value!'; exit 1; fi
517 cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in
518 perl "$(WebCore)/css/makeprop.pl"
520 CSSValueKeywords.h : $(WEBCORE_CSS_VALUE_KEYWORDS) css/makevalues.pl
521 # Lower case all the values, as CSS values are case-insensitive
522 perl -ne 'print lc' $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
523 if sort CSSValueKeywords.in | uniq -d | grep -E -v '(^#)|(^[[:space:]]*$$)'; then echo 'Duplicate value!'; exit 1; fi
524 perl "$(WebCore)/css/makevalues.pl"
526 # --------
528 # DOCTYPE strings
530 DocTypeStrings.cpp : html/DocTypeStrings.gperf
531 gperf -CEot -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $< > $@
533 # --------
535 # HTML entity names
537 HTMLEntityNames.c : html/HTMLEntityNames.gperf
538 gperf -a -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 $< > $@
540 # --------
542 # color names
544 ColorData.c : platform/ColorData.gperf
545 gperf -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@
547 # --------
549 # CSS tokenizer
551 tokenizer.cpp : css/tokenizer.flex css/maketokenizer
552 flex -t $< | perl $(WebCore)/css/maketokenizer > $@
554 # --------
556 # CSS grammar
557 # NOTE: Older versions of bison do not inject an inclusion guard, so we add one.
559 CSSGrammar.cpp : css/CSSGrammar.y
560 bison -d -p cssyy $< -o $@
561 touch CSSGrammar.cpp.h
562 touch CSSGrammar.hpp
563 echo '#ifndef CSSGrammar_h' > CSSGrammar.h
564 echo '#define CSSGrammar_h' >> CSSGrammar.h
565 cat CSSGrammar.cpp.h CSSGrammar.hpp >> CSSGrammar.h
566 echo '#endif' >> CSSGrammar.h
567 rm -f CSSGrammar.cpp.h CSSGrammar.hpp
569 # --------
571 # XPath grammar
572 # NOTE: Older versions of bison do not inject an inclusion guard, so we add one.
574 XPathGrammar.cpp : xml/XPathGrammar.y $(PROJECT_FILE)
575 bison -d -p xpathyy $< -o $@
576 touch XPathGrammar.cpp.h
577 touch XPathGrammar.hpp
578 echo '#ifndef XPathGrammar_h' > XPathGrammar.h
579 echo '#define XPathGrammar_h' >> XPathGrammar.h
580 cat XPathGrammar.cpp.h XPathGrammar.hpp >> XPathGrammar.h
581 echo '#endif' >> XPathGrammar.h
582 rm -f XPathGrammar.cpp.h XPathGrammar.hpp
584 # --------
586 # user agent style sheets
588 USER_AGENT_STYLE_SHEETS = $(WebCore)/css/html.css $(WebCore)/css/quirks.css $(WebCore)/css/view-source.css $(WebCore)/css/themeWin.css $(WebCore)/css/themeWinQuirks.css
590 ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
591 USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/svg.css
592 endif
594 ifeq ($(findstring ENABLE_WML,$(FEATURE_DEFINES)), ENABLE_WML)
595 USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/wml.css
596 endif
598 ifeq ($(findstring ENABLE_MATHML,$(FEATURE_DEFINES)), ENABLE_MATHML)
599 USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/mathml.css
600 endif
602 ifeq ($(findstring ENABLE_VIDEO,$(FEATURE_DEFINES)), ENABLE_VIDEO)
603 USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/mediaControls.css
604 ifeq ($(OS),MACOS)
605 USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/mediaControlsQuickTime.css
606 endif
607 endif
609 UserAgentStyleSheets.h : css/make-css-file-arrays.pl $(USER_AGENT_STYLE_SHEETS)
610 perl $< $@ UserAgentStyleSheetsData.cpp $(USER_AGENT_STYLE_SHEETS)
612 # --------
614 # HTML tag and attribute names
616 ifeq ($(findstring ENABLE_DATALIST,$(FEATURE_DEFINES)), ENABLE_DATALIST)
617 HTML_FLAGS := $(HTML_FLAGS) ENABLE_DATALIST=1
618 endif
620 ifeq ($(findstring ENABLE_VIDEO,$(FEATURE_DEFINES)), ENABLE_VIDEO)
621 HTML_FLAGS := $(HTML_FLAGS) ENABLE_VIDEO=1
622 endif
624 ifdef HTML_FLAGS
626 HTMLElementFactory.cpp HTMLNames.cpp : dom/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in
627 perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in --factory --wrapperFactory --extraDefines "$(HTML_FLAGS)"
629 else
631 HTMLElementFactory.cpp HTMLNames.cpp : dom/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in
632 perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in --factory --wrapperFactory
634 endif
636 JSHTMLElementWrapperFactory.cpp : HTMLNames.cpp
638 XMLNames.cpp : dom/make_names.pl xml/xmlattrs.in
639 perl -I $(WebCore)/bindings/scripts $< --attrs $(WebCore)/xml/xmlattrs.in
641 # --------
643 # SVG tag and attribute names, and element factory
645 ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
647 ifeq ($(findstring ENABLE_SVG_DOM_OBJC_BINDINGS,$(FEATURE_DEFINES)), ENABLE_SVG_DOM_OBJC_BINDINGS)
648 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.exp
649 endif
651 ifeq ($(findstring ENABLE_SVG_USE,$(FEATURE_DEFINES)), ENABLE_SVG_USE)
652 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_USE=1
653 endif
655 ifeq ($(findstring ENABLE_SVG_FONTS,$(FEATURE_DEFINES)), ENABLE_SVG_FONTS)
656 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_FONTS=1
657 endif
659 ifeq ($(findstring ENABLE_FILTERS,$(FEATURE_DEFINES)), ENABLE_FILTERS)
660 SVG_FLAGS := $(SVG_FLAGS) ENABLE_FILTERS=1
661 ifeq ($(findstring ENABLE_SVG_DOM_OBJC_BINDINGS,$(FEATURE_DEFINES)), ENABLE_SVG_DOM_OBJC_BINDINGS)
662 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.Filters.exp
663 endif
664 endif
666 ifeq ($(findstring ENABLE_SVG_AS_IMAGE,$(FEATURE_DEFINES)), ENABLE_SVG_AS_IMAGE)
667 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_AS_IMAGE=1
668 endif
670 ifeq ($(findstring ENABLE_SVG_ANIMATION,$(FEATURE_DEFINES)), ENABLE_SVG_ANIMATION)
671 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_ANIMATION=1
672 ifeq ($(findstring ENABLE_SVG_DOM_OBJC_BINDINGS,$(FEATURE_DEFINES)), ENABLE_SVG_DOM_OBJC_BINDINGS)
673 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.Animation.exp
674 endif
675 endif
677 ifeq ($(findstring ENABLE_SVG_FOREIGN_OBJECT,$(FEATURE_DEFINES)), ENABLE_SVG_FOREIGN_OBJECT)
678 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_FOREIGN_OBJECT=1
679 ifeq ($(findstring ENABLE_SVG_DOM_OBJC_BINDINGS,$(FEATURE_DEFINES)), ENABLE_SVG_DOM_OBJC_BINDINGS)
680 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.SVG.ForeignObject.exp
681 endif
682 endif
684 # SVG tag and attribute names (need to pass an extra flag if svg experimental features are enabled)
686 ifdef SVG_FLAGS
688 SVGElementFactory.cpp SVGNames.cpp : dom/make_names.pl svg/svgtags.in svg/svgattrs.in
689 perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/svg/svgtags.in --attrs $(WebCore)/svg/svgattrs.in --extraDefines "$(SVG_FLAGS)" --factory --wrapperFactory
690 else
692 SVGElementFactory.cpp SVGNames.cpp : dom/make_names.pl svg/svgtags.in svg/svgattrs.in
693 perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/svg/svgtags.in --attrs $(WebCore)/svg/svgattrs.in --factory --wrapperFactory
695 endif
697 JSSVGElementWrapperFactory.cpp : SVGNames.cpp
699 XLinkNames.cpp : dom/make_names.pl svg/xlinkattrs.in
700 perl -I $(WebCore)/bindings/scripts $< --attrs $(WebCore)/svg/xlinkattrs.in
702 else
704 SVGElementFactory.cpp :
705 echo > $@
707 SVGNames.cpp :
708 echo > $@
710 XLinkNames.cpp :
711 echo > $@
713 # This file is autogenerated by make_names.pl when SVG is enabled.
715 JSSVGElementWrapperFactory.cpp :
716 echo > $@
718 endif
720 # --------
722 # WML tag and attribute names, and element factory
724 ifeq ($(findstring ENABLE_WML,$(FEATURE_DEFINES)), ENABLE_WML)
726 WMLElementFactory.cpp WMLNames.cpp : dom/make_names.pl wml/WMLTagNames.in wml/WMLAttributeNames.in
727 perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/wml/WMLTagNames.in --attrs $(WebCore)/wml/WMLAttributeNames.in --factory --wrapperFactory
729 else
731 WMLElementFactory.cpp :
732 echo > $@
734 WMLNames.cpp :
735 echo > $@
737 endif
739 # --------
741 # MathML tag and attribute names, and element factory
743 ifeq ($(findstring ENABLE_MATHML,$(FEATURE_DEFINES)), ENABLE_MATHML)
745 MathMLElementFactory.cpp MathMLNames.cpp : dom/make_names.pl mathml/mathtags.in
746 perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/mathml/mathtags.in --factory --wrapperFactory
748 else
750 MathMLElementFactory.cpp :
751 echo > $@
753 MathMLNames.cpp :
754 echo > $@
756 endif
760 # --------
762 # JavaScript bindings
764 GENERATE_BINDINGS = perl -I $(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl \
765 --include dom --include html --include css --include page --include notifications --include xml --include svg --write-dependencies --outputDir .
767 GENERATE_BINDINGS_SCRIPTS = \
768 bindings/scripts/CodeGenerator.pm \
769 bindings/scripts/IDLParser.pm \
770 bindings/scripts/IDLStructure.pm \
771 bindings/scripts/generate-bindings.pl \
774 JS%.h : %.idl $(GENERATE_BINDINGS_SCRIPTS) bindings/scripts/CodeGeneratorJS.pm
775 $(GENERATE_BINDINGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS $<
777 -include $(JS_DOM_HEADERS:.h=.dep)
779 # ------------------------
781 # Mac-specific rules
783 ifeq ($(OS),MACOS)
785 OBJC_DOM_HEADERS=$(filter-out DOMDOMWindow.h DOMMimeType.h DOMPlugin.h,$(DOM_CLASSES:%=DOM%.h))
787 all : $(OBJC_DOM_HEADERS)
789 all : CharsetData.cpp WebCore.exp WebCore.LP64.exp
791 # --------
793 # character set name table
795 CharsetData.cpp : platform/text/mac/make-charset-table.pl platform/text/mac/character-sets.txt platform/text/mac/mac-encodings.txt
796 perl $^ kTextEncoding > $@
798 # --------
800 # export file
802 ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_MAC_JAVA_BRIDGE | cut -d' ' -f3), 1)
803 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.JNI.exp
804 endif
806 ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_NETSCAPE_PLUGIN_API | cut -d' ' -f3), 1)
807 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.NPAPI.exp
808 endif
810 # FIXME: WTF_USE_PLUGIN_HOST_PROCESS is only true when building for x86_64, but we shouldn't have to know about that here.
811 ifeq ($(findstring x86_64,$(ARCHS)) $(findstring x86_64,$(VALID_ARCHS)), x86_64 x86_64)
812 ifeq ($(shell gcc -arch x86_64 -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep WTF_USE_PLUGIN_HOST_PROCESS | cut -d' ' -f3), 1)
813 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.PluginHostProcess.exp
814 endif
815 endif
817 ifeq ($(findstring ENABLE_3D_RENDERING,$(FEATURE_DEFINES)), ENABLE_3D_RENDERING)
818 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.3DRendering.exp
819 endif
821 ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_CONTEXT_MENUS | cut -d' ' -f3), 1)
822 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.ContextMenus.exp
823 endif
825 ifeq ($(ENABLE_DASHBOARD_SUPPORT), 1)
826 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.DashboardSupport.exp
827 endif
829 ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_DRAG_SUPPORT | cut -d' ' -f3), 1)
830 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.DragSupport.exp
831 endif
833 ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_INSPECTOR | cut -d' ' -f3), 1)
834 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Inspector.exp
835 endif
837 ifeq ($(ENABLE_ORIENTATION_EVENTS), 1)
838 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.OrientationEvents.exp
839 endif
841 ifeq ($(findstring 10.4,$(MACOSX_DEPLOYMENT_TARGET)), 10.4)
842 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Tiger.exp
843 endif
845 ifeq ($(findstring ENABLE_PLUGIN_PROXY_FOR_VIDEO,$(FEATURE_DEFINES)), ENABLE_PLUGIN_PROXY_FOR_VIDEO)
846 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.VideoProxy.exp
847 endif
849 ifeq ($(findstring ENABLE_VIDEO,$(FEATURE_DEFINES)), ENABLE_VIDEO)
850 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Video.exp
851 endif
853 WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES)
854 cat $^ > $@
856 # Switch NSRect, NSSize and NSPoint with their CG counterparts for 64-bit.
857 WebCore.LP64.exp : WebCore.exp
858 cat $^ | sed -e s/7_NSRect/6CGRect/ -e s/7_NSSize/6CGSize/ -e s/8_NSPoint/7CGPoint/ > $@
860 # --------
862 # Objective-C bindings
864 DOM%.h : %.idl $(GENERATE_BINDINGS_SCRIPTS) bindings/scripts/CodeGeneratorObjC.pm bindings/objc/PublicDOMInterfaces.h
865 $(GENERATE_BINDINGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC $<
867 -include $(OBJC_DOM_HEADERS:.h=.dep)
869 # --------
871 endif # MACOS
873 # ------------------------