Changeset 61091 in webkit


Ignore:
Timestamp:
Jun 13, 2010 6:54:07 AM (14 years ago)
Author:
abecsi@webkit.org
Message:

Centralize the gperf code generation commands into make-hash-tools.pl
to avoid redundancy across multiple build systems.
Do this in preparation of refactoring the usage of these generated
sources to fix the debug linking error on Linux with gcc >= 4.4.0.

WebCore:

Reviewed by Darin Adler.

webkit.org/b/29244

No functionality change, so no new tests needed.

  • DerivedSources.make:
  • GNUmakefile.am:
  • WebCore.gyp/WebCore.gyp:
  • WebCore.gyp/scripts/rule_gperf.py: Removed.
  • WebCore.pri:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSParser.cpp:

(WebCore::cssPropertyID):
(WebCore::cssValueKeywordID):

  • css/makeprop.pl:
  • css/makevalues.pl:
  • html/DocTypeStrings.gperf:
  • html/HTML5EntityParser.cpp:
  • html/HTMLDocumentParser.cpp:
  • html/HTMLEntityNames.gperf:
  • html/PreloadScanner.cpp:
  • make-hash-tools.pl: Added.
  • platform/ColorData.gperf:
  • platform/graphics/Color.cpp:

WebKit/chromium:

Patch by Andras Becsi <abecsi@inf.u-szeged.hu> on 2010-06-13
Reviewed by Darin Adler.

webkit.org/b/29244

  • src/WebEntities.cpp:
Location:
trunk
Files:
1 added
1 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r61089 r61091  
     12010-06-13  Andras Becsi  <abecsi@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Centralize the gperf code generation commands into make-hash-tools.pl
     6        to avoid redundancy across multiple build systems.
     7        Do this in preparation of refactoring the usage of these generated
     8        sources to fix the debug linking error on Linux with gcc >= 4.4.0.
     9
     10        webkit.org/b/29244
     11
     12        No functionality change, so no new tests needed.
     13
     14        * DerivedSources.make:
     15        * GNUmakefile.am:
     16        * WebCore.gyp/WebCore.gyp:
     17        * WebCore.gyp/scripts/rule_gperf.py: Removed.
     18        * WebCore.pri:
     19        * WebCore.xcodeproj/project.pbxproj:
     20        * css/CSSParser.cpp:
     21        (WebCore::cssPropertyID):
     22        (WebCore::cssValueKeywordID):
     23        * css/makeprop.pl:
     24        * css/makevalues.pl:
     25        * html/DocTypeStrings.gperf:
     26        * html/HTML5EntityParser.cpp:
     27        * html/HTMLDocumentParser.cpp:
     28        * html/HTMLEntityNames.gperf:
     29        * html/PreloadScanner.cpp:
     30        * make-hash-tools.pl: Added.
     31        * platform/ColorData.gperf:
     32        * platform/graphics/Color.cpp:
     33
    1342010-06-13  Noam Rosenthal  <noam.rosenthal@nokia.com>
    235
  • trunk/WebCore/DerivedSources.make

    r60902 r61091  
    474474    CSSPropertyNames.h \
    475475    CSSValueKeywords.h \
    476     ColorData.c \
     476    ColorData.cpp \
    477477    DocTypeStrings.cpp \
    478478    HTMLElementFactory.cpp \
    479     HTMLEntityNames.c \
     479    HTMLEntityNames.cpp \
    480480    HTMLNames.cpp \
    481481    WMLElementFactory.cpp \
     
    565565# DOCTYPE strings
    566566
    567 DocTypeStrings.cpp : html/DocTypeStrings.gperf
    568         gperf -CEot -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $< > $@
     567DocTypeStrings.cpp : html/DocTypeStrings.gperf $(WebCore)/make-hash-tools.pl
     568        perl $(WebCore)/make-hash-tools.pl . $(WebCore)/html/DocTypeStrings.gperf
    569569
    570570# --------
     
    572572# HTML entity names
    573573
    574 HTMLEntityNames.c : html/HTMLEntityNames.gperf
    575         gperf -a -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 $< > $@
     574HTMLEntityNames.cpp : html/HTMLEntityNames.gperf $(WebCore)/make-hash-tools.pl
     575        perl $(WebCore)/make-hash-tools.pl . $(WebCore)/html/HTMLEntityNames.gperf
    576576
    577577# --------
     
    579579# color names
    580580
    581 ColorData.c : platform/ColorData.gperf
    582         gperf -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@
     581ColorData.cpp : platform/ColorData.gperf $(WebCore)/make-hash-tools.pl
     582        perl $(WebCore)/make-hash-tools.pl . $(WebCore)/platform/ColorData.gperf
    583583
    584584# --------
  • trunk/WebCore/GNUmakefile.am

    r61085 r61091  
    8484        DerivedSources/DocTypeStrings.cpp \
    8585        DerivedSources/tokenizer.cpp \
    86         DerivedSources/ColorData.c \
     86        DerivedSources/ColorData.cpp \
    8787        DerivedSources/webkit/webkitdomdummy.c
    8888
     
    9393        DerivedSources/CSSValueKeywords.h \
    9494        DerivedSources/HTMLElementFactory.cpp \
    95         DerivedSources/HTMLEntityNames.c \
     95        DerivedSources/HTMLEntityNames.cpp \
    9696        DerivedSources/HTMLNames.cpp \
    9797        DerivedSources/JSHTMLElementWrapperFactory.cpp \
     
    38073807
    38083808# DOCTYPE strings
    3809 DerivedSources/DocTypeStrings.cpp : $(WebCore)/html/DocTypeStrings.gperf
    3810         $(AM_V_GEN)$(GPERF) -CEot -I -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $(WebCore)/html/DocTypeStrings.gperf > $@
     3809DerivedSources/DocTypeStrings.cpp : $(WebCore)/html/DocTypeStrings.gperf $(WebCore)/make-hash-tools.pl
     3810        $(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES) $(WebCore)/html/DocTypeStrings.gperf
    38113811
    38123812# HTML entity names
    3813 DerivedSources/HTMLEntityNames.c : $(WebCore)/html/HTMLEntityNames.gperf
    3814         $(AM_V_GEN)$(GPERF) -a -I -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 \
    3815         $(WebCore)/html/HTMLEntityNames.gperf > $@
     3813DerivedSources/HTMLEntityNames.cpp : $(WebCore)/html/HTMLEntityNames.gperf $(WebCore)/make-hash-tools.pl
     3814        $(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES) $(WebCore)/html/HTMLEntityNames.gperf
    38163815
    38173816# color names
    3818 DerivedSources/ColorData.c: $(WebCore)/platform/ColorData.gperf
    3819         $(AM_V_GEN)$(GPERF) -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@
     3817DerivedSources/ColorData.cpp: $(WebCore)/platform/ColorData.gperf $(WebCore)/make-hash-tools.pl
     3818        $(PERL) $(WebCore)/make-hash-tools.pl $(GENSOURCES) $(WebCore)/platform/ColorData.gperf
    38203819
    38213820# CSS tokenizer
  • trunk/WebCore/WebCore.gyp/WebCore.gyp

    r60326 r61091  
    315315          ],
    316316          'outputs': [
    317             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.c',
     317            '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
    318318            '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.h',
    319319          ],
     
    532532          'rule_name': 'gperf',
    533533          'extension': 'gperf',
    534           # gperf output is only ever #included by other source files.  As
    535           # such, process_outputs_as_sources is off.  Some gperf output is
    536           # #included as *.c and some as *.cpp.  Since there's no way to tell
    537           # which one will be needed in a rule definition, declare both as
    538           # outputs.  The harness script will generate one file and copy it to
    539           # the other.
    540534          #
    541           # This rule places outputs in SHARED_INTERMEDIATE_DIR because glue
    542           # needs access to HTMLEntityNames.c.
    543           'outputs': [
    544             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).c',
     535          # gperf outputs are generated by WebCore/make-hash-tools.pl
     536          #
     537          'outputs': [
    545538            '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
    546539          ],
    547           'action': [
    548             'python',
    549             'scripts/rule_gperf.py',
     540          'dependencies': [
     541            '../make-hash-tools.pl',
     542          ],
     543          'action': [
     544            'perl',
     545            '../make-hash-tools.pl',
     546            '<(SHARED_INTERMEDIATE_DIR)/webkit',
    550547            '<(RULE_INPUT_PATH)',
    551             '<(SHARED_INTERMEDIATE_DIR)/webkit'
    552548          ],
    553549          'process_outputs_as_sources': 0,
  • trunk/WebCore/WebCore.pri

    r60902 r61091  
    182182TOKENIZER = $$PWD/css/tokenizer.flex
    183183
    184 DOCTYPESTRINGS = $$PWD/html/DocTypeStrings.gperf
     184DOCTYPESTRINGS_GPERF = $$PWD/html/DocTypeStrings.gperf
    185185
    186186CSSBISON = $$PWD/css/CSSGrammar.y
     
    194194ENTITIES_GPERF = $$PWD/html/HTMLEntityNames.gperf
    195195
    196 COLORDAT_GPERF = $$PWD/platform/ColorData.gperf
     196COLORDATA_GPERF = $$PWD/platform/ColorData.gperf
    197197
    198198WALDOCSSPROPS = $$PWD/css/CSSPropertyNames.in
     
    663663
    664664# GENERATOR 6-A:
    665 cssprops.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
     665cssprops.wkScript = $$PWD/css/makeprop.pl
     666cssprops.output = $${WC_GENERATED_SOURCES_DIR}/CSSPropertyNames.cpp
    666667cssprops.input = WALDOCSSPROPS
    667 cssprops.wkScript = $$PWD/css/makeprop.pl
    668668cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssprops.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
    669669cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES}
     
    671671
    672672# GENERATOR 6-B:
    673 cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.c
     673cssvalues.wkScript = $$PWD/css/makevalues.pl
     674cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/CSSValueKeywords.cpp
    674675cssvalues.input = WALDOCSSVALUES
    675 cssvalues.wkScript = $$PWD/css/makevalues.pl
    676676cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssvalues.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
    677677cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES}
     
    730730
    731731# GENERATOR 8-A:
    732 entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c
     732entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.cpp
    733733entities.input = ENTITIES_GPERF
    734 entities.commands = gperf -a -L ANSI-C -C -G -c -o -t --includes --key-positions="*" -N findEntity -D -s 2 < $$PWD/html/HTMLEntityNames.gperf > $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c
     734entities.wkScript = $$PWD/make-hash-tools.pl
     735entities.commands = perl $$entities.wkScript $${WC_GENERATED_SOURCES_DIR} $$ENTITIES_GPERF
    735736entities.clean = ${QMAKE_FILE_OUT}
     737entities.depends = $$PWD/make-hash-tools.pl
    736738addExtraCompiler(entities)
    737739
    738740# GENERATOR 8-B:
    739 doctypestrings.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
    740 doctypestrings.input = DOCTYPESTRINGS
    741 doctypestrings.commands = gperf -CEot -L ANSI-C --includes --key-positions="*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
     741doctypestrings.output = $${WC_GENERATED_SOURCES_DIR}/DocTypeStrings.cpp
     742doctypestrings.input = DOCTYPESTRINGS_GPERF
     743doctypestrings.wkScript = $$PWD/make-hash-tools.pl
     744doctypestrings.commands = perl $$doctypestrings.wkScript $${WC_GENERATED_SOURCES_DIR} $$DOCTYPESTRINGS_GPERF
    742745doctypestrings.clean = ${QMAKE_FILE_OUT}
     746doctypestrings.depends = $$PWD/make-hash-tools.pl
    743747addExtraCompiler(doctypestrings)
    744748
    745749# GENERATOR 8-C:
    746 colordata.output = $${WC_GENERATED_SOURCES_DIR}/ColorData.c
    747 colordata.input = COLORDAT_GPERF
    748 colordata.commands = gperf -CDEot -L ANSI-C --includes --key-positions="*" -N findColor -D -s 2 < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
     750colordata.output = $${WC_GENERATED_SOURCES_DIR}/ColorData.cpp
     751colordata.input = COLORDATA_GPERF
     752colordata.wkScript = $$PWD/make-hash-tools.pl
     753colordata.commands = perl $$colordata.wkScript $${WC_GENERATED_SOURCES_DIR} $$COLORDATA_GPERF
     754colordata.clean = ${QMAKE_FILE_OUT}
     755colordata.depends = $$PWD/make-hash-tools.pl
    749756addExtraCompiler(colordata)
    750757
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r61073 r61091  
    68936893                65653F2B0D9727D200CA9723 /* SVGAltGlyphElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAltGlyphElement.h; sourceTree = "<group>"; };
    68946894                65653F2C0D9727D200CA9723 /* SVGAltGlyphElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGAltGlyphElement.idl; sourceTree = "<group>"; };
    6895                 656580ED09D12B20000E61D7 /* CSSPropertyNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPropertyNames.cpp; sourceTree = "<group>"; };
    68966895                656580EE09D12B20000E61D7 /* CSSPropertyNames.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSPropertyNames.gperf; sourceTree = "<group>"; };
    68976896                656580EF09D12B20000E61D7 /* CSSPropertyNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSPropertyNames.h; sourceTree = "<group>"; };
    6898                 6565811C09D12DB2000E61D7 /* DocTypeStrings.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DocTypeStrings.cpp; sourceTree = "<group>"; };
    68996897                6565814409D13043000E61D7 /* CSSGrammar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSGrammar.cpp; sourceTree = "<group>"; };
    6900                 6565814609D13043000E61D7 /* CSSValueKeywords.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = CSSValueKeywords.c; sourceTree = "<group>"; };
    69016898                6565814709D13043000E61D7 /* CSSValueKeywords.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSValueKeywords.gperf; sourceTree = "<group>"; };
    69026899                6565814809D13043000E61D7 /* CSSValueKeywords.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSValueKeywords.h; sourceTree = "<group>"; };
    6903                 6565814B09D13043000E61D7 /* HTMLEntityNames.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = HTMLEntityNames.c; sourceTree = "<group>"; };
    69046900                6565814C09D13043000E61D7 /* tokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tokenizer.cpp; sourceTree = "<group>"; };
    69056901                656581AC09D14EE6000E61D7 /* CharsetData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CharsetData.cpp; sourceTree = "<group>"; };
    6906                 656581AD09D14EE6000E61D7 /* ColorData.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ColorData.c; sourceTree = "<group>"; };
    69076902                656581AE09D14EE6000E61D7 /* UserAgentStyleSheets.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UserAgentStyleSheets.h; sourceTree = "<group>"; };
    69086903                656581AF09D14EE6000E61D7 /* UserAgentStyleSheetsData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UserAgentStyleSheetsData.cpp; sourceTree = "<group>"; };
     
    1055110546                E1FF57A20F01255B00891EBB /* ThreadGlobalData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadGlobalData.h; sourceTree = "<group>"; };
    1055210547                E1FF57A50F01256B00891EBB /* ThreadGlobalData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadGlobalData.cpp; sourceTree = "<group>"; };
     10548                E406F3FA1198304D009D59D6 /* DocTypeStrings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DocTypeStrings.cpp; path = DocTypeStrings.cpp; sourceTree = "<group>"; };
     10549                E406F3FB1198307D009D59D6 /* ColorData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorData.cpp; path = ColorData.cpp; sourceTree = "<group>"; };
     10550                E406F4021198329A009D59D6 /* HTMLEntityNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLEntityNames.cpp; path = HTMLEntityNames.cpp; sourceTree = "<group>"; };
     10551                E41EA038119836DB00710BC5 /* CSSPropertyNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSPropertyNames.cpp; path = CSSPropertyNames.cpp; sourceTree = "<group>"; };
     10552                E41EA0391198374900710BC5 /* CSSValueKeywords.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSValueKeywords.cpp; path = CSSValueKeywords.cpp; sourceTree = "<group>"; };
    1055310553                E415F10C0D9A05870033CE97 /* ElementTimeControl.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ElementTimeControl.idl; sourceTree = "<group>"; };
    1055410554                E415F1680D9A165D0033CE97 /* DOMElementTimeControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMElementTimeControl.h; sourceTree = "<group>"; };
     
    1184711847                        isa = PBXGroup;
    1184811848                        children = (
     11849                                E41EA0391198374900710BC5 /* CSSValueKeywords.cpp */,
     11850                                E41EA038119836DB00710BC5 /* CSSPropertyNames.cpp */,
     11851                                E406F4021198329A009D59D6 /* HTMLEntityNames.cpp */,
     11852                                E406F3FB1198307D009D59D6 /* ColorData.cpp */,
     11853                                E406F3FA1198304D009D59D6 /* DocTypeStrings.cpp */,
    1184911854                                656581AC09D14EE6000E61D7 /* CharsetData.cpp */,
    11850                                 656581AD09D14EE6000E61D7 /* ColorData.c */,
    1185111855                                6565814409D13043000E61D7 /* CSSGrammar.cpp */,
    1185211856                                650F53DB09D15DDA00C9B0C8 /* CSSGrammar.h */,
    11853                                 656580ED09D12B20000E61D7 /* CSSPropertyNames.cpp */,
    1185411857                                656580EE09D12B20000E61D7 /* CSSPropertyNames.gperf */,
    1185511858                                656580EF09D12B20000E61D7 /* CSSPropertyNames.h */,
    11856                                 6565814609D13043000E61D7 /* CSSValueKeywords.c */,
    1185711859                                6565814709D13043000E61D7 /* CSSValueKeywords.gperf */,
    1185811860                                6565814809D13043000E61D7 /* CSSValueKeywords.h */,
    11859                                 6565811C09D12DB2000E61D7 /* DocTypeStrings.cpp */,
    1186011861                                A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */,
    1186111862                                A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */,
    11862                                 6565814B09D13043000E61D7 /* HTMLEntityNames.c */,
    1186311863                                A8D06B380A265DCD005E7203 /* HTMLNames.cpp */,
    1186411864                                A8D06B370A265DCD005E7203 /* HTMLNames.h */,
  • trunk/WebCore/css/CSSParser.cpp

    r60849 r61091  
    9090
    9191#include "CSSPropertyNames.cpp"
    92 #include "CSSValueKeywords.c"
     92#include "CSSValueKeywords.cpp"
    9393
    9494namespace WebCore {
     
    55615561    }
    55625562
    5563     const props* hashTableEntry = findProp(name, length);
     5563    const Property* hashTableEntry = findProperty(name, length);
    55645564    return hashTableEntry ? hashTableEntry->id : 0;
    55655565}
     
    56035603    }
    56045604
    5605     const css_value* hashTableEntry = findValue(buffer, length);
     5605    const Value* hashTableEntry = findValue(buffer, length);
    56065606    return hashTableEntry ? hashTableEntry->id : 0;
    56075607}
  • trunk/WebCore/css/makeprop.pl

    r46237 r61091  
    66#   Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
    77#   Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
     8#   Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged
    89#
    910#   This library is free software; you can redistribute it and/or
     
    4041#include \"CSSPropertyNames.h\"
    4142%}
    42 struct props {
     43%struct-type
     44struct Property {
    4345    const char* name;
    4446    int id;
    4547};
     48%language=ANSI-C
     49%readonly-tables
     50%global-table
     51%compare-strncmp
     52%define lookup-function-name findProperty
     53%define hash-function-name propery_hash_function
     54%define word-array-name property_wordlist
     55%includes
     56%enum
    4657%%
    4758EOF
     
    89100const char* getPropertyName(CSSPropertyID);
    90101
    91 #endif
     102#endif // CSSPropertyNames_h
     103
    92104EOF
    93105
    94106close HEADER;
    95107
    96 system("gperf -a -L ANSI-C -E -C -c -o -t --key-positions=\"*\" -NfindProp -Hhash_prop -Wwordlist_prop -D -s 2 CSSPropertyNames.gperf > CSSPropertyNames.cpp") == 0 || die "calling gperf failed: $?";
     108system("gperf --key-positions=\"*\" -D -n -s 2 CSSPropertyNames.gperf > CSSPropertyNames.cpp") == 0 || die "calling gperf failed: $?";
    97109
    98110open C, ">>CSSPropertyNames.cpp" || die "Could not open CSSPropertyNames.cpp for writing";
  • trunk/WebCore/css/makevalues.pl

    r49584 r61091  
    66#   Copyright (C) 2007 Apple Inc. All rights reserved.
    77#   Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
     8#   Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged
    89#
    910#   This library is free software; you can redistribute it and/or
     
    4142#include \"CSSValueKeywords.h\"
    4243%}
    43 struct css_value {
     44%struct-type
     45struct Value {
    4446    const char* name;
    4547    int id;
    4648};
     49%language=ANSI-C
     50%readonly-tables
     51%compare-strncmp
     52%define lookup-function-name findValue
     53%define hash-function-name value_hash_function
     54%define word-array-name value_word_list
     55%includes
     56%enum
    4757%%
    4858EOF
     
    6070/* This file is automatically generated from CSSValueKeywords.in by makevalues, do not edit */
    6171
    62 #ifndef CSSValues_h
    63 #define CSSValues_h
     72#ifndef CSSValueKeywords_h
     73#define CSSValueKeywords_h
    6474
    6575const int CSSValueInvalid = 0;
     
    8393const char* getValueName(unsigned short id);
    8494
    85 #endif
     95#endif // CSSValueKeywords_h
    8696EOF
    8797close HEADER;
    8898
    89 system("gperf -L ANSI-C -E -C -n -o -t --key-positions=\"*\" -NfindValue -Hhash_val -Wwordlist_value -D CSSValueKeywords.gperf > CSSValueKeywords.c") == 0 || die "calling gperf failed: $?";
     99system("gperf --key-positions=\"*\" -D -n -s 2 CSSValueKeywords.gperf > CSSValueKeywords.cpp") == 0 || die "calling gperf failed: $?";
    90100
    91 open C, ">>CSSValueKeywords.c" || die "Could not open CSSValueKeywords.c for writing";
     101open C, ">>CSSValueKeywords.cpp" || die "Could not open CSSValueKeywords.cpp for writing";
    92102print C  "static const char * const valueList[] = {\n";
    93103print C  "\"\",\n";
  • trunk/WebCore/html/DocTypeStrings.gperf

    r13397 r61091  
     1%struct-type
    12struct PubIDInfo {
    23    enum eMode {
     
    1011    eMode mode_if_sysid;
    1112}
     13%language=ANSI-C
     14%readonly-tables
     15%global-table
     16%compare-strncmp
     17%define initializer-suffix ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards
     18%define lookup-function-name findDoctypeEntry
     19%define hash-function-name doctype_hash_function
     20%includes
     21%enum
    1222%%
    1323"+//silmaril//dtd html pro v0r11 19970101//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
  • trunk/WebCore/html/HTML5EntityParser.cpp

    r60941 r61091  
    3434#ifdef __GNUC__
    3535// The main tokenizer includes this too so we are getting two copies of the data. However, this way the code gets inlined.
    36 #include "HTMLEntityNames.c"
     36#include "HTMLEntityNames.cpp"
    3737#else
    3838// Not inlined for non-GCC compilers
  • trunk/WebCore/html/HTMLDocumentParser.cpp

    r61073 r61091  
    5656#include <wtf/CurrentTime.h>
    5757
    58 #include "HTMLEntityNames.c"
     58#include "HTMLEntityNames.cpp"
    5959
    6060#define PRELOAD_SCANNER_ENABLED 1
  • trunk/WebCore/html/HTMLEntityNames.gperf

    r39556 r61091  
    2222 
    2323    HTMLEntityNames.gperf: input file to generate a hash table for entities
    24     HTMLEntityNames.c: DO NOT EDIT! generated by the command
    25     "gperf -a -L "ANSI-C" -C -G -c -o -t -k '*' -NfindEntity -D -s 2 HTMLEntityNames.gperf > entities.c"   
    26     from HTMLEntityNames.gperf
     24    HTMLEntityNames.cpp: DO NOT EDIT! generated by WebCore/make-hash-tools.pl
    2725*/
    2826%}
     27%struct-type
    2928struct Entity {
    3029    const char *name;
    3130    int code;
    3231};
     32%language=ANSI-C
     33%readonly-tables
     34%global-table
     35%compare-strncmp
     36%define lookup-function-name findEntity
     37%define hash-function-name entity_hash_function
     38%includes
     39%enum
    3340%%
    3441AElig, 0x00c6
  • trunk/WebCore/html/PreloadScanner.cpp

    r59511 r61091  
    4848#ifdef __GNUC__
    4949// The main tokenizer includes this too so we are getting two copies of the data. However, this way the code gets inlined.
    50 #include "HTMLEntityNames.c"
     50#include "HTMLEntityNames.cpp"
    5151#else
    5252// Not inlined for non-GCC compilers
  • trunk/WebCore/platform/ColorData.gperf

    r12340 r61091  
    1 struct NamedColor { const char *name; int RGBValue; };
     1%struct-type
     2struct NamedColor {
     3    const char *name;
     4    int RGBValue;
     5};
     6%language=ANSI-C
     7%readonly-tables
     8%global-table
     9%compare-strncmp
     10%define lookup-function-name findColor
     11%define hash-function-name colordata_hash_function
     12%includes
     13%enum
    214%%
    315aliceblue, 0xf0f8ff
  • trunk/WebCore/platform/graphics/Color.cpp

    r59768 r61091  
    3232#include <wtf/MathExtras.h>
    3333
    34 #include "ColorData.c"
     34#include "ColorData.cpp"
    3535
    3636using namespace std;
  • trunk/WebKit/chromium/ChangeLog

    r61073 r61091  
     12010-06-13  Andras Becsi  <abecsi@inf.u-szeged.hu>
     2
     3        Reviewed by Darin Adler.
     4
     5        Centralize the gperf code generation commands into make-hash-tools.pl
     6        to avoid redundancy across multiple build systems.
     7        Do this in preparation of refactoring the usage of these generated
     8        sources to fix the debug linking error on Linux with gcc >= 4.4.0.
     9
     10        webkit.org/b/29244
     11
     12        * src/WebEntities.cpp:
     13
    1142010-06-11  Eric Seidel  <eric@webkit.org>
    215
  • trunk/WebKit/chromium/src/WebEntities.cpp

    r61073 r61091  
    4848// this is low priority since the data is less than 4K. We use anonymous
    4949// namespace to prevent name collisions.
    50 #include "HTMLEntityNames.c" // NOLINT
     50#include "HTMLEntityNames.cpp" // NOLINT
    5151}
    5252
Note: See TracChangeset for help on using the changeset viewer.