Bug 218001 - Remove use of in-makefile grepping of FEATURE_AND_PLATFORM_DEFINES
Summary: Remove use of in-makefile grepping of FEATURE_AND_PLATFORM_DEFINES
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
: 218000 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-20 16:08 PDT by Sam Weinig
Modified: 2020-10-21 17:47 PDT (History)
17 users (show)

See Also:


Attachments
Patch (9.32 KB, patch)
2020-10-20 16:22 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (9.78 KB, patch)
2020-10-21 15:14 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (9.78 KB, patch)
2020-10-21 15:15 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2020-10-20 16:08:21 PDT
To make things simpler, and allow for passing FEATURE_AND_PLATFORM_DEFINES as a file rather than on the command line, we should remove the in-makefile use of grepping FEATURE_AND_PLATFORM_DEFINES.

For the ones conditionalizing adding to ADDITIONAL_BINDING_IDLS, those IDLs should just have the appropriate Conditional=* extended attribute added, then they can be included unconditionally in the makefile.

For the ones conditionalizing adding go USER_AGENT_STYLE_SHEETS, again, there doesn’t seem a real reason to keep that. The sheets are all preprocessed anyway, so we can just move those #ifdefs into the files.
Comment 1 Sam Weinig 2020-10-20 16:22:27 PDT Comment hidden (obsolete)
Comment 2 Sam Weinig 2020-10-20 16:42:40 PDT Comment hidden (obsolete)
Comment 3 Darin Adler 2020-10-21 15:06:57 PDT
Comment on attachment 411935 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=411935&action=review

> Source/WebCore/DerivedSources.make:1277
> +    GestureEvent.idl \

I suggest sorting this in alphabetically.
Comment 4 Sam Weinig 2020-10-21 15:14:12 PDT Comment hidden (obsolete)
Comment 5 Sam Weinig 2020-10-21 15:15:38 PDT
Created attachment 412035 [details]
Patch
Comment 6 Darin Adler 2020-10-21 15:22:11 PDT
Comment on attachment 412035 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=412035&action=review

> Source/WebCore/ChangeLog:14
> +        Remove conditionalized additions to ADDITIONAL_BINDING_IDLS and just always add
> +        the concrete set, relying on the existing extended attributes in the IDLs instead.

Is it the call to "realpath" that helps us cleanly remove any files that don’t exist?
Comment 7 Sam Weinig 2020-10-21 15:28:05 PDT
(In reply to Darin Adler from comment #6)
> Comment on attachment 412035 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=412035&action=review
> 
> > Source/WebCore/ChangeLog:14
> > +        Remove conditionalized additions to ADDITIONAL_BINDING_IDLS and just always add
> > +        the concrete set, relying on the existing extended attributes in the IDLs instead.
> 
> Is it the call to "realpath" that helps us cleanly remove any files that
> don’t exist?

I think so. The Make documentation says:

$(realpath names…)
For each file name in names return the canonical absolute name. A canonical name does not contain any . or .. components, nor any repeated path separators (/) or symlinks. In case of a failure the empty string is returned.
Comment 8 Darin Adler 2020-10-21 15:40:35 PDT
Comment on attachment 412035 [details]
Patch

r=me assuming this passes tests
Comment 9 Darin Adler 2020-10-21 15:41:57 PDT
(Now I should revive the branch where I was doing the file thing, or let you do it over again [either is OK with me]. Hardest part seemed to be the xcfilelist bit.)
Comment 10 EWS 2020-10-21 17:46:24 PDT
Committed r268849: <https://trac.webkit.org/changeset/268849>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 412035 [details].
Comment 11 Radar WebKit Bug Importer 2020-10-21 17:47:16 PDT
<rdar://problem/70553732>