Skip to content
Snippets Groups Projects
Commit 61abc3e1 authored by Luca Stefani's avatar Luca Stefani
Browse files

Fixup freedren bison/lex usage

All the calls to bison and flex were duplicated.

The bison calls were missing the M4 env variable
causing the usage of m4 from $PATH instead of prebuilts.

Seems like mesa had already in place a way to make
use use proper calls to flex, we augment that to also
support bison ( depending Android version )

Change-Id: Ibe4e9224b23c7574975df1c7101c69581bc353b4
parent 64580cdc
No related branches found
No related tags found
No related merge requests found
......@@ -54,8 +54,10 @@ MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
MESA_PYTHON3 := python3
ifeq ($(filter 5 6 7 8 9 10, $(MESA_ANDROID_MAJOR_VERSION)),)
MESA_LEX := M4=$(M4) $(LEX)
MESA_BISON := M4=$(M4) $(BISON)
else
MESA_LEX := $(LEX)
MESA_BISON := $(BISON)
endif
# Lists to convert driver names to boolean variables
......
......@@ -78,8 +78,7 @@ ir3_parser_deps := \
$(intermediates)/ir3/ir3_lexer.c: $(ir3_lexer_deps) $(LEX) $(M4)
@mkdir -p $(dir $@)
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) $(MESA_LEX) -o $@ $<
$(hide) M4=$(M4) $(LEX) --nounistd -o$@ $<
$(hide) $(MESA_LEX) --nounistd -o$@ $<
$(intermediates)/ir3/ir3_nir_imul.c: $(prebuilt_intermediates)/ir3/ir3_nir_imul.c
cp -a $< $@
......@@ -90,14 +89,12 @@ $(intermediates)/ir3/ir3_nir_trig.c: $(prebuilt_intermediates)/ir3/ir3_nir_trig.
$(intermediates)/ir3/ir3_parser.c: $(ir3_parser_deps) $(BISON) $(BISON_DATA) $(M4)
@mkdir -p $(dir $@)
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) $(BISON) $< --name-prefix=ir3_yy --output=$@
$(hide) M4=$(M4) $(BISON) $< --name-prefix=ir3_yy --output=$@
$(hide) $(MESA_BISON) $< --name-prefix=ir3_yy --output=$@
$(intermediates)/ir3/ir3_parser.h: $(ir3_parser_deps) $(BISON) $(BISON_DATA) $(M4)
@mkdir -p $(dir $@)
@echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
$(hide) $(BISON) $< --name-prefix=ir3_yy --defines=$@ --output=$@.tab.c
$(hide) M4=$(M4) $(BISON) $< --name-prefix=ir3_yy --defines=$@ --output=$@.tab.c
$(hide) $(MESA_BISON) $< --name-prefix=ir3_yy --defines=$@ --output=$@.tab.c
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment