Mesa (main): Android.mk: Generate the dummy source in local-generated-sources-dir

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jun 26 22:07:16 UTC 2022


Module: Mesa
Branch: main
Commit: 5feb025086382b81473ba4e3e2db35beacaaf8c9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5feb025086382b81473ba4e3e2db35beacaaf8c9

Author: Alessandro Astone <ales.astone at gmail.com>
Date:   Sat Jun 18 18:16:09 2022 +0200

Android.mk: Generate the dummy source in local-generated-sources-dir

A source file cannot be otherwise referenced by absolute path.
That happens when OUT_DIR_COMMON_BASE is set.

Reviewed-by: Roman Stratiienko <r.stratiienko at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16674>

---

 android/mesa3d_cross.mk | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/android/mesa3d_cross.mk b/android/mesa3d_cross.mk
index 92bb2b28103..3a71f83c53b 100644
--- a/android/mesa3d_cross.mk
+++ b/android/mesa3d_cross.mk
@@ -32,15 +32,16 @@ MY_PATH := $(call my-dir)
 
 AOSP_ABSOLUTE_PATH := $(realpath .)
 
-m_dummy_$(LOCAL_MULTILIB) := $(TARGET_OUT_INTERMEDIATES)/MESON_DUMMY_$(LOCAL_MULTILIB)/dummy.c
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE := meson.dummy.$(LOCAL_MULTILIB)
 
-$(m_dummy_$(LOCAL_MULTILIB)):
+m_dummy := $(local-generated-sources-dir)/dummy.c
+$(m_dummy):
 	mkdir -p $(dir $@)
 	touch $@
 
-LOCAL_SRC_FILES := $(call relative_top_path,$(MY_PATH))$(m_dummy_$(LOCAL_MULTILIB))
+LOCAL_GENERATED_SOURCES := $(m_dummy)
 LOCAL_VENDOR_MODULE := true
-LOCAL_MODULE := meson.dummy.$(LOCAL_MULTILIB)
 
 # Prepare intermediate variables by AOSP make/core internals
 include $(BUILD_SHARED_LIBRARY)



More information about the mesa-commit mailing list