summaryrefslogtreecommitdiff
path: root/python_modules
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2019-10-17 19:13:25 +0100
committerFrediano Ziglio <fziglio@redhat.com>2019-11-04 11:08:10 +0000
commitead7790d47b67de543b5e39ca3b307346484d3b7 (patch)
tree889b05a4c07eb7670b4a86a139b33ab97d816e69 /python_modules
parentf191053a8cd2d35cf8f73dc4cd2931a8031dbc57 (diff)
codegen: Ignore path generating include guards
Make sure that guard do no change building out-of-tree or with Meson. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Uri Lublin <uril@redhat.com>
Diffstat (limited to 'python_modules')
-rw-r--r--python_modules/marshal.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python_modules/marshal.py b/python_modules/marshal.py
index a09b614..e9130f3 100644
--- a/python_modules/marshal.py
+++ b/python_modules/marshal.py
@@ -2,13 +2,14 @@
from . import ptypes
from . import codegen
import re
+import os
def write_includes(writer):
writer.header.writeln("#include <spice/protocol.h>")
writer.header.writeln('#include "common/marshaller.h"')
writer.header.newline()
if writer.header.has_option("dest_file"):
- src = writer.header.options["dest_file"]
+ src = os.path.basename(writer.header.options["dest_file"])
else:
src = "generated_headers.h"
src = re.sub(r'(?i)[^a-z0-9]+', '_', src)