aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi/gen.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
index 33690bfa3b..bf5552a4e7 100644
--- a/scripts/qapi/gen.py
+++ b/scripts/qapi/gen.py
@@ -44,6 +44,11 @@ class QAPIGen:
return ''
def write(self, output_dir):
+ # Include paths starting with ../ are used to reuse modules of the main
+ # schema in specialised schemas. Don't overwrite the files that are
+ # already generated for the main schema.
+ if self.fname.startswith('../'):
+ return
pathname = os.path.join(output_dir, self.fname)
odir = os.path.dirname(pathname)
if odir: