[Mesa-dev] [PATCH 1/2] mapi: use a path prefix for sources variable

Chad Versace chad.versace at linux.intel.com
Thu Jul 19 11:23:56 PDT 2012


On 07/19/2012 10:59 AM, nobled wrote:
> This makes it possible to share sources.mak with the
> Android build again.
> ---
> 
> Still todo: sharing this with the SConscript build, which still
> duplicates the list of sources.
> 
>  src/mapi/glapi/Makefile.am        |    4 +++-
>  src/mapi/mapi/sources.mak         |   25 ++++++++++++++-----------
>  src/mapi/shared-glapi/Makefile.am |    4 +++-
>  3 files changed, 20 insertions(+), 13 deletions(-)
> 
> diff --git a/src/mapi/glapi/Makefile.am b/src/mapi/glapi/Makefile.am
> index 668d7fa..b9ef88f 100644
> --- a/src/mapi/glapi/Makefile.am
> +++ b/src/mapi/glapi/Makefile.am
> @@ -19,9 +19,10 @@
>  # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
>  # IN THE SOFTWARE.
> 
> -TOP = $(top_srcdir)
>  include sources.mak
> -include ../mapi/sources.mak
> +
> +MAPI = $(srcdir)/../mapi
> +include $(MAPI)/sources.mak
> 
>  AM_CPPFLAGS = \
>          $(DEFINES) \
> diff --git a/src/mapi/mapi/sources.mak b/src/mapi/mapi/sources.mak
> index 56f4afd..6c15170 100644
> --- a/src/mapi/mapi/sources.mak
> +++ b/src/mapi/mapi/sources.mak
> @@ -13,24 +13,27 @@
>  #
>  #  - In bridge mode, mapi provides entry points calling into glapi.  To use
>  #    this mode, compile MAPI_BRIDGE_FILES with MAPI_MODE_BRIDGE defined.
> +#
> +# The variable $(MAPI) must be defined to point to this source directory
> +# before the following variables can be used.
> 
>  MAPI_UTIL_FILES = \
> -	$(TOP)/src/mapi/mapi/u_current.c \
> -	$(TOP)/src/mapi/mapi/u_execmem.c
> +	$(MAPI)/u_current.c \
> +	$(MAPI)/u_execmem.c
> 
>  MAPI_FILES = \
> -	$(TOP)/src/mapi/mapi/entry.c \
> -	$(TOP)/src/mapi/mapi/mapi.c \
> -	$(TOP)/src/mapi/mapi/stub.c \
> -	$(TOP)/src/mapi/mapi/table.c \
> +	$(MAPI)/entry.c \
> +	$(MAPI)/mapi.c \
> +	$(MAPI)/stub.c \
> +	$(MAPI)/table.c \
>  	$(MAPI_UTIL_FILES)
> 
>  MAPI_GLAPI_FILES = \
> -	$(TOP)/src/mapi/mapi/entry.c \
> -	$(TOP)/src/mapi/mapi/mapi_glapi.c \
> -	$(TOP)/src/mapi/mapi/stub.c \
> -	$(TOP)/src/mapi/mapi/table.c \
> +	$(MAPI)/entry.c \
> +	$(MAPI)/mapi_glapi.c \
> +	$(MAPI)/stub.c \
> +	$(MAPI)/table.c \
>  	$(MAPI_UTIL_FILES)
> 
>  MAPI_BRIDGE_FILES = \
> -	$(TOP)/src/mapi/mapi/entry.c
> +	$(MAPI)/entry.c
> diff --git a/src/mapi/shared-glapi/Makefile.am
> b/src/mapi/shared-glapi/Makefile.am
> index 9485683..2cb33fc 100644
> --- a/src/mapi/shared-glapi/Makefile.am
> +++ b/src/mapi/shared-glapi/Makefile.am
> @@ -1,8 +1,9 @@
>  # Used by OpenGL ES or when --enable-shared-glapi is specified
> 
> -TOP = $(top_srcdir)
>  GLAPI = $(top_srcdir)/src/mapi/glapi
> -include $(top_srcdir)/src/mapi/mapi/sources.mak
> +MAPI = $(top_srcdir)/src/mapi/mapi
> +
> +include $(MAPI)/sources.mak
> 
>  lib_LTLIBRARIES = libglapi.la
>  libglapi_la_SOURCES = $(MAPI_GLAPI_FILES)

I just applied this patch to master(fadc9eaf97c0916d5680c1d3b47e80532ede22c1),
and it breaks the build with this message:

make[2]: Entering directory `/hedgehog/build/mesa/src/src/mapi/shared-glapi'
../../../src/mapi/glapi/gen/glapi_gen.mk:4: *** TOP must be defined..  Stop.
make[2]: Leaving directory `/hedgehog/build/mesa/src/src/mapi/shared-glapi'

I'm using the autotools build.

----
Chad Versace
chad.versace at linux.intel.com




More information about the mesa-dev mailing list