On 2015/06/18 1:36, Nicholas Alexander wrote:


On Wed, Jun 17, 2015 at 9:15 AM, Ted Mielczarek <[email protected]
<mailto:[email protected]>> 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


ted, gps: where should this go in the documentation?  Even better, is it
already there?

Nick

I feel it should go in the following page with a section header of "How Makefile.in gets processed" or something like that(or even in a standalone page of its own.)

https://developer.mozilla.org/en-US/docs/How_Mozilla%27s_build_system_works

TIA

_______________________________________________
dev-builds mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-builds

Reply via email to