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.
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.