Under XCBuild, the scripts employed in custom build rules can be invoked in innocuous situations. A common example is when the user is building from the command-line and they change the `make` output from stdout to a file, or vice-versa. Changing the output changes the setting of the COLOR_DIAGNOSTICS environment variable, which is enough to cause XCBuild to think something is different and that the custom build rule needs to be invoked. For the script's part, nothing significant has changed, yet it post-processes the header files, causing their modification dates to change, causing downstream rebuilds to occur.
Fix this problem by adopting an approach that doesn't modify the post-processed header files unless their contents actually change.
*** Bug 212444 has been marked as a duplicate of this bug. ***
Created attachment 410726 [details]
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment on attachment 410726 [details]
When I do something like this in a make file I end up creating a situation where there is even more rebuilding because there is no record the work was done. No risk of that here?
I believe there is a small risk of what you describe. I think we can get into the situation you describe if the upstream/source files change their modification dates but not their actual contents. If that were to happen, these scripts would process those upstream files but not change the destination files. On the next build, the scripts would again get invoked, do their stuff, and not actually change anything. The destination's modification date would never be brought up-to-date with respect to the source files.
I'll address this by touching the destination files if the source files are newer, regardless of any actual content change. Doing this will cause an unnecessary rebuild, but it will happen only once, and the conditions under which this will happen should be extremely rare (why would the source file have its modification date changed without having its contents changed)?
Created attachment 410796 [details]
Committed r268163: <https://trac.webkit.org/changeset/268163>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 410796 [details].