Override LOCAL_MODULE?

2,059 views
Skip to first unread message

Maria Gutowski

unread,
Oct 23, 2010, 12:23:37 PM10/23/10
to android-...@googlegroups.com
Is there any way to override LOCAL_MODULE from an Android.mk file?
 
I'm interested in solving a situation where sometimes there will be both source and a binary provided for a given module and I want one of them to always be used if both are present.

Ying Wang

unread,
Oct 23, 2010, 4:06:29 PM10/23/10
to android-...@googlegroups.com
You can not override LOCAL_MODULE.
You should still define 2 separate modules in you Android.mk and then make 1 module override another by setting LOCAL_OVERRIDES_PACKAGES.
For example:
....
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := Module1
# other settings
....
include $(CLEAR_VARS)
LOCAL_MODULE := Module2
LOCAL_OVERRIDES_PACKAGES := Module1
# other settings
...

Then if both Module1 and Module2 appear in PRODUCT_PACKAGES, only Module2 will get installed.

On Sat, Oct 23, 2010 at 9:23 AM, Maria Gutowski <maria.g...@gmail.com> wrote:
Is there any way to override LOCAL_MODULE from an Android.mk file?
 
I'm interested in solving a situation where sometimes there will be both source and a binary provided for a given module and I want one of them to always be used if both are present.

--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

Reply all
Reply to author
Forward
0 new messages