Use $(TOP_SRCDIR) in the static Makefile, but use a more specific variable for glapi_gen.mk now. --- src/mapi/es1api/Makefile | 4 ++-- src/mapi/glapi/gen/glapi_gen.mk | 14 +++++++------- src/mapi/shared-glapi/Makefile.am | 2 -- 3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/mapi/es1api/Makefile b/src/mapi/es1api/Makefile index a9c9123..91ae815 100644 --- a/src/mapi/es1api/Makefile +++ b/src/mapi/es1api/Makefile @@ -32,8 +32,8 @@ endif ESAPI = $(ES)api -GLAPI := $(TOP)/src/mapi/glapi -MAPI := $(TOP)/src/mapi/mapi +GLAPI := $(TOP_SRCDIR)/src/mapi/glapi +MAPI := $(TOP_SRCDIR)/src/mapi/mapi esapi_CPPFLAGS := \ -I$(TOP)/include \ diff --git a/src/mapi/glapi/gen/glapi_gen.mk b/src/mapi/glapi/gen/glapi_gen.mk index 1b05a40..fdc7e19 100644 --- a/src/mapi/glapi/gen/glapi_gen.mk +++ b/src/mapi/glapi/gen/glapi_gen.mk @@ -1,14 +1,14 @@ # Helpers for glapi header generation -ifndef TOP -$(error TOP must be defined.) +ifndef GLAPI +$(error GLAPI must be defined to point to src/mapi/glapi) endif glapi_gen_common_deps := \ - $(wildcard $(TOP)/src/mapi/glapi/gen/*.xml) \ - $(wildcard $(TOP)/src/mapi/glapi/gen/*.py) + $(wildcard $(GLAPI)/gen/*.xml) \ + $(wildcard $(GLAPI)/gen/*.py) -glapi_gen_mapi_script := $(TOP)/src/mapi/mapi/mapi_abi.py +glapi_gen_mapi_script := $(GLAPI)/../mapi/mapi_abi.py glapi_gen_mapi_deps := \ $(glapi_gen_mapi_script) \ $(glapi_gen_common_deps) @@ -21,7 +21,7 @@ $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_mapi_script) \ --mode lib --printer $(2) $(1) > $@ endef -glapi_gen_dispatch_script := $(TOP)/src/mapi/glapi/gen/gl_table.py +glapi_gen_dispatch_script := $(GLAPI)/gen/gl_table.py glapi_gen_dispatch_deps := $(glapi_gen_common_deps) # $(1): path to an XML file @@ -32,7 +32,7 @@ $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_dispatch_script) \ -f $(1) -m remap_table $(if $(2),-c $(2),) > $@ endef -glapi_gen_remap_script := $(TOP)/src/mapi/glapi/gen/remap_helper.py +glapi_gen_remap_script := $(GLAPI)/gen/remap_helper.py glapi_gen_remap_deps := $(glapi_gen_common_deps) # $(1): path to an XML file diff --git a/src/mapi/shared-glapi/Makefile.am b/src/mapi/shared-glapi/Makefile.am index de958f6..db68683 100644 --- a/src/mapi/shared-glapi/Makefile.am +++ b/src/mapi/shared-glapi/Makefile.am @@ -9,8 +9,6 @@ lib_LTLIBRARIES = libglapi.la libglapi_la_SOURCES = $(MAPI_GLAPI_FILES) libglapi_la_LDFLAGS = -no-undefined -# FIXME: eliminate the use of $(TOP) -TOP = $(top_srcdir) include $(GLAPI)/gen/glapi_gen.mk glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps) $(call glapi_gen_mapi,$<,shared-glapi) -- 1.7.9.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev