File: modules_builders.py

package info (click to toggle)
godot3 3.6.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 229,256 kB
  • sloc: cpp: 853,371; xml: 80,316; ansic: 49,285; cs: 14,559; python: 11,794; java: 9,714; javascript: 4,654; pascal: 1,176; sh: 884; objc: 628; makefile: 182; perl: 2
file content (16 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Functions used to generate source files during build time

All such functions are invoked in a subprocess on Windows to prevent build flakiness.
"""

from platform_methods import subprocess_main


def generate_modules_enabled(target, source, env):
    with open(target[0].path, "w") as f:
        for module in env.module_list:
            f.write("#define %s\n" % ("MODULE_" + module.upper() + "_ENABLED"))


if __name__ == "__main__":
    subprocess_main(globals())