Changeset 224186 in webkit


Ignore:
Timestamp:
Oct 30, 2017 10:57:38 AM (6 years ago)
Author:
dbates@webkit.org
Message:

Use if conditional function in DerivedSources.make to reduce duplication
https://bugs.webkit.org/show_bug.cgi?id=178989

Reviewed by Darin Adler.

In DerivedSources.make we currently duplicate most of the Makefile recipe for generating HTML/SVG
tags and attributes to support passing the optional command line option --extraDefines when one
or more HTML/SVG compile-time features are enabled. Instead we can make use of a Makefile
conditional function in the recipe itself to avoid code duplication.

  • DerivedSources.make:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r224181 r224186  
     12017-10-30  Daniel Bates  <dabates@apple.com>
     2
     3        Use if conditional function in DerivedSources.make to reduce duplication
     4        https://bugs.webkit.org/show_bug.cgi?id=178989
     5
     6        Reviewed by Darin Adler.
     7
     8        In DerivedSources.make we currently duplicate most of the Makefile recipe for generating HTML/SVG
     9        tags and attributes to support passing the optional command line option --extraDefines when one
     10        or more HTML/SVG compile-time features are enabled. Instead we can make use of a Makefile
     11        conditional function in the recipe itself to avoid code duplication.
     12
     13        * DerivedSources.make:
     14
    1152017-10-30  Antoine Quint  <graouts@apple.com>
    216
  • trunk/Source/WebCore/DerivedSources.make

    r223973 r224186  
    13091309all : JSHTMLElementWrapperFactory.cpp JSHTMLElementWrapperFactory.h HTMLElementFactory.cpp HTMLElementFactory.h HTMLElementTypeHelpers.h HTMLNames.cpp HTMLNames.h
    13101310
    1311 ifdef HTML_FLAGS
    1312 
    13131311JSHTMLElementWrapperFactory%cpp JSHTMLElementWrapperFactory%h HTMLElementFactory%cpp HTMLElementFactory%h HTMLElementTypeHelpers%h HTMLNames%cpp HTMLNames%h : dom/make_names.pl bindings/scripts/Hasher.pm bindings/scripts/StaticString.pm html/HTMLTagNames.in html/HTMLAttributeNames.in
    1314         $(PERL) $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in --factory --wrapperFactory --extraDefines "$(HTML_FLAGS)"
    1315 
    1316 else
    1317 
    1318 JSHTMLElementWrapperFactory%cpp JSHTMLElementWrapperFactory%h HTMLElementFactory%cpp HTMLElementFactory%h HTMLElementTypeHelpers%h HTMLNames%cpp HTMLNames%h : dom/make_names.pl bindings/scripts/Hasher.pm bindings/scripts/StaticString.pm html/HTMLTagNames.in html/HTMLAttributeNames.in
    1319         $(PERL) $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in --factory --wrapperFactory
    1320 
    1321 endif
     1312        $(PERL) $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in --factory --wrapperFactory $(if $(HTML_FLAGS), --extraDefines "$(HTML_FLAGS)")
    13221313
    13231314XMLNSNames.cpp : dom/make_names.pl bindings/scripts/Hasher.pm bindings/scripts/StaticString.pm xml/xmlnsattrs.in
     
    13391330all : JSSVGElementWrapperFactory.cpp JSSVGElementWrapperFactory.h SVGElementFactory.cpp SVGElementFactory.h SVGElementTypeHelpers.h SVGNames.cpp SVGNames.h
    13401331
    1341 ifdef SVG_FLAGS
    13421332JSSVGElementWrapperFactory%cpp JSSVGElementWrapperFactory%h SVGElementFactory%cpp SVGElementFactory%h SVGElementTypeHelpers%h SVGNames%cpp SVGNames%h : dom/make_names.pl bindings/scripts/Hasher.pm bindings/scripts/StaticString.pm svg/svgtags.in svg/svgattrs.in
    1343         $(PERL) $< --tags $(WebCore)/svg/svgtags.in --attrs $(WebCore)/svg/svgattrs.in --extraDefines "$(SVG_FLAGS)" --factory --wrapperFactory
    1344 else
    1345 
    1346 JSSVGElementWrapperFactory%cpp JSSVGElementWrapperFactory%h SVGElementFactory%cpp SVGElementFactory%h SVGElementTypeHelpers%h SVGNames%cpp SVGNames%h : dom/make_names.pl bindings/scripts/Hasher.pm bindings/scripts/StaticString.pm svg/svgtags.in svg/svgattrs.in
    1347         $(PERL) $< --tags $(WebCore)/svg/svgtags.in --attrs $(WebCore)/svg/svgattrs.in --factory --wrapperFactory
    1348 
    1349 endif
     1333        $(PERL) $< --tags $(WebCore)/svg/svgtags.in --attrs $(WebCore)/svg/svgattrs.in --factory --wrapperFactory $(if $(SVG_FLAGS), --extraDefines "$(SVG_FLAGS)")
    13501334
    13511335XLinkNames.cpp : dom/make_names.pl bindings/scripts/Hasher.pm bindings/scripts/StaticString.pm svg/xlinkattrs.in
Note: See TracChangeset for help on using the changeset viewer.