Fix /system/app/$app.odex not updated issue

$(built_odex) depends on $(LOCAL_BUILT_MODULE) but doesn't have any build
recipe. It is built by the rules of $(LOCAL_BUILT_MODULE) that results in
a subtle bug: $(built_odex) is always newer than $(LOCAL_BUILT_MODULE)
if $(LOCAL_BUILT_MODULE) rebuilt. Therefore 'make' thinks the targets
(/system/app/$app.odex) depending on $(built_odex) don't need to be updated.
It seems an allegedly optimization bug of 'make'.

The simple fix is to explicitly add $(LOCAL_BUILT_MODULE) as a dependency
of $(installed_odex).
1 file changed