Port the 'glcpp: fix abuse of yylex' commit to Android.mk
Also, since the Android.*.mk are sourced in a global namespace,
the local-y-to-c-and-h is prefixed with the LOCAL_MODULE name,
The initial fix commit is
53d46bc787318ccf9911fdd1d5fe99ee4db7f41a
There's also a bugzilla for this: 54947
Signed-off-by: Negreanu Marius Adrian <adrian.m.negreanu@intel.com>
Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
$(hide) $(LEX) --nounistd -o$@ $<
endef
-define local-y-to-c-and-h
+define glsl_local-y-to-c-and-h
@mkdir -p $(dir $@)
@echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<"
- $(hide) $(YACC) -o $@ $<
+ $(hide) $(YACC) -o $@ -p "glcpp_parser_" $<
endef
define local-yy-to-cpp-and-h
$(call local-l-or-ll-to-c-or-cpp)
$(intermediates)/glcpp/glcpp-parse.c: $(LOCAL_PATH)/glcpp/glcpp-parse.y
- $(call local-y-to-c-and-h)
+ $(call glsl_local-y-to-c-and-h)
BUILTIN_COMPILER := $(BUILD_OUT_EXECUTABLES)/mesa_builtin_compiler$(BUILD_EXECUTABLE_SUFFIX)
$(hide) $(LEX) -o$@ $<
endef
-define local-y-to-c-and-h
+define mesa_local-y-to-c-and-h
@mkdir -p $(dir $@)
@echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<"
- $(hide) $(YACC) -o $@ $<
+ $(hide) $(YACC) -o $@ -p "_mesa_program_" $<
endef
define es-gen
$(call es-gen, -c $*)
$(intermediates)/program/program_parse.tab.c: $(LOCAL_PATH)/program/program_parse.y
- $(local-y-to-c-and-h)
+ $(mesa_local-y-to-c-and-h)
$(intermediates)/program/lex.yy.c: $(LOCAL_PATH)/program/program_lexer.l
$(local-l-to-c)