summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mapi/Makefile.am23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am
index 160a255af6a..307e05d503f 100644
--- a/src/mapi/Makefile.am
+++ b/src/mapi/Makefile.am
@@ -50,19 +50,14 @@ AM_CPPFLAGS = \
include Makefile.sources
+MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
+
glapi_gen_mapi_deps := \
mapi_abi.py \
$(wildcard glapi/gen/*.xml) \
$(wildcard glapi/gen/*.py)
-# $(1): path to an XML file
-# $(2): name of the printer
-define glapi_gen_mapi
-@$(MKDIR_P) $(dir $@)
-$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/mapi_abi.py \
- --mode lib --printer $(2) $(1) > $@
-endef
-
if HAVE_SHARED_GLAPI
BUILT_SOURCES += shared-glapi/glapi_mapi_tmp.h
@@ -93,7 +88,9 @@ shared_glapi_test_LDADD = \
endif
shared-glapi/glapi_mapi_tmp.h : glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
- $(call glapi_gen_mapi,$<,shared-glapi)
+ $(MKDIR_GEN)
+ $(PYTHON_GEN) $(srcdir)/mapi_abi.py --mode lib --printer shared-glapi \
+ $(srcdir)/glapi/gen/gl_and_es_API.xml > $@
if HAVE_OPENGL
noinst_LTLIBRARIES = glapi/libglapi.la
@@ -185,7 +182,9 @@ endif
endif
es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
- $(call glapi_gen_mapi,$<,es1api)
+ $(MKDIR_GEN)
+ $(PYTHON_GEN) $(srcdir)/mapi_abi.py --mode lib --printer es1api \
+ $(srcdir)/glapi/gen/gl_and_es_API.xml > $@
if HAVE_OPENGL_ES2
TESTS += es2api/ABI-check
@@ -229,6 +228,8 @@ endif
endif
es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
- $(call glapi_gen_mapi,$<,es2api)
+ $(MKDIR_GEN)
+ $(PYTHON_GEN) $(srcdir)/mapi_abi.py --mode lib --printer es2api \
+ $(srcdir)/glapi/gen/gl_and_es_API.xml > $@
include $(top_srcdir)/install-lib-links.mk