Bug 216806 - Refactor build rules in Makefiles and Makefile.shared
Summary: Refactor build rules in Makefiles and Makefile.shared
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-21 15:40 PDT by Keith Rollin
Modified: 2020-09-22 15:26 PDT (History)
5 users (show)

See Also:


Attachments
Patch (14.31 KB, patch)
2020-09-21 15:43 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2020-09-21 15:40:00 PDT
Factor out the common aspects of the build rules in Makefile.shared and the various Makefiles. This allows us to more easily see what's different between the various build targets, and to apply uniform changes across all of the targets.
Comment 1 Radar WebKit Bug Importer 2020-09-21 15:42:00 PDT
<rdar://problem/69332316>
Comment 2 Keith Rollin 2020-09-21 15:43:55 PDT
Created attachment 409329 [details]
Patch
Comment 3 Keith Rollin 2020-09-21 15:44:53 PDT
David, I really did a number on your set-sanitizer-configuration target. I think that what remains is equivalent to what you'd been doing, but I didn't understand all of what you'd implemented, so I'm not sure.
Comment 4 David Kilzer (:ddkilzer) 2020-09-22 11:17:07 PDT
Comment on attachment 409329 [details]
Patch

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

r=me

> Source/Makefile:22
> +	@$(build_target_for_each_module)

This doesn't need to be @$(call build_target_for_each_module) as done in Makefile.shared?  Is that because we don't need to pass arguments?

> Makefile.shared:101
> +		[[ -t 1 ]] && COLOR_DIAGNOSTICS_ARG="COLOR_DIAGNOSTICS=YES"; \

I'm sorry, what does `[[ -t 1 ]]` do?!

> Makefile.shared:123
> +	@$(call set_webkit_configuration,--debug --force-optimization-level=O3)

This won't pass `--debug --force-optimization-level=O3` as a single string to the shell, will it?
Comment 5 Keith Rollin 2020-09-22 11:29:21 PDT
(In reply to David Kilzer (:ddkilzer) from comment #4)
> Comment on attachment 409329 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=409329&action=review
> 
> r=me
> 
> > Source/Makefile:22
> > +	@$(build_target_for_each_module)
> 
> This doesn't need to be @$(call build_target_for_each_module) as done in
> Makefile.shared?  Is that because we don't need to pass arguments?

Correct.

> 
> > Makefile.shared:101
> > +		[[ -t 1 ]] && COLOR_DIAGNOSTICS_ARG="COLOR_DIAGNOSTICS=YES"; \
> 
> I'm sorry, what does `[[ -t 1 ]]` do?!

It checks to see if the specified file descriptor (in this case, stdout) is associated with a terminal.

> 
> > Makefile.shared:123
> > +	@$(call set_webkit_configuration,--debug --force-optimization-level=O3)
> 
> This won't pass `--debug --force-optimization-level=O3` as a single string
> to the shell, will it?

No. I checked for that. `Make` performs a simply text replacement and then processes the resulting string.
Comment 6 EWS 2020-09-22 11:37:56 PDT
Committed r267424: <https://trac.webkit.org/changeset/267424>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 409329 [details].
Comment 7 Keith Rollin 2020-09-22 15:26:45 PDT
Committed r267441: <https://trac.webkit.org/changeset/267441>