Closed
Bug 1035096
Opened 10 years ago
Closed 10 years ago
Avoid much mess by not letting mozilla subconfigure read mozconfig
Categories
(MailNews Core :: Build Config, defect)
MailNews Core
Build Config
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 33.0
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(2 files)
2.16 KB,
patch
|
jcranmer
:
review+
|
Details | Diff | Splinter Review |
3.64 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
So, one of the reasons we have plenty of problems with the c-c build and mach/mozconfig/MOZ_OBJDIR, is that the mozconfig is read from both the c-c topsrcdir and the m-c topsrcdir, and that makes for fun problems with relative directories.
The thing is, we actually don't need to make the subconfigure read mozconfig at all. As a matter of fact, Using AC_OUTPUT_SUBDIRS already makes the main configure pass all ac_add_options arguments to the subconfigure command line. Also, everything that is exported from mozconfig will end up in the environment of the subconfigure. The only thing that's not inherited nicely is shell local variables (those not exported from mozconfig, but that pseudo-sourcing mozconfig, like we currently do, makes available to configure).
Those would need to be passed somehow, and it appears there's a set of files that configure conveniently sources early that can be (ab)used for that.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8451486 -
Flags: review?(Pidgeot18)
Assignee | ||
Comment 2•10 years ago
|
||
Also cleanup the output logic so that the configure arguments header is not
displayed when there aren't configure arguments, and so that variables are
still displayed when there aren't configure arguments.
Attachment #8451489 -
Flags: review?(gps)
Assignee | ||
Comment 3•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=cba8f5465e08 (with bug 1035099, too, but it doesn't really matter)
Comment 4•10 years ago
|
||
Comment on attachment 8451489 [details] [diff] [review]
Make mach environment --format=configure only display configure arguments if COMM_BUILD is not set in the environment
Review of attachment 8451489 [details] [diff] [review]:
-----------------------------------------------------------------
::: python/mozbuild/mozbuild/mach_commands.py
@@ +1008,5 @@
> # Replace ' with '"'"', so that shell quoting e.g.
> # a'b becomes 'a'"'"'b'.
> quote = lambda s: s.replace("'", """'"'"'""")
> + if self.mozconfig['configure_args'] and \
> + not 'COMM_BUILD' in os.environ:
Nit: 'COMM_BUILD' not in os.environ
Attachment #8451489 -
Flags: review?(gps) → review+
Comment 5•10 years ago
|
||
Comment on attachment 8451486 [details] [diff] [review]
Avoid much mess by not letting mozilla subconfigure read mozconfig
Review of attachment 8451486 [details] [diff] [review]:
-----------------------------------------------------------------
This stack of patches breaks having a .mozconfig in c-c and another in m-c which is disappointing but also probably kind of inevitable :-S
::: configure.in
@@ +14,5 @@
> AC_CANONICAL_SYSTEM
>
> dnl comm-central-specific options
> dnl (MOZILLA_SRCDIR would fit here, but is needed to find autoconf tools)
> +export COMM_BUILD=1
I'll admit that this line scares me slightly in theory. As long as we make sure that it doesn't get into the mozilla config.status, this should be okay, though.
Attachment #8451486 -
Flags: review?(Pidgeot18) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Assignee | ||
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 33.0
Comment 8•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•