summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2018-12-09 19:51:15 +0000
committerEmil Velikov <[email protected]>2019-01-24 18:13:25 +0000
commitcd0f11bac55b14728cf70e39cd269a70aeb2b5d4 (patch)
treede576991eaac33b7fa1e2ce3640a35ac547b820a /src
parenta08a793180716770e8a4509447b8621cc57304bc (diff)
mapi: move genCommon.py to src/mapi/new
The helper will also be used by the new Khronos gl.xml aware generator. v2: Move existing one, instead of duplicating it. v3: Correct genCommon.py references in meson [Erik] v4: Drop the file from the EGL EXTRA_DIST [Erik] Suggested-by: Kyle Brenneman <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/egl/Makefile.am14
-rw-r--r--src/egl/generate/gen_egl_dispatch.py3
-rw-r--r--src/egl/meson.build6
-rw-r--r--src/mapi/Makefile.am1
-rw-r--r--src/mapi/meson.build1
-rw-r--r--src/mapi/new/genCommon.py (renamed from src/egl/generate/genCommon.py)0
6 files changed, 19 insertions, 6 deletions
diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
index ff928525e6c..de4a754a2db 100644
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
@@ -136,10 +136,18 @@ libEGL_common_la_LIBADD += \
$(LIBDRM_LIBS) \
$(CLOCK_LIB)
-GLVND_GEN_DEPS = generate/gen_egl_dispatch.py \
- generate/egl.xml generate/eglFunctionList.py generate/genCommon.py \
+# dummy rule to keep dist happy
+$(top_scrdir)/src/mapi/new/genCommon.py:
+
+GLVND_GEN_EGL_DEPS = \
+ generate/gen_egl_dispatch.py \
+ generate/eglFunctionList.py \
+ generate/egl.xml \
generate/egl_other.xml
+GLVND_GEN_DEPS = $(top_scrdir)/src/mapi/new/genCommon.py \
+ $(GLVND_GEN_EGL_DEPS)
+
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 \
@@ -226,6 +234,6 @@ EXTRA_DIST = \
drivers/haiku \
main/egl.def \
main/README.txt \
- $(GLVND_GEN_DEPS) \
+ $(GLVND_GEN_EGL_DEPS) \
main/50_mesa.json \
meson.build
diff --git a/src/egl/generate/gen_egl_dispatch.py b/src/egl/generate/gen_egl_dispatch.py
index d556a7782c9..fe901fdd5b6 100644
--- a/src/egl/generate/gen_egl_dispatch.py
+++ b/src/egl/generate/gen_egl_dispatch.py
@@ -38,6 +38,9 @@ import eglFunctionList
import sys
import textwrap
+import os
+NEWAPI = os.path.join(os.path.dirname(__file__), "..", "..", "mapi", "new")
+sys.path.insert(0, NEWAPI)
import genCommon
def main():
diff --git a/src/egl/meson.build b/src/egl/meson.build
index 461892f5ae8..a23cc36fc2b 100644
--- a/src/egl/meson.build
+++ b/src/egl/meson.build
@@ -1,4 +1,4 @@
-# Copyright © 2017 Intel Corporation
+# Copyright © 2017 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -69,7 +69,7 @@ g_egldispatchstubs_c = custom_target(
command : [
prog_python, '@INPUT0@', 'source', '@INPUT1@', '@INPUT2@',
],
- depend_files : files('generate/eglFunctionList.py', 'generate/genCommon.py'),
+ depend_files : [ files('generate/eglFunctionList.py'), genCommon_py, ],
capture : true,
)
@@ -83,7 +83,7 @@ g_egldispatchstubs_h = custom_target(
command : [
prog_python, '@INPUT0@', 'header', '@INPUT1@', '@INPUT2@',
],
- depend_files : files('generate/eglFunctionList.py', 'generate/genCommon.py'),
+ depend_files : [ files('generate/eglFunctionList.py'), genCommon_py, ],
capture : true,
)
diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am
index 97ebdeb1d7f..b46ed814700 100644
--- a/src/mapi/Makefile.am
+++ b/src/mapi/Makefile.am
@@ -31,6 +31,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
EXTRA_DIST = \
+ new/genCommon.py \
es1api/ABI-check \
es2api/ABI-check \
mapi_abi.py \
diff --git a/src/mapi/meson.build b/src/mapi/meson.build
index 798586bfb0c..24013c65542 100644
--- a/src/mapi/meson.build
+++ b/src/mapi/meson.build
@@ -25,6 +25,7 @@ files_mapi_util = files(
'u_execmem.h',
)
+genCommon_py = files('new/genCommon.py')
mapi_abi_py = files('mapi_abi.py')
subdir('glapi')
diff --git a/src/egl/generate/genCommon.py b/src/mapi/new/genCommon.py
index b0925d80151..b0925d80151 100644
--- a/src/egl/generate/genCommon.py
+++ b/src/mapi/new/genCommon.py