Open
Bug 831695
Opened 11 years ago
Updated 2 years ago
Don't change CWD when mach loads .mozconfig
Categories
(Firefox Build System :: General, enhancement)
Tracking
(Not tracked)
NEW
People
(Reporter: neil, Unassigned)
Details
Rather than setting up the MOZCONFIG environment variable every time I want an objdir with different build settings I simply create a mozconfig in the objdir and source it from the default mozconfig (which used to live in ~ but sadly now has to live in the srcdir, so it has to be careful not to source itself by mistake). Then I can make -f ../srcdir/client.mk to update the current objdir. It would be nice if this worked with mach.
Comment 1•11 years ago
|
||
There is a lot to unpack in your bug description. Could you please post exact scenarios that work with |make -f client.mk| but don't with mach?
Flags: needinfo?(neil)
Comment 2•11 years ago
|
||
FWIW, the mozconfig logic for mach is in https://hg.mozilla.org/mozilla-central/file/d29ffd335728/python/mozbuild/mozbuild/mozconfig.py#l77. Tests live at https://hg.mozilla.org/mozilla-central/file/d29ffd335728/python/mozbuild/mozbuild/test/test_mozconfig.py.
Reporter | ||
Comment 3•11 years ago
|
||
Example: I checked out m-c into ~/mozilla and I have three objdirs ~/profiling ~/debug ~/dmd ~/mozilla/.mozconfig contains . .mozconfig ~/profiling/.mozconfig contains --enable-profiling ~/debug/.mozconfig contains --enable-debug ~/dmd/.mozconfig contains --enable-dmd So if I make -f ~/mozilla/client.mk it loads ~/mozilla/.mozconfig which loads ./.mozconfig which contains the configure options that I want.
Flags: needinfo?(neil)
Comment 4•11 years ago
|
||
OK. So I /think/ the problem is that mach is always looking in $topsrcdir/.mozconfig whereas client.mk is looking in CWD (your topobjdir in the examples). The request is for mach to look in CWD instead of or in addition to topsrcdir.
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to comment #3) > ~/mozilla/.mozconfig contains . .mozconfig Sorry that should be ./.mozconfig of course. (In reply to Gregory Szorc from comment #2) > FWIW, the mozconfig logic for mach is in python/mozbuild/mozbuild/mozconfig.py #77 I tried a quick tweak but that just made it assert, so I probably did something wrong.
Reporter | ||
Comment 6•11 years ago
|
||
(In reply to Gregory Szorc from comment #4) > OK. So I /think/ the problem is that mach is always looking in > $topsrcdir/.mozconfig whereas client.mk is looking in CWD (your topobjdir in > the examples). client.mk always looks in $topsrcdir/.mozconfig which is why I set that to . ./.mozconfig which then finds it in my current objdir.
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•