Closed Bug 874078 Opened 11 years ago Closed 11 years ago

Move RecursiveMakeBackend.built rule to rules.mk

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla24

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #848530 +++ Bug 848530 has some holes in it. Notably, RecursiveMakeBackend.built is defined in the root Makefile.in. If we have other projects utilizing rules.mk (like js/src), they won't inherit this rule. We should move that rule to rules.mk. A nice benefit of this is that invocation will be in-lined instead of having to shell out to the root Makefile.
Now I remember why I didn't do this: we need the paths in RecursiveMakeBackend.built.pp to be normalized to absolute paths in order for the include to work from any directory. We can still move the rule to rules.mk. But, we need a make file in the root directory to handle including the .pp unless the paths are absolute. I think it's easier to just normalize topobjdir. So blocking on bug 873325.
Depends on: 873325
Attached patch Refactor dependencies, v1 (deleted) — Splinter Review
This should do it. Tested on OS X and Windows. Sadly, we need a clobber (really a config.status run) otherwise the dependencies in backend.RecursiveMakeBackend.built.pp won't apply properly with the new code. I also added code to track the mozbuild .py files as dependencies. It is a little fragile, but I added an assert to protect us. This means that if we change how the sandbox or backend works, we should automatically get a backend rebuild. This should hopefully significantly reduce the number of clobbers that we need to perform. Invalidation will likely occur more than needed. But it should be cheap and I think this is better than requiring excessive clobbering. Furthermore, I think it is right: we want to rescan moz.build and regen the backend if any of the code touching those systems could change the output. I also added a small change to ConfigStatus.py to normalize another topobjdir path to absolute. This was needed to ensure paths in the generated .pp are always absolute. https://tbpl.mozilla.org/?tree=Try&rev=e5c5055a0634
Attachment #751802 - Flags: review?(mh+mozilla)
Attachment #751802 - Flags: review?(mh+mozilla) → review+
Target Milestone: --- → mozilla24
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Blocks: 874543
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: