https://gecko.readthedocs.org/en/latest/build/buildsystem/build-overview.html
https://gecko.readthedocs.org/en/latest/build/buildsystem/mozbuild-files.html

I guess the missing piece is how the make backend works.

On Wed, Jun 17, 2015 at 9:36 AM, Nicholas Alexander <nalexan...@mozilla.com>
wrote:

>
>
> On Wed, Jun 17, 2015 at 9:15 AM, Ted Mielczarek <t...@mielczarek.org>
> 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
>
> _______________________________________________
> dev-builds mailing list
> dev-builds@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-builds
>
>
_______________________________________________
dev-builds mailing list
dev-builds@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-builds

Reply via email to