aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/Rewriter.md2
-rw-r--r--mesonbuild/rewriter.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/docs/markdown/Rewriter.md b/docs/markdown/Rewriter.md
index 89591fa..4550170 100644
--- a/docs/markdown/Rewriter.md
+++ b/docs/markdown/Rewriter.md
@@ -87,7 +87,7 @@ Currently, only the following function types are supported:
- dependency
- target (any build target, the function ID is the target name/ID)
-- project (the function ID can be anything since project() can only be called once)
+- project (the function ID must be an empty string since project() can only be called once)
For more information see the help output of the rewriter kwargs command.
diff --git a/mesonbuild/rewriter.py b/mesonbuild/rewriter.py
index 5822301..b344ce6 100644
--- a/mesonbuild/rewriter.py
+++ b/mesonbuild/rewriter.py
@@ -479,6 +479,8 @@ class Rewriter:
node = None
arg_node = None
if cmd['function'] == 'project':
+ if cmd['id'] != '':
+ mlog.error('The ID for the function type project must be an empty string --> skipping')
node = self.interpreter.project_node
arg_node = node.args
elif cmd['function'] == 'target':