Eliminate the duplication of the build system in comm-central

RESOLVED FIXED in Thunderbird 37.0

Status

MailNews Core
Build Config
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: jcranmer, Assigned: jcranmer)

Tracking

Trunk
Thunderbird 37.0

Firefox Tracking Flags

(Not tracked)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(6 attachments, 2 obsolete attachments)

38 bytes, text/x-review-board-request
glandium
: review+
Details | Review
38 bytes, text/x-review-board-request
glandium
: review+
Details | Review
38 bytes, text/x-review-board-request
glandium
: review+
Details | Review
38 bytes, text/x-review-board-request
glandium
: review+
Details | Review
38 bytes, text/x-review-board-request
glandium
: review+
Details | Review
38 bytes, text/x-review-board-request
glandium
: review+
Details | Review
(Assignee)

Description

4 years ago
We eliminated the dual-traversal. We eliminated the configure.in duplication. We pseudo-merged the objdirs. Can we eliminate the duplication of config/rules.mk and friends? Almost certainly yes. :-)

I don't have the full patch queue worked out for this bug yet, but I do know it requires some changes to m-c and a lot of changes to c-c (if you can count almost rm -rf config/config.mk a lot of changes ☺).

The 3,048 meter overview of what needs to be done:
1. Move mozilla-central's MOZILLA_DIR fallback from rules.mk to baseconfig.mk. This is effectively the first Makefile to be included, so this lets us do the next steps.
2. Fix individual comm-central Makefiles to stop doing things disallowed by m-c (e.g., remnant MOZILLA_INTERNAL_API nonsense, a MOZ_WINCONSOLE issue).
3. Replace lots of $(topsrcdir) occurrences in m-c with $(MOZILLA_DIR).
4. Replace comm-central files with includes to their m-c counterparts.
5. Trickiness with WIN_TOP_SRC. My current solution is basically an ifdef "comm-central" in m-c/config/config.mk (MOZILLA_SRCDIR, to be specific).

When do you need to use $(topsrcdir) and when do you need to use $(MOZILLA_DIR)? The way I worked to replace these is by first porting all differences to the local c-c config, then reading the vimdiff and replacing the resulting occurrences of $(topsrcdir) with $(MOZILLA_DIR) in m-c's rules.mk. The better long term way is:
A. Every occurrence that leads to a specific filepath (e.g., m-c/config/solaris_ia32.map) uses $(MOZILLA_DIR).
B. However, if you're including a file which may transitively include baseconfig.mk, use topsrcdir. This should only be config.mk, baseconfig.mk, and rules.mk.
(Assignee)

Comment 1

4 years ago
Created attachment 8526472 [details]
MozReview Request: bz://1099430/jcranmer
Attachment #8526472 - Flags: review?(mh+mozilla)
(Assignee)

Comment 2

4 years ago
/r/863 - Bug 1099430, part ?: Define MOZILLA_DIR early in the base makefiles, r=glandium.
/r/865 - Bug 1099430, part ?: Define WIN_TOP_SRC using MOZILLA_DIR, r=glandium.
/r/867 - Bug 1099430, part ?: Use MOZILLA_DIR instead of topsrcdir in shared makefiles, r=glandium.

Pull down these commits:

hg pull review -r 7eab2db92380e94b7734bc9f87eeb8904d541707
(Assignee)

Comment 3

4 years ago
Created attachment 8526473 [details]
MozReview Request: bz://1099430/jcranmer
Attachment #8526473 - Flags: review?(mh+mozilla)
(Assignee)

Comment 4

4 years ago
/r/871 - Bug 1099430, part 0: Miscellaneous fixes to use mozilla-central's build system, r=glandium.
/r/873 - Bug 1099430, part 1: Proxy the config/* makefiles to mozilla-central, r=glandium.
/r/875 - Bug 1099430, part 2: Delete unnecessary auxiliary config makefiles, r=glandium.

Pull down these commits:

hg pull review -r c837c8d71577efa4044b5c72f10d8edaa23affb8
https://reviewboard.mozilla.org/r/865/#review421

Ship It!

::: config/config.mk
(Diff revision 1)
> +    cc_WIN_TOP_SRC := $(patsubst %/mozilla,%,$(WIN_TOP_SRC))

$(WIN_TOP_SRC:%/mozilla=%)
Attachment #8526472 - Flags: review?(mh+mozilla) → review+
https://reviewboard.mozilla.org/r/871/#review427

::: mailnews/mapi/mapiDll/Makefile.in
(Diff revision 1)
> -MOZILLA_INTERNAL_API = 1
> +DEFINES += -DMOZILLA_INTERNAL_API

Move to moz.build?
Attachment #8526473 - Flags: review?(mh+mozilla) → review+
(Assignee)

Updated

4 years ago
Attachment #8526473 - Flags: review+ → review?(mh+mozilla)
(Assignee)

Comment 13

4 years ago
/r/871 - Bug 1099430, part 0: Miscellaneous fixes to use mozilla-central's build system, r=glandium.
/r/873 - Bug 1099430, part 1: Proxy the config/* makefiles to mozilla-central, r=glandium.
/r/875 - Bug 1099430, part 2: Delete unnecessary auxiliary config makefiles, r=glandium.

Pull down these commits:

hg pull review -r bce5a5058d622707f22021c0a6916977a1079351
Attachment #8526473 - Flags: review?(mh+mozilla) → review+
Automation is not amused by your patch numbering scheme, since it apparently jams commit messages into an ASCII string.

Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/86a74bc04076 for the unusual feat of burning builds via the commit message.
(Assignee)

Comment 17

4 years ago
And backed out the back out in <https://hg.mozilla.org/integration/mozilla-inbound/rev/e0c5ab3acc4e> because the only thing broken is our automation not supporting non-ASCII commit messages.
(Assignee)

Comment 19

4 years ago
https://hg.mozilla.org/comm-central/rev/cd681dd9d73d
https://hg.mozilla.org/comm-central/rev/7254179a9d7d
https://hg.mozilla.org/comm-central/rev/67fbc8c9e40a
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
Target Milestone: --- → Thunderbird 37.0
Keywords: leave-open
(Assignee)

Comment 20

3 years ago
Comment on attachment 8526473 [details]
MozReview Request: bz://1099430/jcranmer
Attachment #8526473 - Attachment is obsolete: true
Attachment #8526472 - Attachment is obsolete: true
Attachment #8618637 - Flags: review+
Attachment #8618638 - Flags: review+
Attachment #8618639 - Flags: review+
Attachment #8618640 - Flags: review+
Attachment #8618641 - Flags: review+
Attachment #8618642 - Flags: review+
(Assignee)

Comment 21

3 years ago
Created attachment 8618637 [details]
MozReview Request: Bug 1099430, part 1: Proxy the config/* makefiles to mozilla-central, r=glandium.
(Assignee)

Comment 22

3 years ago
Created attachment 8618638 [details]
MozReview Request: Bug 1099430, part 2: Delete unnecessary auxiliary config makefiles, r=glandium.
(Assignee)

Comment 23

3 years ago
Created attachment 8618639 [details]
MozReview Request: Bug 1099430, part 0: Miscellaneous fixes to use mozilla-central's build system, r=glandium.
(Assignee)

Comment 24

3 years ago
Comment on attachment 8526472 [details]
MozReview Request: bz://1099430/jcranmer
(Assignee)

Comment 25

3 years ago
Created attachment 8618640 [details]
MozReview Request: Bug 1099430, part ?: Define WIN_TOP_SRC using MOZILLA_DIR, r=glandium.
(Assignee)

Comment 26

3 years ago
Created attachment 8618641 [details]
MozReview Request: Bug 1099430, part ?: Use MOZILLA_DIR instead of topsrcdir in shared makefiles, r=glandium.
(Assignee)

Comment 27

3 years ago
Created attachment 8618642 [details]
MozReview Request: Bug 1099430, part ?: Define MOZILLA_DIR early in the base makefiles, r=glandium.
You need to log in before you can comment on or make changes to this bug.