summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/idl/idl_filenames.py
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/plugin/idl/idl_filenames.py')
-rw-r--r--o3d/plugin/idl/idl_filenames.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/o3d/plugin/idl/idl_filenames.py b/o3d/plugin/idl/idl_filenames.py
new file mode 100644
index 0000000..ceb1575
--- /dev/null
+++ b/o3d/plugin/idl/idl_filenames.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+# This script takes a list of inputs and generates a list of outputs
+# that Nixysa will generate. It passes through any files not ending
+# in .idl, and converts idl files into corresponding .cc and .h files.
+
+# The first argument is the destintation directory for the output
+# files, and the rest are relative paths to the source files. The
+# output is posix paths, because that's what GYP expects.
+
+import sys
+import posixpath
+
+output_dir = sys.argv[1]
+
+for file in sys.argv[2:]:
+ (base, suffix) = posixpath.splitext(file)
+ if suffix == ".idl":
+ print posixpath.normpath(posixpath.join(output_dir, "%s_glue.h" % base))
+ print posixpath.normpath(posixpath.join(output_dir, "%s_glue.cc" % base))
+ else:
+ print posixpath.normpath(posixpath.join(output_dir, file))
+
+sys.exit(0)