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 <kbrenneman@nvidia.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Emil Velikov 2018-12-09 19:51:15 +00:00 committed by Emil Velikov
parent a08a793180
commit cd0f11bac5
6 changed files with 19 additions and 6 deletions

View File

@ -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

View File

@ -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():

View File

@ -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,
)

View File

@ -31,6 +31,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
EXTRA_DIST = \
new/genCommon.py \
es1api/ABI-check \
es2api/ABI-check \
mapi_abi.py \

View File

@ -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')