• Home
Name Date Size #Lines LOC

..--

README.mdD06-Sep-20241.3 KiB3221

build-android-turnip.shD06-Sep-2024807 4129

build-fuchsia-turnip.shD06-Sep-20241.9 KiB6449

generate_android_build.configD06-Sep-202431 32

generate_fuchsia_build.configD06-Sep-202431 32

generate_python_build.pyD06-Sep-20245.7 KiB188145

meson2python.pyD06-Sep-202411.1 KiB342298

meson_android.pyD06-Sep-202425.9 KiB885733

meson_common.pyD06-Sep-20246.9 KiB336269

meson_fuchsia.pyD06-Sep-202421.3 KiB768632

meson_impl.pyD06-Sep-202415.9 KiB719518

README.md

1# python-build: automated build system generation
2
3Goal: ease the integration of Mesa as a component inside larger projects like
4Android (AOSP).
5
6How: parse the meson build tree into a python build script, which can be used
7together with configuration and options to generate other kinds of build scripts.
8
9Status: useful inside AOSP but very rough, still work in progress really.
10Android is the only supported target build system, but this work can hopefully
11also support Bazel.  Many meson features are unimplemented and some are probably
12poorly implemented.  Python code needs a thorough cleanup.
13
14## 1 - Generate python from meson
15
16generate_python_build.py: reads meson.build files (following subdir() commands)
17and uses meson2python to transform the meson into python.
18
19meson2python.py: passes meson.build input and the meson grammar to python lark
20(https://github.com/lark-parser/lark) to perform lexing and parsing; then
21transforms the parse tree into valid python. The result is one large python script.
22
23## 2 - Generate Android.bp from python
24
25meson_android.py defines the meson API entry points and emits Android.bp build
26constructs.  A config file is read to determine some build parameters such as
27`cpu_family` (similar to meson's cross file).
28
29## Limitations
30
31Meson build options must be set by modifying the defaults in meson_options.txt.
32