Reviewed by eseidel.
[WebKit-https.git] / WebCore / DerivedSources.make
1 # Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
2 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
6 # are met:
7 #
8 # 1.  Redistributions of source code must retain the above copyright
9 #     notice, this list of conditions and the following disclaimer. 
10 # 2.  Redistributions in binary form must reproduce the above copyright
11 #     notice, this list of conditions and the following disclaimer in the
12 #     documentation and/or other materials provided with the distribution. 
13 # 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 #     its contributors may be used to endorse or promote products derived
15 #     from this software without specific prior written permission. 
16 #
17 # THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 # DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 VPATH = \
29     $(WebCore) \
30     $(WebCore)/bindings/js \
31     $(WebCore)/bindings/objc \
32     $(WebCore)/css \
33     $(WebCore)/dom \
34     $(WebCore)/html \
35     $(WebCore)/page \
36     $(WebCore)/xml \
37     $(WebCore)/ksvg2/svg \
38     $(WebCore)/ksvg2/bindings/js \
39 #
40
41 .PHONY : all
42
43 ifeq ($(OS),MACOS)
44 all : \
45     DOMAttr.h \
46     DOMCDATASection.h \
47     DOMCSSCharsetRule.h \
48     DOMCSSFontFaceRule.h \
49     DOMCSSImportRule.h \
50     DOMCSSMediaRule.h \
51     DOMCSSPageRule.h \
52     DOMCSSPrimitiveValue.h \
53     DOMCSSRule.h \
54     DOMCSSRuleList.h \
55     DOMCSSStyleDeclaration.h \
56     DOMCSSStyleRule.h \
57     DOMCSSStyleSheet.h \
58     DOMCSSUnknownRule.h \
59     DOMCSSValue.h \
60     DOMCSSValueList.h \
61     DOMCharacterData.h \
62     DOMComment.h \
63     DOMCounter.h \
64     DOMDOMImplementation.h \
65     DOMDocument.h \
66     DOMDocumentFragment.h \
67     DOMDocumentType.h \
68     DOMElement.h \
69     DOMEntity.h \
70     DOMEntityReference.h \
71     DOMEvent.h \
72     DOMEventListener.h \
73     DOMHTMLAnchorElement.h \
74     DOMHTMLAreaElement.h \
75     DOMHTMLBRElement.h \
76     DOMHTMLBaseElement.h \
77     DOMHTMLBaseFontElement.h \
78     DOMHTMLBodyElement.h \
79     DOMHTMLButtonElement.h \
80     DOMHTMLCollection.h \
81     DOMHTMLDListElement.h \
82     DOMHTMLDirectoryElement.h \
83     DOMHTMLDivElement.h \
84     DOMHTMLElement.h \
85     DOMHTMLFieldSetElement.h \
86     DOMHTMLFontElement.h \
87     DOMHTMLFormElement.h \
88     DOMHTMLFrameElement.h \
89     DOMHTMLFrameSetElement.h \
90     DOMHTMLHRElement.h \
91     DOMHTMLHeadElement.h \
92     DOMHTMLHeadingElement.h \
93     DOMHTMLHtmlElement.h \
94     DOMHTMLIFrameElement.h \
95     DOMHTMLImageElement.h \
96     DOMHTMLInputElement.h \
97     DOMHTMLIsIndexElement.h \
98     DOMHTMLLIElement.h \
99     DOMHTMLLabelElement.h \
100     DOMHTMLLegendElement.h \
101     DOMHTMLLinkElement.h \
102     DOMHTMLMapElement.h \
103     DOMHTMLMenuElement.h \
104     DOMHTMLMetaElement.h \
105     DOMHTMLModElement.h \
106     DOMHTMLOListElement.h \
107     DOMHTMLObjectElement.h \
108     DOMHTMLOptGroupElement.h \
109     DOMHTMLOptionsCollection.h \
110     DOMHTMLParagraphElement.h \
111     DOMHTMLParamElement.h \
112     DOMHTMLPreElement.h \
113     DOMHTMLQuoteElement.h \
114     DOMHTMLScriptElement.h \
115     DOMHTMLSelectElement.h \
116     DOMHTMLStyleElement.h \
117     DOMHTMLTableCaptionElement.h \
118     DOMHTMLTableCellElement.h \
119     DOMHTMLTableColElement.h \
120     DOMHTMLTableElement.h \
121     DOMHTMLTableRowElement.h \
122     DOMHTMLTableSectionElement.h \
123     DOMHTMLTextAreaElement.h \
124     DOMHTMLTitleElement.h \
125     DOMHTMLUListElement.h \
126     DOMKeyboardEvent.h \
127     DOMMediaList.h \
128     DOMMouseEvent.h \
129     DOMMutationEvent.h \
130     DOMNamedNodeMap.h \
131     DOMNodeIterator.h \
132     DOMNodeList.h \
133     DOMNotation.h \
134     DOMOverflowEvent.h \
135     DOMProcessingInstruction.h \
136     DOMRect.h \
137     DOMStyleSheet.h \
138     DOMStyleSheetList.h \
139     DOMText.h \
140     DOMTreeWalker.h \
141     DOMUIEvent.h \
142     DOMWheelEvent.h \
143     DOMXPathExpression.h \
144     DOMXPathNSResolver.h \
145     DOMXPathResult.h
146 endif
147
148 all : \
149     CSSGrammar.cpp \
150     CSSPropertyNames.h \
151     CSSValueKeywords.h \
152     CharsetData.cpp \
153     ColorData.c \
154     DocTypeStrings.cpp \
155     HTMLEntityNames.c \
156     JSAttr.h \
157     JSCSSPrimitiveValue.h \
158     JSCSSRule.h \
159     JSCSSRuleList.h \
160     JSCSSValue.h \
161     JSCSSValueList.h \
162     JSCanvasGradient.h \
163     JSCanvasPattern.h \
164     JSCanvasRenderingContext2D.h \
165     JSCharacterData.h \
166     JSCounter.h \
167     JSCSSStyleDeclaration.h \
168     JSDOMImplementation.h \
169     JSDOMParser.h \
170     JSDOMWindow.h \
171     JSDocument.h \
172     JSDocumentFragment.h \
173     JSDocumentType.h \
174     JSElement.h \
175     JSEvent.h \
176     JSEntity.h \
177     JSHTMLAppletElement.h \
178     JSHTMLAnchorElement.h \
179     JSHTMLAreaElement.h \
180     JSHTMLBaseElement.h \
181     JSHTMLBaseFontElement.h \
182     JSHTMLBlockquoteElement.h \
183     JSHTMLBodyElement.h \
184     JSHTMLBRElement.h \
185     JSHTMLButtonElement.h \
186     JSHTMLCanvasElement.h \
187     JSHTMLDirectoryElement.h \
188     JSHTMLDivElement.h \
189     JSHTMLDListElement.h \
190     JSHTMLDocument.h \
191     JSHTMLElement.h \
192     JSHTMLFieldSetElement.h \
193     JSHTMLFontElement.h \
194     JSHTMLFormElement.h \
195     JSHTMLHeadElement.h \
196     JSHTMLHeadingElement.h \
197     JSHTMLHRElement.h \
198     JSHTMLImageElement.h \
199     JSHTMLIsIndexElement.h \
200     JSHTMLHtmlElement.h \
201     JSHTMLInputElement.h \
202     JSHTMLInputElementBaseTable.cpp \
203     JSHTMLLabelElement.h \
204     JSHTMLLegendElement.h \
205     JSHTMLLIElement.h \
206     JSHTMLLinkElement.h \
207     JSHTMLMenuElement.h \
208     JSHTMLOptionElement.h \
209     JSHTMLOptionsCollection.h \
210     JSHTMLOptGroupElement.h \
211     JSHTMLQuoteElement.h \
212     JSHTMLMapElement.h \
213     JSHTMLMetaElement.h \
214     JSHTMLModElement.h \
215     JSHTMLOListElement.h \
216     JSHTMLParagraphElement.h \
217     JSHTMLParamElement.h \
218     JSHTMLPreElement.h \
219     JSHTMLScriptElement.h \
220     JSHTMLStyleElement.h \
221     JSHTMLTextAreaElement.h \
222     JSHTMLTitleElement.h \
223     JSHTMLUListElement.h \
224     JSKeyboardEvent.h \
225     JSMouseEvent.h \
226     JSMutationEvent.h \
227     JSNode.h \
228     JSNodeFilter.h \
229     JSNodeIterator.h \
230     JSNotation.h \
231     JSOverflowEvent.h \
232     JSProcessingInstruction.h \
233     JSRange.h \
234     JSRangeException.h \
235     JSSVGZoomEvent.h \
236     JSSVGAElement.h \
237     JSSVGAngle.h \
238     JSSVGAnimatedAngle.h \
239     JSSVGAnimateColorElement.h \
240     JSSVGAnimateElement.h \
241     JSSVGAnimateTransformElement.h \
242     JSSVGAnimatedBoolean.h \
243     JSSVGAnimatedEnumeration.h \
244     JSSVGAnimatedInteger.h \
245     JSSVGAnimatedLength.h \
246     JSSVGAnimatedLengthList.h \
247     JSSVGAnimatedNumber.h \
248     JSSVGAnimatedNumberList.h \
249     JSSVGAnimatedPoints.h \
250     JSSVGAnimatedPreserveAspectRatio.h \
251     JSSVGAnimatedRect.h \
252     JSSVGAnimatedString.h \
253     JSSVGAnimatedTransformList.h \
254     JSSVGAnimationElement.h \
255     JSSVGColor.h \
256     JSSVGCircleElement.h \
257     JSSVGClipPathElement.h \
258     JSSVGComponentTransferFunctionElement.h \
259     JSSVGCursorElement.h \
260     JSSVGDefsElement.h \
261     JSSVGDescElement.h \
262     JSSVGDocument.h \
263     JSSVGLength.h \
264     JSSVGMatrix.h \
265     JSSVGMetadataElement.h \
266     JSSVGPathElement.h \
267     JSSVGPathSeg.h \
268     JSSVGPathSegArcAbs.h \
269     JSSVGPathSegArcRel.h \
270     JSSVGPathSegClosePath.h \
271     JSSVGPathSegCurvetoCubicAbs.h \
272     JSSVGPathSegCurvetoCubicRel.h \
273     JSSVGPathSegCurvetoCubicSmoothAbs.h \
274     JSSVGPathSegCurvetoCubicSmoothRel.h \
275     JSSVGPathSegCurvetoQuadraticAbs.h \
276     JSSVGPathSegCurvetoQuadraticRel.h \
277     JSSVGPathSegCurvetoQuadraticSmoothAbs.h \
278     JSSVGPathSegCurvetoQuadraticSmoothRel.h \
279     JSSVGPathSegLinetoAbs.h \
280     JSSVGPathSegLinetoHorizontalAbs.h \
281     JSSVGPathSegLinetoHorizontalRel.h \
282     JSSVGPathSegLinetoRel.h \
283     JSSVGPathSegLinetoVerticalAbs.h \
284     JSSVGPathSegLinetoVerticalRel.h \
285     JSSVGPathSegMovetoAbs.h \
286     JSSVGPathSegMovetoRel.h \
287     JSSVGNumberList.h \
288     JSSVGPaint.h \
289     JSSVGPathSegList.h \
290     JSSVGPatternElement.h \
291     JSSVGPointList.h \
292     JSSVGPolygonElement.h \
293     JSSVGPolylineElement.h \
294     JSSVGRadialGradientElement.h \
295     JSSVGRectElement.h \
296     JSSVGRenderingIntent.h \
297     JSSVGSetElement.h \
298     JSSVGScriptElement.h \
299     JSSVGStyleElement.h \
300     JSSVGSwitchElement.h \
301     JSSVGStopElement.h \
302     JSSVGStringList.h \
303     JSSVGSymbolElement.h \
304     JSSVGTRefElement.h \
305     JSSVGTSpanElement.h \
306     JSSVGTextElement.h \
307     JSSVGTextContentElement.h \
308     JSSVGTextPositioningElement.h \
309     JSSVGTitleElement.h \
310     JSSVGTransform.h \
311     JSSVGTransformList.h \
312     JSSVGUnitTypes.h \
313     JSSVGUseElement.h \
314     JSSVGViewElement.h \
315     JSSVGPointTable.cpp \
316     JSSVGPreserveAspectRatio.h \
317     JSSVGRectTable.cpp \
318     JSSVGElement.h \
319     JSSVGSVGElement.h \
320     JSSVGEllipseElement.h \
321     JSSVGFEBlendElement.h \
322     JSSVGFEColorMatrixElement.h \
323     JSSVGFEComponentTransferElement.h \
324     JSSVGFECompositeElement.h \
325     JSSVGFEDiffuseLightingElement.h \
326     JSSVGFEDisplacementMapElement.h \
327     JSSVGFEDistantLightElement.h \
328     JSSVGFEFloodElement.h \
329     JSSVGFEFuncAElement.h \
330     JSSVGFEFuncBElement.h \
331     JSSVGFEFuncGElement.h \
332     JSSVGFEFuncRElement.h \
333     JSSVGFEGaussianBlurElement.h \
334     JSSVGFEImageElement.h \
335     JSSVGFEMergeElement.h \
336     JSSVGFEMergeNodeElement.h \
337     JSSVGFEOffsetElement.h \
338     JSSVGFEPointLightElement.h \
339     JSSVGFESpecularLightingElement.h \
340     JSSVGFESpotLightElement.h \
341     JSSVGFETileElement.h \
342     JSSVGFETurbulenceElement.h \
343     JSSVGFilterElement.h \
344     JSSVGForeignObjectElement.h \
345     JSSVGGElement.h \
346     JSSVGGradientElement.h \
347     JSSVGImageElement.h \
348     JSSVGLength.h \
349     JSSVGLengthList.h \
350     JSSVGLineElement.h \
351     JSSVGLinearGradientElement.h \
352     JSSVGMaskElement.h \
353     JSSVGMarkerElement.h \
354     JSSVGTransform.h \
355     JSText.h \
356     JSTreeWalker.h \
357     JSUIEvent.h \
358     JSXPathEvaluator.h \
359     JSXPathExpression.h \
360     JSXPathNSResolver.h \
361     JSXPathResult.h \
362     JSWheelEvent.h \
363     JSXMLHttpRequest.lut.h \
364     JSXMLSerializer.h \
365     JSXSLTProcessor.lut.h \
366     SVGElementFactory.cpp \
367     SVGNames.cpp \
368     HTMLNames.cpp \
369     UserAgentStyleSheets.h \
370     XLinkNames.cpp \
371     XMLNames.cpp \
372     XPathGrammar.cpp \
373     kjs_css.lut.h \
374     kjs_dom.lut.h \
375     kjs_events.lut.h \
376     kjs_html.lut.h \
377     kjs_navigator.lut.h \
378     kjs_traversal.lut.h \
379     kjs_window.lut.h \
380     ksvgcssproperties.h \
381     ksvgcssvalues.h \
382     tokenizer.cpp \
383 #
384
385 # CSS property names and value keywords
386
387 CSSPropertyNames.h : css/CSSPropertyNames.in css/makeprop
388         cat $< > CSSPropertyNames.in
389         sh "$(WebCore)/css/makeprop"
390
391 CSSValueKeywords.h : css/CSSValueKeywords.in css/makevalues
392         cat $< > CSSValueKeywords.in
393         sh "$(WebCore)/css/makevalues"
394
395 # DOCTYPE strings
396
397 DocTypeStrings.cpp : html/DocTypeStrings.gperf
398         gperf -CEot -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $< > $@
399
400 # HTML entity names
401
402 HTMLEntityNames.c : html/HTMLEntityNames.gperf
403         gperf -a -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 $< > $@
404
405 # color names
406
407 ColorData.c : platform/ColorData.gperf
408         gperf -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@
409
410 # CSS tokenizer
411
412 tokenizer.cpp : css/tokenizer.flex css/maketokenizer
413         flex -t $< | perl $(WebCore)/css/maketokenizer > $@
414
415 # CSS grammar
416
417 CSSGrammar.cpp : css/CSSGrammar.y
418         bison -d -p cssyy $< -o $@
419         touch CSSGrammar.cpp.h
420         touch CSSGrammar.hpp
421         cat CSSGrammar.cpp.h CSSGrammar.hpp > CSSGrammar.h
422         rm -f CSSGrammar.cpp.h CSSGrammar.hpp
423
424 # XPath grammar
425
426 XPathGrammar.cpp : xml/XPathGrammar.y $(PROJECT_FILE)
427         bison -d -p xpathyy $< -o $@
428         touch XPathGrammar.cpp.h
429         touch XPathGrammar.hpp
430         cat XPathGrammar.cpp.h XPathGrammar.hpp > XPathGrammar.h
431         rm -f XPathGrammar.cpp.h XPathGrammar.hpp
432
433 # user agent style sheets
434
435 USER_AGENT_STYLE_SHEETS = $(WebCore)/css/html4.css $(WebCore)/css/quirks.css $(WebCore)/css/view-source.css $(WebCore)/css/svg.css 
436 UserAgentStyleSheets.h : css/make-css-file-arrays.pl $(USER_AGENT_STYLE_SHEETS)
437         perl $< $@ UserAgentStyleSheetsData.cpp $(USER_AGENT_STYLE_SHEETS)
438
439 # character set name table
440
441 CharsetData.cpp : platform/make-charset-table.pl platform/character-sets.txt $(ENCODINGS_FILE)
442         perl $^ $(ENCODINGS_PREFIX) > $@
443
444 # lookup tables for old-style JavaScript bindings
445
446 %.lut.h: %.cpp $(CREATE_HASH_TABLE)
447         $(CREATE_HASH_TABLE) $< > $@
448 %Table.cpp: %.cpp $(CREATE_HASH_TABLE)
449         $(CREATE_HASH_TABLE) $< > $@
450
451 # HTML tag and attribute names
452
453 HTMLNames.cpp : ksvg2/scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in
454         perl $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in \
455             --namespace HTML --namespacePrefix xhtml --cppNamespace WebCore --namespaceURI "http://www.w3.org/1999/xhtml" --attrsNullNamespace --output .
456
457 ifeq ($(findstring SVG_SUPPORT,$(FEATURE_DEFINES)), SVG_SUPPORT)
458
459 # SVG tag and attribute names
460 SVGElementFactory.cpp SVGNames.cpp : ksvg2/scripts/make_names.pl ksvg2/svg/svgtags.in ksvg2/svg/svgattrs.in
461         perl $< --tags $(WebCore)/ksvg2/svg/svgtags.in --attrs $(WebCore)/ksvg2/svg/svgattrs.in \
462             --namespace SVG --cppNamespace WebCore --namespaceURI "http://www.w3.org/2000/svg" --factory --attrsNullNamespace --output .
463
464 XLinkNames.cpp : ksvg2/scripts/make_names.pl ksvg2/misc/xlinkattrs.in
465         perl $< --attrs $(WebCore)/ksvg2/misc/xlinkattrs.in \
466             --namespace XLink --cppNamespace WebCore --namespaceURI "http://www.w3.org/1999/xlink" --output .
467
468 XMLNames.cpp : ksvg2/scripts/make_names.pl xml/xmlattrs.in
469         perl $< --attrs $(WebCore)/xml/xmlattrs.in \
470             --namespace XML --cppNamespace WebCore --namespaceURI "http://www.w3.org/XML/1998/namespace" --output .
471
472 # SVG CSS property names and value keywords
473
474 ksvgcssproperties.h : ksvg2/scripts/cssmakeprops css/CSSPropertyNames.in ksvg2/css/CSSPropertyNames.in
475         if sort $(WebCore)/css/CSSPropertyNames.in $(WebCore)/ksvg2/css/CSSPropertyNames.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
476         cat $(WebCore)/ksvg2/css/CSSPropertyNames.in > ksvgcssproperties.in
477         $(WebCore)/ksvg2/scripts/cssmakeprops -n SVG -f ksvgcssproperties.in
478
479 ksvgcssvalues.h : ksvg2/scripts/cssmakevalues css/CSSValueKeywords.in ksvg2/css/CSSValueKeywords.in
480         if sort $(WebCore)/css/CSSValueKeywords.in $(WebCore)/ksvg2/css/CSSValueKeywords.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
481         # Lower case all the values, as CSS values are case-insensitive
482         perl -ne 'print lc' $(WebCore)/ksvg2/css/CSSValueKeywords.in > ksvgcssvalues.in
483         $(WebCore)/ksvg2/scripts/cssmakevalues -n SVG -f ksvgcssvalues.in
484
485 else
486
487 SVGElementFactory.cpp :
488         echo > SVGElementFactory.cpp
489
490 SVGNames.cpp :
491         echo > SVGNames.cpp
492
493 XLinkNames.cpp :
494         echo > XLinkNames.cpp
495
496 XMLNames.cpp :
497         echo > XMLNames.cpp
498
499 ksvgcssproperties.h :
500         echo > ksvgcssproperties.h
501
502 ksvgcssvalues.h :
503         echo > ksvgcssvalues.h
504
505 endif
506
507 # new-style Objective-C bindings
508
509 OBJC_BINDINGS_SCRIPTS = \
510     bindings/scripts/CodeGenerator.pm \
511     bindings/scripts/CodeGeneratorObjC.pm \
512     bindings/scripts/IDLParser.pm \
513     bindings/scripts/IDLStructure.pm \
514     bindings/scripts/generate-bindings.pl \
515 #
516
517 DOM%.h : %.idl $(OBJC_BINDINGS_SCRIPTS) bindings/objc/PublicDOMInterfaces.h
518         perl -I $(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/xpath --include $(WebCore)/ksvg2/svg --outputdir . $<
519
520 # new-style JavaScript bindings
521
522 JS_BINDINGS_SCRIPTS = \
523     bindings/scripts/CodeGenerator.pm \
524     bindings/scripts/CodeGeneratorJS.pm \
525     bindings/scripts/IDLParser.pm \
526     bindings/scripts/IDLStructure.pm \
527     bindings/scripts/generate-bindings.pl \
528 #
529
530 JS%.h : %.idl $(JS_BINDINGS_SCRIPTS)
531         perl -I $(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --include dom --include html --include xml --include ksvg2/svg --outputdir . $<