On 07/17/2012 09:54 PM, Sean V Kelley wrote:
On Mon, Jul 9, 2012 at 11:50 AM, Chad Versace
<chad.vers...@linux.intel.com> wrote:
Tapani,
Is this patch still applicable? It seems that the autoconf work has calmed
down,
and now is a good time to fix the Android build.
-Chad
Tapani is out. But this patch has never quite worked for me. The
build still breaks on Android over failure to generate enums.c
I'm back now, my guess this failure has happened because you had
previous build results in the intermediates directory, make clean or
manual cleaning is required for this patch to work ok .. but I see there
is now a new patch from Daniel which looks good, will try it out.
Sean
On 06/07/2012 04:11 AM, Tapani Pälli wrote:
Some more of the files are now autogenerated, this caused build
breakage,
patch adds generation of these missing files. Patch also changes
existing
make so that the files are created to be part of the local source
(not intermediate directory, this causes several problems).
Signed-off-by: Tapani Pälli <tapani.pa...@intel.com>
---
src/mesa/Android.gen.mk | 45
++++++++++++++++-----------------------------
1 file changed, 16 insertions(+), 29 deletions(-)
diff --git a/src/mesa/Android.gen.mk b/src/mesa/Android.gen.mk
index 2a08184..2ea8cc4 100644
--- a/src/mesa/Android.gen.mk
+++ b/src/mesa/Android.gen.mk
@@ -28,16 +28,13 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES
endif
intermediates := $(call local-intermediates-dir)
+mydir := $(call my-dir)
sources := \
- main/api_exec_es1.c \
main/api_exec_es1_dispatch.h \
main/api_exec_es1_remap_helper.h \
- main/api_exec_es2.c \
main/api_exec_es2_dispatch.h \
- main/api_exec_es2_remap_helper.h \
- program/lex.yy.c \
- program/program_parse.tab.c
+ main/api_exec_es2_remap_helper.h
LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES))
@@ -53,6 +50,7 @@ endif
sources += main/git_sha1.h
sources := $(addprefix $(intermediates)/, $(sources))
+
LOCAL_GENERATED_SOURCES += $(sources)
glapi := $(MESA_TOP)/src/mapi/glapi/gen
@@ -73,43 +71,31 @@ define es-gen
$(hide) $(PRIVATE_SCRIPT) $(1) $(PRIVATE_XML) > $@
endef
-define local-l-to-c
- @mkdir -p $(dir $@)
- @echo "Mesa Lex: $(PRIVATE_MODULE) <= $<"
- $(hide) $(LEX) -o$@ $<
-endef
-
-define local-y-to-c-and-h
- @mkdir -p $(dir $@)
- @echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<"
- $(hide) $(YACC) -o $@ $<
+define generate-local
+ @echo "generate local sources"
+ $(hide) $(MESA_PYTHON2) $(glapi)/gl_enums.py -f
$(glapi)/gl_and_es_API.xml > $(mydir)/main/enums.c
+ $(hide) $(MESA_PYTHON2) $(glapi)/gl_table.py -m remap_table -f
$(glapi)/gl_and_es_API.xml > $(mydir)/main/dispatch.h
+ $(hide) $(MESA_PYTHON2) $(glapi)/remap_helper.py -f
$(glapi)/gl_API.xml > $(mydir)/main/remap_helper.h
+ $(hide) $(MESA_PYTHON2) $(mydir)/main/es_generator.py -V GLES1.1
-S $(mydir)/main/APIspec.xml > $(mydir)/main/api_exec_es1.c
+ $(hide) $(MESA_PYTHON2) $(mydir)/main/es_generator.py -V GLES2.0
-S $(mydir)/main/APIspec.xml > $(mydir)/main/api_exec_es2.c
+
+ @echo "Mesa Lex : $(PRIVATE_MODULE)"
+ $(hide) $(LEX) -o $(mydir)/program/lex.yy.c
$(mydir)/program/program_lexer.l
+ @echo "Mesa Yacc: $(PRIVATE_MODULE)"
+ $(hide) $(YACC) -d -o $(mydir)/program/program_parse.tab.c
$(mydir)/program/program_parse.y
endef
-$(intermediates)/main/api_exec_%.c: PRIVATE_SCRIPT := $(MESA_PYTHON2)
$(LOCAL_PATH)/main/es_generator.py
-$(intermediates)/main/api_exec_%.c: PRIVATE_XML := -S
$(LOCAL_PATH)/main/APIspec.xml
$(intermediates)/main/api_exec_%_dispatch.h: PRIVATE_SCRIPT :=
$(MESA_PYTHON2) $(glapi)/gl_table.py
$(intermediates)/main/api_exec_%_dispatch.h: PRIVATE_XML := -f
$(glapi)/gl_and_es_API.xml
$(intermediates)/main/api_exec_%_remap_helper.h: PRIVATE_SCRIPT :=
$(MESA_PYTHON2) $(glapi)/remap_helper.py
$(intermediates)/main/api_exec_%_remap_helper.h: PRIVATE_XML := -f
$(glapi)/gl_and_es_API.xml
-$(intermediates)/main/api_exec_es1.c: $(es_src_deps)
- $(call es-gen,-V GLES1.1)
-
-$(intermediates)/main/api_exec_es2.c: $(es_src_deps)
- $(call es-gen,-V GLES2.0)
-
$(intermediates)/main/api_exec_%_dispatch.h: $(es_hdr_deps)
$(call es-gen, -c $* -m remap_table)
$(intermediates)/main/api_exec_%_remap_helper.h: $(es_hdr_deps)
$(call es-gen, -c $*)
-$(intermediates)/program/program_parse.tab.c:
$(LOCAL_PATH)/program/program_parse.y
- $(local-y-to-c-and-h)
-
-$(intermediates)/program/lex.yy.c:
$(LOCAL_PATH)/program/program_lexer.l
- $(local-l-to-c)
-
$(intermediates)/main/git_sha1.h:
@mkdir -p $(dir $@)
@echo "GIT-SHA1: $(PRIVATE_MODULE) <= git"
@@ -129,3 +115,4 @@ $(intermediates)/x86/matypes.h: $(matypes_deps)
@mkdir -p $(dir $@)
@echo "MATYPES: $(PRIVATE_MODULE) <= $(notdir $@)"
$(hide) $< > $@
+ $(call generate-local)
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
--
Sean V. Kelley <sean.v.kel...@intel.com>
Open Source Technology Center / SSG
Intel Corp.
--
// Tapani
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev