Closed Bug 868536 Opened 7 years ago Closed 7 years ago

Move ipdl.mk files to moz.build

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla25

People

(Reporter: mshal, Assigned: mshal)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

There are several ipdl.mk files throughout the tree - these should be converted to a moz.build format. The ipc/ipdl/Makefile.mk is the place where all of the individual ipdl.mk files are included and used, so this will need to be converted as well. Finally, the existing ipc/ipdl/moz.build file needs to be updated so it creates CPP_SOURCES using python rather than make syntax.
Blocks: 870376
No longer blocks: 870376
I'm kinda sorta working on this.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Blocks: 875186
Duplicate of this bug: 782846
Blocks: 629668
Here's my first draft at this. I attempted to make it as minimally
invasive as possible. All the ipdl.mk files in the tree have their
content merged with moz.build files. All ipdl files are collected during
moz.build traversal and written out to a single .mk file during backend
generation. It seems to "just work."

Patch is based on top of XPIDL work in bug 850380, although should be
easy enough to rebase. I told joey and mshal that I'd wait for all their
in-progress conversions to land so I don't bit rot them.

This patch needs tests before it can be submitted for review.
Attached patch Move ipdl.mk files to moz.build (obsolete) — Splinter Review
Rebased the original patch. This patch also includes:

1) Simple frontend & backend tests for IPDL_SOURCES.
2) Removed PROTOCOLS definition in favor of writing CPPSRCS directly in ipdlsrcs.mk. This allows us to remove the ugly CPP_SOURCES += ['$(PROTOCOLS:%.ipdl=%.cpp'... definition from moz.build
Attachment #753090 - Attachment is obsolete: true
Attachment #770183 - Flags: review?(gps)
Taking ownership of this.
Assignee: gps → mshal
Comment on attachment 770183 [details] [diff] [review]
Move ipdl.mk files to moz.build

Review of attachment 770183 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good to me. I worry about some path encoding issues on Windows. But if it passes Try on Windows, we should be good to land.

I can't wait for the followup where we finally fix the ipdl build rules to introduce proper dependencies!

::: python/mozbuild/mozbuild/backend/recursivemake.py
@@ +179,5 @@
>          elif isinstance(obj, Exports):
>              self._process_exports(obj.exports, backend_file)
>  
> +        elif isinstance(obj, IPDLFile):
> +            self._ipdl_sources.add('%s/%s' % (obj.srcdir, obj.basename))

This should probably be using mozpack.path.join, but I think the source variables should be sufficiently sanitized that it shouldn't matter.
Attachment #770183 - Flags: review?(gps) → review+
Updated to use mozpack.path.join, and rebased to pull in js/ipc/ipdl.mk and ipc/ipdl/test/cxx/ipdl.mk changes. r=gps carried forward.
Attachment #770183 - Attachment is obsolete: true
Attachment #770947 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/42800e239ff0
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.