Changes to partial tree builds when not building through mach

Gregory Szorc gps at mozilla.com
Tue Oct 29 22:17:16 UTC 2013


If you use |mach build| to build the tree, stop reading: this post does 
not apply to you.

OK, so you run make, make.py, or mozmake to build the tree. Do you ever 
perform partial tree builds? That is: |make -C dom| or |cd dom; make|. 
If so, you may be impacted by a recent change to the build system.

If you attempt to perform a partial tree build directly with a make 
implementation and the build configuration (moz.build files, 
Makefile.in, test manifests, etc) is out of date, the build will error 
fast, printing a message like:

   /Users/gps/src/firefox/config/rules.mk:595: *** Build configuration 
changed. Build with |mach build| or run |mach build-backend| to 
regenerate build config.  Stop.

That should be self-explanatory. If not, file a bug and we'll get the 
error message updated.

If you are concerned about this change taking away a feature, I assure 
you there are good reasons. The gory details are in bug 877308 [1]. I 
won't attempt to explain them here because there is some serious build 
system and make voodoo involved.

I *highly* encourage developers to build through |mach build|. The mach 
build command does a lot more than is possible when invoking make 
directly. Over time, we'll likely require mach to build. So, there's no 
time like the present to start retraining your muscle memory. If you 
install the mach script into $PATH [2], you can just type |mach build| 
(as opposed to ../../mach build etc). If you encounter any issues 
building through |mach build|, please file a P1 bug against Core :: 
Build Config and we'll get to the bottom of it, hopefully in a timely 
manner.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=877308
[2] 
https://developer.mozilla.org/en-US/docs/Developer_Guide/mach#Adding_mach_to_your_shell%27s_search_path



More information about the firefox-dev mailing list