From 449ce5d64f3d0e5840287040755df23e86ce6bb2 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 9 Sep 2015 12:14:00 +0100 Subject: [PATCH] mapi: automake: rework the *api/glapi_mapi_tmp.h rules Same logic as previous commit applies. v2: Merge with "inline glapi_gen_mapi define" (Matt) Cc: 11.0 Signed-off-by: Emil Velikov Reviewed-by: Matt Turner --- src/mapi/Makefile.am | 23 ++++++++++++----------- 1 file 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 -- 2.30.2