This commit converts all variables in Makefile.defines to be of the
simply-expanded flavor.

This commit is a cleanup for Android.

Rationale
---------
>From the GNU Make manual, Section 6.2 The Two Flavors of Variables:
    There are two ways that a variable in GNU make can have a value; we
    call them the two flavors of variables. The two flavors are
    distinguished in how they are defined and in what they do when
    expanded. [...] The first flavor of variable is a recursively expanded
    variable. [...] To avoid all the problems and inconveniences of
    recursively expanded variables, there is another flavor: simply
    expanded variables.

There are two prominent properties of the Android build system that render
the "problems and inconveniences of recursively expanded variables"
fatally poisonous.
    1. All components of the Android platform reside in a single source
       tree.
    2. Android is built with a single, non-recursive invocation of `make`.

Note: This is in preparation for porting i965 to Android.
CC: Chia-I Wu <o...@lunarg.com>,
CC: Chih-Wei Huang <cwhu...@android-x86.org>
Signed-off-by: Chad Versace <c...@chad-versace.us>
---
 src/mesa/sources.mak |   54 +++++++++++++++++++++++++-------------------------
 1 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index 4b2ec08..e45c99f 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -1,11 +1,11 @@
 ### Lists of source files, included by Makefiles
 
 # this is part of MAIN_SOURCES
-MAIN_ES_SOURCES = \
+MAIN_ES_SOURCES := \
        main/api_exec_es1.c \
        main/api_exec_es2.c
 
-MAIN_SOURCES = \
+MAIN_SOURCES := \
        main/api_arrayelt.c \
        main/api_exec.c \
        main/api_loopback.c \
@@ -103,10 +103,10 @@ MAIN_SOURCES = \
        main/vtxfmt.c \
        $(MAIN_ES_SOURCES)
 
-MAIN_CXX_SOURCES = \
+MAIN_CXX_SOURCES := \
        main/ff_fragment_shader.cpp
 
-MATH_SOURCES = \
+MATH_SOURCES := \
        math/m_debug_clip.c \
        math/m_debug_norm.c \
        math/m_debug_xform.c \
@@ -115,10 +115,10 @@ MATH_SOURCES = \
        math/m_translate.c \
        math/m_vector.c
 
-MATH_XFORM_SOURCES = \
+MATH_XFORM_SOURCES := \
        math/m_xform.c
 
-SWRAST_SOURCES = \
+SWRAST_SOURCES := \
        swrast/s_aaline.c \
        swrast/s_aatriangle.c \
        swrast/s_accum.c \
@@ -148,11 +148,11 @@ SWRAST_SOURCES = \
        swrast/s_triangle.c \
        swrast/s_zoom.c
 
-SWRAST_SETUP_SOURCES = \
+SWRAST_SETUP_SOURCES := \
        swrast_setup/ss_context.c \
        swrast_setup/ss_triangle.c 
 
-TNL_SOURCES = \
+TNL_SOURCES := \
        tnl/t_context.c \
        tnl/t_pipeline.c \
        tnl/t_draw.c \
@@ -171,7 +171,7 @@ TNL_SOURCES = \
        tnl/t_vertex_sse.c \
        tnl/t_vertex_generic.c 
 
-VBO_SOURCES = \
+VBO_SOURCES := \
        vbo/vbo_context.c \
        vbo/vbo_exec.c \
        vbo/vbo_exec_api.c \
@@ -187,7 +187,7 @@ VBO_SOURCES = \
        vbo/vbo_save_draw.c \
        vbo/vbo_save_loopback.c 
 
-STATETRACKER_SOURCES = \
+STATETRACKER_SOURCES := \
        state_tracker/st_atom.c \
        state_tracker/st_atom_blend.c \
        state_tracker/st_atom_clip.c \
@@ -237,7 +237,7 @@ STATETRACKER_SOURCES = \
        state_tracker/st_program.c \
        state_tracker/st_texture.c
 
-PROGRAM_SOURCES = \
+PROGRAM_SOURCES := \
        program/arbprogparse.c \
        program/hash_table.c \
        program/lex.yy.c \
@@ -261,11 +261,11 @@ PROGRAM_SOURCES = \
        program/symbol_table.c
 
 
-SHADER_CXX_SOURCES = \
+SHADER_CXX_SOURCES := \
        program/ir_to_mesa.cpp \
        program/sampler.cpp
 
-ASM_C_SOURCES =        \
+ASM_C_SOURCES :=       \
        x86/common_x86.c \
        x86/x86_xform.c \
        x86/3dnow.c \
@@ -275,7 +275,7 @@ ASM_C_SOURCES =     \
        ppc/common_ppc.c \
        x86-64/x86-64.c
 
-X86_SOURCES =                  \
+X86_SOURCES :=                 \
        x86/common_x86_asm.S    \
        x86/x86_xform2.S        \
        x86/x86_xform3.S        \
@@ -294,21 +294,21 @@ X86_SOURCES =                     \
        x86/sse_normal.S        \
        x86/read_rgba_span_x86.S
 
-X86-64_SOURCES =               \
+X86-64_SOURCES :=              \
        x86-64/xform4.S
 
-SPARC_SOURCES =                        \
+SPARC_SOURCES :=                       \
        sparc/clip.S            \
        sparc/norm.S            \
        sparc/xform.S
 
-COMMON_DRIVER_SOURCES =                        \
+COMMON_DRIVER_SOURCES :=                       \
        drivers/common/driverfuncs.c    \
        drivers/common/meta.c
 
 
 # Sources for building non-Gallium drivers
-MESA_SOURCES = \
+MESA_SOURCES := \
        $(MAIN_SOURCES)         \
        $(MATH_SOURCES)         \
        $(MATH_XFORM_SOURCES)   \
@@ -320,12 +320,12 @@ MESA_SOURCES = \
        $(COMMON_DRIVER_SOURCES)\
        $(ASM_C_SOURCES)
 
-MESA_CXX_SOURCES = \
+MESA_CXX_SOURCES := \
        $(MAIN_CXX_SOURCES) \
        $(SHADER_CXX_SOURCES)
 
 # Sources for building Gallium drivers
-MESA_GALLIUM_SOURCES = \
+MESA_GALLIUM_SOURCES := \
        $(MAIN_SOURCES)         \
        $(MATH_SOURCES)         \
        $(VBO_SOURCES)          \
@@ -334,12 +334,12 @@ MESA_GALLIUM_SOURCES = \
        ppc/common_ppc.c        \
        x86/common_x86.c
 
-MESA_GALLIUM_CXX_SOURCES = \
+MESA_GALLIUM_CXX_SOURCES := \
        $(MAIN_CXX_SOURCES) \
        $(SHADER_CXX_SOURCES)
 
 # All the core C sources, for dependency checking
-ALL_SOURCES = \
+ALL_SOURCES := \
        $(MESA_SOURCES)         \
        $(MESA_CXX_SOURCES)     \
        $(MESA_ASM_SOURCES)     \
@@ -348,29 +348,29 @@ ALL_SOURCES = \
 
 ### Object files
 
-MESA_OBJECTS = \
+MESA_OBJECTS := \
        $(MESA_SOURCES:.c=.o) \
        $(MESA_CXX_SOURCES:.cpp=.o) \
        $(MESA_ASM_SOURCES:.S=.o)
 
-MESA_GALLIUM_OBJECTS = \
+MESA_GALLIUM_OBJECTS := \
        $(MESA_GALLIUM_SOURCES:.c=.o) \
        $(MESA_GALLIUM_CXX_SOURCES:.cpp=.o) \
        $(MESA_ASM_SOURCES:.S=.o)
 
 
-COMMON_DRIVER_OBJECTS = $(COMMON_DRIVER_SOURCES:.c=.o)
+COMMON_DRIVER_OBJECTS := $(COMMON_DRIVER_SOURCES:.c=.o)
 
 
 ### Other archives/libraries
 
-GLSL_LIBS = \
+GLSL_LIBS := \
        $(TOP)/src/glsl/libglsl.a
 
 
 ### Include directories
 
-INCLUDE_DIRS = \
+INCLUDE_DIRS := \
        -I$(TOP)/include \
        -I$(TOP)/src/glsl \
        -I$(TOP)/src/mesa \
-- 
1.7.6

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to