Closed Bug 460940 Opened 16 years ago Closed 16 years ago

Dependency problem when removing an interface from dom_quickstubs.qsconf

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file, 2 obsolete files)

I tried landing the patch for bug 459828 today, but the tree went red with:

gmake[5]: *** No rule to make target `../../../../dist/idl/nsIDOMCustomEvent.idl', needed by `dom_quickstubs.h'.  Stop.

I think the fact that dom_quickstubs.depends will be generated after we've included dom_quickstubs.depends into the Makefile is the problem (see http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/src/Makefile.in#181 and beyond), but have no idea how to fix this.
Needs to work like this:
http://mxr.mozilla.org/mozilla-central/source/config/rules.mk#2008

I think if you change the depend file here:
http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/src/Makefile.in#191

to be (MDDEPDIR)/something.pp, and stop including it directly, things might just work, since it will get included in the mddepend.pl magic automatically.
Attached patch Doesn't work (obsolete) — Splinter Review
I tried this, with it applied I can apply attachment 344080 [details] [diff] [review] and build, but now it reruns qsgen.py every time you build in js/src/xpconnect/src. .deps/.all.pp contains dom_quickstubs.h: FORCE.
I think the problem is that qsgen generates a .dep file like so:
dom_quickstubs.h: \
   ...bunch of idl files \
   $(NULL)

and the trailing $(NULL) confuses mddepend.pl. You could change the output here:
http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/src/qsgen.py#958

You could either format it like:
dom_quickstubs.h: something.idl
dom_quickstubs.h: other.idl
...

Or you could make it smart and not include the trailing $(NULL), but still joined with continuations, something like:
        if len(make_targets) > 0:
            f.write("%s: \\\n\t\t" % makeQuote(make_targets[0]))
            f.write(' \\\n\t\t'.join([makeQuote(filename) for filename in make_dependencies]))
            for filename in make_targets[1:]:
                f.write('%s: %s\n' % (makeQuote(filename), makeQuote(make_targets[0])))
Attached patch v1 (obsolete) — Splinter Review
This does work.
Assignee: nobody → peterv
Attachment #344082 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #344090 - Flags: review?(ted.mielczarek)
Comment on attachment 344090 [details] [diff] [review]
v1

+            f.write('\t\t')
+            f.write(' \\\n\t\t'.join([makeQuote(filename) for filename in make_dependencies]))

The only thing I can think of is that if make_dependencies is ever an empty list, the extra tabs there might confuse make. Can you put that f.write underneath an |if len(make_dependencies) > 0:| just for an extra sanity check?
Attachment #344090 - Flags: review?(ted.mielczarek) → review+
Attached patch v1.1Splinter Review
In that case maybe we should do this?
Attachment #344090 - Attachment is obsolete: true
Attachment #344279 - Flags: review?(ted.mielczarek)
Comment on attachment 344279 [details] [diff] [review]
v1.1

Well yeah, that would be smart. Clearly I missed the simple solution here.
Attachment #344279 - Flags: review?(ted.mielczarek) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: