Module: Mesa
Branch: master
Commit: 449ce5d64f3d0e5840287040755df23e86ce6bb2
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=449ce5d64f3d0e5840287040755df23e86ce6bb2

Author: Emil Velikov <[email protected]>
Date:   Wed Sep  9 12:14:00 2015 +0100

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 <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Matt Turner <[email protected]>

---

 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 160a255..307e05d 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

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to