glsl: build: use makefile.sources variables when possible
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 17 Jul 2015 12:30:51 +0000 (13:30 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 9 Sep 2015 11:48:43 +0000 (12:48 +0100)
Rather than folding one variable within the other only to unwrap them,
just use the ones we need.

v2: bring back LOCAL_PATH prefix for nir_constant_expressions,h

Cc: 11.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com> (v1)
src/glsl/Android.gen.mk
src/glsl/Makefile.am
src/glsl/Makefile.sources

index 0835871f9126353bf07f8e13415a4f131ebf5c53..798884f2602c44bac109dde609c5a1d7011f1702 100644 (file)
@@ -29,18 +29,7 @@ endif
 
 intermediates := $(call local-generated-sources-dir)
 
-sources := \
-       glsl_lexer.cpp \
-       glsl_parser.cpp \
-       glcpp/glcpp-lex.c \
-       glcpp/glcpp-parse.c \
-       nir/nir_builder_opcodes.h \
-       nir/nir_constant_expressions.c \
-       nir/nir_opcodes.c \
-       nir/nir_opcodes.h \
-       nir/nir_opt_algebraic.c
-
-LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES))
+LOCAL_SRC_FILES := $(LOCAL_SRC_FILES)
 
 LOCAL_C_INCLUDES += \
        $(intermediates)/glcpp \
@@ -51,8 +40,10 @@ LOCAL_C_INCLUDES += \
 LOCAL_EXPORT_C_INCLUDE_DIRS += \
        $(intermediates)/nir
 
-sources := $(addprefix $(intermediates)/, $(sources))
-LOCAL_GENERATED_SOURCES += $(sources)
+LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
+       $(LIBGLCPP_GENERATED_FILES) \
+       $(NIR_GENERATED_FILES) \
+       $(LIBGLSL_GENERATED_CXX_FILES))
 
 define local-l-or-ll-to-c-or-cpp
        @mkdir -p $(dir $@)
index 831849859ac2892e31e37f53166d2a640ad18b48..7dfd60404ee09be2a9df605d932162c9e0c37c0a 100644 (file)
@@ -140,13 +140,16 @@ libglsl_la_SOURCES =                                      \
        glsl_parser.cpp                                 \
        glsl_parser.h                                   \
        $(LIBGLSL_FILES)                                \
-       $(NIR_FILES)
+       $(NIR_FILES)                                    \
+       $(NIR_GENERATED_FILES)
+
 
 libnir_la_SOURCES =                                    \
        glsl_types.cpp                                  \
        builtin_types.cpp                               \
        glsl_symbol_table.cpp                           \
-       $(NIR_FILES)
+       $(NIR_FILES)                                    \
+       $(NIR_GENERATED_FILES)
 
 glsl_compiler_SOURCES = \
        $(GLSL_COMPILER_CXX_FILES)
index c422303ddac2180bfb0d9712a6efa28235defba0..8f468e10ee34603f772320dddd3dae0b9ad71c4a 100644 (file)
@@ -73,8 +73,7 @@ NIR_FILES = \
        nir/nir_vla.h \
        nir/nir_worklist.c \
        nir/nir_worklist.h \
-       nir/nir_types.cpp \
-       $(NIR_GENERATED_FILES)
+       nir/nir_types.cpp
 
 # libglsl