Summary: | [CSS] Make makevalues.pl and makeprop.pl ignore '#'s. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Raphael Kubo da Costa (:rakuco) <rakuco> | ||||||
Component: | Tools / Tests | Assignee: | Raphael Kubo da Costa (:rakuco) <rakuco> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, darin, eric, macpherson, menard, rniwa, tony, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Raphael Kubo da Costa (:rakuco)
2012-04-04 13:58:43 PDT
Created attachment 135673 [details]
Patch
By this point, haven't we already run the .in files through the preprocessor and the preprocessor already handled the lines beginning with # (e.g., #if/#endif). What's an example of a line starting with # that makes it through the preprocessor? (In reply to comment #2) > What's an example of a line starting with # that makes it through the preprocessor? The ones produced by the preprocessor when -P is not passed to it: # 1 "/home/rakuco/dev/webkit/WebKit/Source/WebCore/html/HTMLTagNames.in" # 1 "<command-line>" # 1 "/home/rakuco/dev/webkit/WebKit/Source/WebCore/html/HTMLTagNames.in" etc Just in case I wasn't clear enough: this patch is a side-effect of my intentions to make the CMake-based ports work with GCC 4.7 without changing the parameters currently passed to the preprocessor. "-P" is always being passed to the preprocessor, but this breaks dom/make_names.pl due to GCC not outputting empty lines with "-P" anymore; if I switch to never passing "-P" (my aim), the CSS scripts currently break because of the additional lines output by the preprocessor. I see, your plan is to remove -P in preprocessor.pm because -P causes you to lose empty lines which are needed by make_names.pl and InFilesParser.pm. This wasn't clear to me in the ChangeLog description. Would it be possible to have applyPreprocessor take a flag for whether it wants -P or not? Or more generally, maybe applyPreprocessor can take an optional argument that is flags to pass to gcc. If the argument is omitted, it adds "-E -P -x c++". (In reply to comment #5) > I see, your plan is to remove -P in preprocessor.pm because -P causes you to lose empty lines which are needed by make_names.pl and InFilesParser.pm. This wasn't clear to me in the ChangeLog description. > > Would it be possible to have applyPreprocessor take a flag for whether it wants -P or not? Or more generally, maybe applyPreprocessor can take an optional argument that is flags to pass to gcc. If the argument is omitted, it adds "-E -P -x c++". Actually, my plan is to remote -P from Source/cmake/OptionsCommon.cmake; the CMake-based ports always pass --preprocessor to the scripts, so the defaults aren't used. s/remote/remove/ Comment on attachment 135673 [details] Patch Ok, seems fine. I would rewrite the ChangeLog to be what you said in comment #4. Created attachment 135692 [details]
Patch for landing
Committed r113244: <http://trac.webkit.org/changeset/113244> |