PYTHON_GEN = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS)
g_egldispatchstubs.c: $(GLVND_GEN_DEPS)
$(PYTHON_GEN) $(top_srcdir)/src/egl/generate/gen_egl_dispatch.py source \
- $(top_srcdir)/src/egl/generate/eglFunctionList.py \
$(top_srcdir)/src/egl/generate/egl.xml \
$(top_srcdir)/src/egl/generate/egl_other.xml > $@
g_egldispatchstubs.h: $(GLVND_GEN_DEPS)
$(PYTHON_GEN) $(top_srcdir)/src/egl/generate/gen_egl_dispatch.py header \
- $(top_srcdir)/src/egl/generate/eglFunctionList.py \
$(top_srcdir)/src/egl/generate/egl.xml \
$(top_srcdir)/src/egl/generate/egl_other.xml > $@
import argparse
import collections
-import imp
+import eglFunctionList
import sys
import textwrap
parser = argparse.ArgumentParser()
parser.add_argument("target", choices=("header", "source"),
help="Whether to build the source or header file.")
- parser.add_argument("func_list_file", help="The function list .py file.")
parser.add_argument("xml_files", nargs="+", help="The XML files with the EGL function lists.")
args = parser.parse_args()
- # The function list is a Python module, but it's specified on the command
- # line.
- eglFunctionList = imp.load_source("eglFunctionList", args.func_list_file)
-
xmlFunctions = genCommon.getFunctions(args.xml_files)
xmlByName = dict((f.name, f) for f in xmlFunctions)
functions = []
g_egldispatchstubs_c = custom_target(
'g_egldispatchstubs.c',
input : [
- 'generate/gen_egl_dispatch.py', 'generate/eglFunctionList.py',
+ 'generate/gen_egl_dispatch.py',
'generate/egl.xml', 'generate/egl_other.xml'
],
output : 'g_egldispatchstubs.c',
command : [
- prog_python, '@INPUT0@', 'source', '@INPUT1@', '@INPUT2@', '@INPUT3@'
+ prog_python, '@INPUT0@', 'source', '@INPUT1@', '@INPUT2@',
],
- depend_files : files('generate/genCommon.py'),
+ depend_files : files('generate/eglFunctionList.py', 'generate/genCommon.py'),
capture : true,
)
g_egldispatchstubs_h = custom_target(
'g_egldispatchstubs.h',
input : [
- 'generate/gen_egl_dispatch.py', 'generate/eglFunctionList.py',
+ 'generate/gen_egl_dispatch.py',
'generate/egl.xml', 'generate/egl_other.xml'
],
output : 'g_egldispatchstubs.h',
command : [
- prog_python, '@INPUT0@', 'header', '@INPUT1@', '@INPUT2@', '@INPUT3@'
+ prog_python, '@INPUT0@', 'header', '@INPUT1@', '@INPUT2@',
],
- depend_files : files('generate/genCommon.py'),
+ depend_files : files('generate/eglFunctionList.py', 'generate/genCommon.py'),
capture : true,
)