Shift the preprocess mk before build emulator packages

Test run:
- https://android-build.corp.google.com/builds/abtd/run/L68900030004495469

Bug: 344588337
Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=sdk_g3caiman_x86_64 TARGET_RELEASE=trunk TARGET_BUILD_VARIANT=userdebug droid dist
Change-Id: I7d050428d5cc17de8078f8824991b71b7915a4a4
diff --git a/core/Makefile b/core/Makefile
index a16365d..cdb8423 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -7562,6 +7562,10 @@
 droidcore-unbundled: $(QEMU_VERIFIED_BOOT_PARAMS)
 
 endif
+
+# Preprocess files for emulator and sdk.
+-include development/build/tools/sdk-preprocess-files.mk
+
 # -----------------------------------------------------------------
 # The emulator package
 ifeq ($(BUILD_EMULATOR),true)
@@ -7606,7 +7610,6 @@
 sdk_dep_file := $(sdk_dir)/sdk_deps.mk
 
 ATREE_FILES :=
-include development/build/tools/sdk-preprocess-files.mk
 -include $(sdk_dep_file)
 
 # if we don't have a real list, then use "everything"