Bug 215064

Summary: Fix and further refine makefile rule for WebKit messages generated files
Product: WebKit Reporter: Darin Adler <darin>
Component: Tools / TestsAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: krollin, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=215054
https://bugs.webkit.org/show_bug.cgi?id=211112
Attachments:
Description Flags
Patch
none
Patch none

Description Darin Adler 2020-08-01 13:49:36 PDT
Fix and further refine makefile rule for WebKit messages generated files
Comment 1 Darin Adler 2020-08-01 13:50:50 PDT
Created attachment 405794 [details]
Patch
Comment 2 Sam Weinig 2020-08-01 14:58:13 PDT
I am surprised and confused to see this work on the bots. From my research, I didn't think the "grouped targets" feature came to make until make 4.3 (https://lwn.net/Articles/810071/), and at least on my local machine, make is stuck for macOS back on 3.81. What's the magic here?
Comment 3 Darin Adler 2020-08-01 15:35:06 PDT
Yes, the make on my computer is 3.81 yet this did work.
Comment 4 Darin Adler 2020-08-01 15:36:53 PDT
If we can’t use grouped targets, then at least we have to fix the spelling of "addsuffix".
Comment 5 Darin Adler 2020-08-01 15:37:58 PDT
Maybe grouped targets was undocumented in older versions of make?
Comment 6 Darin Adler 2020-08-01 15:38:49 PDT
Yes, that article says pretty clearly that grouped targets is new in make 4.3!
Comment 7 Darin Adler 2020-08-01 15:40:52 PDT
OK, tested locally and it seems that the syntax doesn't really work.
Comment 8 Darin Adler 2020-08-01 15:41:16 PDT
The make run succeeds, but it doesn't run the rule in all the cases I would expect.
Comment 9 Darin Adler 2020-08-01 15:44:56 PDT
Comment on attachment 405794 [details]
Patch

I think this patch just re-introduces the bug where the rule is run multiple times.
Comment 10 Darin Adler 2020-08-01 15:49:42 PDT
Created attachment 405798 [details]
Patch
Comment 11 Darin Adler 2020-08-01 15:52:09 PDT
Thanks, Sam, for calling my attention to that!

Should be fine now.
Comment 12 Sam Weinig 2020-08-01 18:08:18 PDT
Realizing that we are forever stuck on make 3.81 a few weeks ago made me wonder if we should re-asses the use of make in WebKit (at least with regard to derived sources). 

I don't recall the reason for it being introduced, though I have heard it mentioned that it was maybe to do with deficiencies in Xcode's ability to deal with intermediate files, or maybe to share between Xcode and VisualStudio (really I should go look at svn history). Regardless of the original intent though, it's always a good idea to check assumptions every once in a while and make sure they still make sense.
Comment 13 EWS 2020-08-01 18:18:25 PDT
Committed r265181: <https://trac.webkit.org/changeset/265181>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 405798 [details].
Comment 14 Radar WebKit Bug Importer 2020-08-01 18:19:15 PDT
<rdar://problem/66433599>
Comment 15 Darin Adler 2020-08-01 20:19:04 PDT
I seem to recall that I originally started using make with the goal of sharing those rules between all build systems. Was really disappointed when the file was replicated in CMake instead of being used there.