diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-05-29 11:42:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-29 11:42:53 +0200 |
commit | 6aa399be59b886e1c8c371f4ceb09f41c86a0584 (patch) | |
tree | 3d33b9d459bea8bc2b22d583a2cb9951469cb6d2 /SConstruct | |
parent | 4448aca3a690b438c8e41c60513f907dc4540d78 (diff) | |
parent | 6304d16915e7dec0b699c2f8789d4bbfef5da66d (diff) |
Merge pull request #39137 from Xrayez/custom-modules-profile
SCons: Allow to read `custom_modules` option via a file
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct index 200c9a0227..27e6c5f2d3 100644 --- a/SConstruct +++ b/SConstruct @@ -181,12 +181,16 @@ for k in platform_opts.keys(): for o in opt_list: opts.Add(o) +# Update the environment now as the "custom_modules" option may be +# defined in a file rather than specified via the command line. +opts.Update(env_base) + # Detect modules. modules_detected = OrderedDict() module_search_paths = ["modules"] # Built-in path. -if ARGUMENTS.get("custom_modules"): - paths = ARGUMENTS.get("custom_modules").split(",") +if env_base["custom_modules"]: + paths = env_base["custom_modules"].split(",") for p in paths: try: module_search_paths.append(methods.convert_custom_modules_path(p)) @@ -217,8 +221,9 @@ for name, path in modules_detected.items(): methods.write_modules(modules_detected) -opts.Update(env_base) # update environment -Help(opts.GenerateHelpText(env_base)) # generate help +# Update the environment again after all the module options are added. +opts.Update(env_base) +Help(opts.GenerateHelpText(env_base)) # add default include paths |