On Wednesday, June 17, 2015 at 5:16:14 PM UTC+1, Ted Mielczarek wrote: > On Wed, Jun 17, 2015, at 10:24 AM, Alex wrote: > > Just curious as to how the build system knows which directories to > > process the Makefiles in them? I've seen some moz.build files reference > > them with CONFIGURE_SUBST_FILES += ['Makefile'], but then some > > directories such as the root SpiderMonkey directory (js/src) have > > Makefiles but with no reference to them from the moz.build file of said > > directory. > > Here's the full story: > 1) configure runs config.status: > https://dxr.mozilla.org/mozilla-central/source/configure.in#9357 > 2) config.status calls BuildReader.read_topsrcdir: > https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/config_status.py#136 > 3) read_topsrcdir starts with the moz.build in $topsrcdir: > https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/frontend/reader.py#865 > 4) read_mozbuild evaluates moz.build files, taking any directories > listed in DIRS and evaluating them as it goes: > https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/frontend/reader.py#1017 > 5) After all the moz.build files have been read, the > RecursiveMakeBackend processes the definitions from them: > https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/config_status.py#149 > 6) Any Makefiles referenced in CONFIGURE_SUBST_FILES are handled during > this traversal: > https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/backend/recursivemake.py#442 > 7) At the end of that process, any Makefile.in files that exist > alongside a moz.build file in the srcdir get processed into a Makefile > in the objdir: > https://dxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/backend/recursivemake.py#747 > > Hope that helps, > -Ted
Thanks Ted, that's really informative. Had no idea there was any documentation on this over at readthedocs, I assumed it was all in the MDN. So as a test case I've got a Makefile referenced in the moz.build file that sets CFLAGS and if I change the Makefile, the build systems detects it 'Build configuration changed. Regenerating backend.' Problem is it doesn't actually set the CFLAGS. So for example in gfx\qcms\moz.build I've added the top of the file: CONFIGURE_SUBST_FILES += ['Makefile'] and in the Makefile.in in the same directory: #Hide warnings in this directory CFLAGS = -w The flags don't set and the warnings still show? I know moz.build has a CFLAG option, this is just a test case if I ever need to add something that moz.build doesn't yet. _______________________________________________ dev-builds mailing list [email protected] https://lists.mozilla.org/listinfo/dev-builds

