【发布时间】:2017-07-11 19:14:57
【问题描述】:
scons 是否支持包含来自外部文件的变量?
简而言之,我有一堆设置、变量等;我想在我的一个大型项目中为一堆 Makefile 提供。根级 makefile 很容易简单地获取/包含文件。
但是,一些子项目使用scons 和the only documentation I found on the topic notes,顶级sconscript 需要创建将变量传递给子项目。
我的目标是创建一个包含变量的简单文件(主要是编译器的路径),并告诉scons 只导入变量键/值对。 The one SO post I've found on this topic 指出该文件必须是 python 代码,而不是 Makefile,因此我可能需要编写一个脚本将 Makefile 转换为 python 代码。
【问题讨论】:
标签: python build environment-variables scons