aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r--mesonbuild/interpreter/interpreter.py4
-rw-r--r--mesonbuild/interpreter/kwargs.py1
2 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index d9a260c..9b005cb 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -2585,6 +2585,7 @@ class Interpreter(InterpreterBase, HoldableObject):
OUTPUT_KW,
KwargInfo('output_format', str, default='c', since='0.47.0', since_values={'json': '1.3.0'},
validator=in_set_validator({'c', 'json', 'nasm'})),
+ KwargInfo('macro_name', (str, NoneType), default=None, since='1.3.0'),
)
def func_configure_file(self, node: mparser.BaseNode, args: T.List[TYPE_var],
kwargs: kwtypes.ConfigureFile):
@@ -2676,7 +2677,8 @@ class Interpreter(InterpreterBase, HoldableObject):
'copy a file to the build dir, use the \'copy:\' keyword '
'argument added in 0.47.0', location=node)
else:
- mesonlib.dump_conf_header(ofile_abs, conf, output_format)
+ macro_name = kwargs['macro_name']
+ mesonlib.dump_conf_header(ofile_abs, conf, output_format, macro_name)
conf.used = True
elif kwargs['command'] is not None:
if len(inputs) > 1:
diff --git a/mesonbuild/interpreter/kwargs.py b/mesonbuild/interpreter/kwargs.py
index 0aee164..1aee414 100644
--- a/mesonbuild/interpreter/kwargs.py
+++ b/mesonbuild/interpreter/kwargs.py
@@ -296,6 +296,7 @@ class ConfigureFile(TypedDict):
command: T.Optional[T.List[T.Union[build.Executable, ExternalProgram, Compiler, File, str]]]
input: T.List[FileOrString]
configuration: T.Optional[T.Union[T.Dict[str, T.Union[str, int, bool]], build.ConfigurationData]]
+ macro_name: T.Optional[str]
class Subproject(ExtractRequired):