Closed Bug 1099430 Opened 10 years ago Closed 10 years ago

Eliminate the duplication of the build system in comm-central

Categories

(MailNews Core :: Build Config, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 37.0

People

(Reporter: jcranmer, Assigned: jcranmer)

Details

Attachments

(6 files, 2 obsolete files)

38 bytes, text/x-review-board-request
glandium
: review+
Details
38 bytes, text/x-review-board-request
glandium
: review+
Details
38 bytes, text/x-review-board-request
glandium
: review+
Details
38 bytes, text/x-review-board-request
glandium
: review+
Details
38 bytes, text/x-review-board-request
glandium
: review+
Details
38 bytes, text/x-review-board-request
glandium
: review+
Details
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.
Attachment #8526472 - Flags: review?(mh+mozilla)
/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
Attachment #8526473 - Flags: review?(mh+mozilla)
/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+
Attachment #8526473 - Flags: review+ → review?(mh+mozilla)
/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.
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.
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
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
Target Milestone: --- → Thunderbird 37.0
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+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: