aboutsummaryrefslogtreecommitdiff
path: root/scripts/common_codegen.py
diff options
context:
space:
mode:
authorMike Schuchardt <mikes@lunarg.com>2019-07-22 16:57:15 -0700
committerTobin Ehlis <tobine@google.com>2019-07-24 06:48:13 -0600
commit6a0ba2cdd9467c33a8accf7146962f8bbdd73e44 (patch)
tree1302e4c5ae445173902b163222b0a36ffda2e0c4 /scripts/common_codegen.py
parentaafd3a949e35d2d3964f926d5a2a5d15a85c094e (diff)
downloadusermoji-6a0ba2cdd9467c33a8accf7146962f8bbdd73e44.tar.xz
scripts: Port codegen script from VVL
Diffstat (limited to 'scripts/common_codegen.py')
-rw-r--r--scripts/common_codegen.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/common_codegen.py b/scripts/common_codegen.py
index 89545326..d56ebac2 100644
--- a/scripts/common_codegen.py
+++ b/scripts/common_codegen.py
@@ -18,10 +18,7 @@
#
# Author: Mark Lobodzinski <mark@lunarg.com>
-import os,re,sys,string
-import xml.etree.ElementTree as etree
-from generator import *
-from collections import namedtuple
+import os
# Copyright text prefixing all headers (list of strings).
prefixStrings = [
@@ -71,3 +68,7 @@ def GetFeatureProtect(interface):
if platform is not None:
protect = platform_dict[platform]
return protect
+
+# helper to define paths relative to the repo root
+def repo_relative(path):
+ return os.path.abspath(os.path.join(os.path.dirname(__file__), '..', path))