[webkit-dev] Related to .IN files for CSS
mrowe at apple.com
Sun Aug 10 00:11:30 PDT 2008
On 2008-08-10, at 18:25, Javed Rabbani wrote:
> Hello everyone,
> While going through the Webkit source, I have come across few .IN
> files that are used to generate files through the Perl script just
> These .IN files are mainly related to CSS. I am not sure what these
> files are for and why is it necessary to generate corresponding
> files from them? Thanks.
From memory, the .in files are broken down into two categories:
1) Those in the css directory are passed to gperf by way of css/
makeprop.pl to generate hash tables for mapping character strings
representing CSS properties and values into an identifier, and vice
2) The remainder are passed to dom/make_names.pl in order to generate
constants representing tag names and attributes for HTML, SVG, etc.
The reason these files are generated is similar to why we use IDLs to
simplify the generation of bindings-related code: it makes working
with the code simpler. If you take a look at the generated source
files, you'll notice that there is a lot of duplication and
complicated algorithms in the generated code. Maintaining it by hand
would be a lot more painful than having a script maintain it for us.
(CSSValueKeywords.c is a good example of the generated code for case
1, HTMLNames.cpp a good example of case 2. These typically get
generated into your build directory. For instance, on the Mac they
are created inside WebKitBuild/Debug/DerivedSources/WebCore/.)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2413 bytes
Desc: not available
Url : http://lists.webkit.org/pipermail/webkit-dev/attachments/20080810/1ae4509e/attachment.bin
More information about the webkit-dev