summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2012-06-14 15:05:22 -0700
committerYing Wang <wangying@google.com>2012-06-15 21:06:47 -0700
commit3b86e1f2371f3bfb4b798d5c7671bf8ed79f5caf (patch)
tree7544cfed8f659cc91d59ac3765376d2396e733f2
parent2018726aeb9a40b84670483d5e6ef381f662ddd9 (diff)
downloadsrec-3b86e1f2371f3bfb4b798d5c7671bf8ed79f5caf.tar.gz
Bug: 6294985 With ALL_PREBUILT it just installs the data files to all devices. We switch to a config.mk, which will be included by module definition of VoiceDialer.apk and set up the necessary dependency. TODO: modulize the config files and have VoiceDialer.apk depend on them. Change-Id: I25ecb9888960806acda808ef8f5e88fe9bcb48bb
-rw-r--r--config/en.us/Android.mk23
-rw-r--r--config/en.us/config.mk21
-rw-r--r--srec_jni/Android.mk3
3 files changed, 34 insertions, 13 deletions
diff --git a/config/en.us/Android.mk b/config/en.us/Android.mk
index 9af1f12..881c2ee 100644
--- a/config/en.us/Android.mk
+++ b/config/en.us/Android.mk
@@ -1,6 +1,6 @@
LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
+########################################
copy_from := \
baseline11k.par \
@@ -23,7 +23,8 @@ copy_to := $(addprefix $(TARGET_OUT)/usr/srec/config/en.us/,$(copy_from))
$(copy_to) : $(TARGET_OUT)/usr/srec/config/en.us/% : $(LOCAL_PATH)/% | $(ACP)
$(transform-prebuilt-to-target)
-ALL_PREBUILT += $(copy_to)
+# ALL_PREBUILT is deprecated. Moved to config.mk
+# ALL_PREBUILT += $(copy_to)
# define paths to some grammar tools
@@ -45,9 +46,10 @@ srec_grammars : \
$(G2G_INSTALL_PATH)/ipaq_commands.g2g \
$(G2G_INSTALL_PATH)/lookup.g2g \
-ALL_PREBUILT += $(G2G_INSTALL_PATH)/VoiceDialer.g2g \
- $(G2G_INSTALL_PATH)/boolean.g2g \
- $(G2G_INSTALL_PATH)/phone_type_choice.g2g
+# ALL_PREBUILT is deprecated. Moved to config.mk
+# ALL_PREBUILT += $(G2G_INSTALL_PATH)/VoiceDialer.g2g \
+# $(G2G_INSTALL_PATH)/boolean.g2g \
+# $(G2G_INSTALL_PATH)/phone_type_choice.g2g
#---------------------------------------------------------------------------------
# Explicit rules.
@@ -72,7 +74,6 @@ $(G2G_INSTALL_PATH)/%.g2g: $(LOCAL_PATH)/grammars/%.grxml $(GRXML) $(MAKE_G2G) $
$(MAKE_G2G) -base $(G2G_INSTALL_PATH)/$*,addWords=0 -out $@
(cd $(G2G_INSTALL_PATH); rm -f $*.Grev2.det.txt $*.map $*.omap $*.P.txt $*.params $*.PCLG.txt $*.script)
-
#-----------------------------------------------------------------
# this rule generates cmu6plus.ok.zip, which is built manually and checked in.
# the grxml compiler expects this (and other) data files to be here.
@@ -97,14 +98,12 @@ cmu6plus.ok.zip: $(CMU2NUANCE) $(DICT_DIR)/c0.6 $(DICT_DIR)/numbers.ok $(DICT_DI
echo -e "\n+++ advzip not installed; fell back to zip\n cmu6plus.ok.zip (`du -h cmu6plus.ok.zip | cut -f 1`) could be ~10% smaller with advzip\n"))
-
#-----------------------------------------------------------------
# build cmu2nuance dictionary conversion program, to prevent bitrot
#-----------------------------------------------------------------
-
-LOCAL_SRC_FILES:= dictionary/cmu2nuance.cpp
-
-LOCAL_MODULE:= cmu2nuance
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := dictionary/cmu2nuance.cpp
+LOCAL_MODULE := cmu2nuance
+LOCAL_MODULE_TAGS := optional
include $(BUILD_HOST_EXECUTABLE)
-
diff --git a/config/en.us/config.mk b/config/en.us/config.mk
new file mode 100644
index 0000000..60d2b3c
--- /dev/null
+++ b/config/en.us/config.mk
@@ -0,0 +1,21 @@
+# Config files to be installed.
+SREC_CONFIG_TARGET_FILES := \
+ $(addprefix $(TARGET_OUT)/usr/srec/config/en.us/, \
+ baseline11k.par \
+ baseline8k.par \
+ baseline.par \
+ dictionary/basic.ok \
+ dictionary/enroll.ok \
+ dictionary/cmu6plus.ok.zip \
+ g2p/en-US-ttp.data \
+ models/generic.swiarb \
+ models/generic11.lda \
+ models/generic11_f.swimdl \
+ models/generic11_m.swimdl \
+ models/generic8.lda \
+ models/generic8_f.swimdl \
+ models/generic8_m.swimdl) \
+ $(addprefix $(TARGET_OUT)/usr/srec/config/en.us/grammars/, \
+ VoiceDialer.g2g \
+ boolean.g2g \
+ phone_type_choice.g2g)
diff --git a/srec_jni/Android.mk b/srec_jni/Android.mk
index 81035ed..d3ef8d9 100644
--- a/srec_jni/Android.mk
+++ b/srec_jni/Android.mk
@@ -71,5 +71,6 @@ LOCAL_LDLIBS += -lpthread
LOCAL_MODULE := libsrec_jni
-include $(BUILD_SHARED_LIBRARY)
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_SHARED_LIBRARY)