ANDROID: modpost: Check for KBUILD_MIXED_TREE for Modules.symvers
When building with KBUILD_MIXED_TREE, Modules.symvers will not be built
since vmlinux.symvers won't be in the normal build outputs. Fix this by
checking for the mixed-build-prefix in the Modules.symvers target.
Fixes: d0736af81151c ("kbuild: generate Module.symvers only when vmlinux exists")
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Ic8dcc220cb7b93498629719aaccdb7b6fc38a6a1
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 276330b..e282ddf 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -73,10 +73,10 @@
quiet_cmd_cat = GEN $@
cmd_cat = cat $(real-prereqs) > $@
-ifneq ($(wildcard vmlinux.symvers),)
+ifneq ($(wildcard $(mixed-build-prefix)vmlinux.symvers),)
__modpost: Module.symvers
-Module.symvers: vmlinux.symvers modules-only.symvers FORCE
+Module.symvers: $(mixed-build-prefix)vmlinux.symvers modules-only.symvers FORCE
$(call if_changed,cat)
targets += Module.symvers