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)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 33.0

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(2 files)

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.
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)
Blocks: 1035099
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+
Depends on: 1035590
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+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 33.0
Depends on: 1036667
Blocks: 1036667
No longer depends on: 1036667
Depends on: 1040009
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: