[spice-common] codegen: Ignore path generating include guards

Submitted by Frediano Ziglio on Oct. 18, 2019, 2:59 p.m.

Details

Message ID 20191018145907.11122-1-fziglio@redhat.com
State New
Headers show
Series "codegen: Ignore path generating include guards" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Oct. 18, 2019, 2:59 p.m.
Make sure that guard do no change building out-of-tree or
with Meson.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 python_modules/marshal.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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)