Hi all,
As pointed out by Chih-Wei, Android's LOCAL_COPY_HEADERS{,_TO} has been depreciated for quite some time.
Although it was a convenient way of getting things done (no more hard-coding the location of drm) it seems that there is another more appropriate (and cleaner) solution. Namely: Annotate the includes as "exported" and as the user selects the library for linking, the build will automatically add the includes.
Big thanks to Chih-Wei for the patience and persistence explaining the whole shebang. This series is mostly based on his patch in the Android-x86 tree, with some extra bits from your truly :-)
Chih-Wei,
I've tested this a few times already, although having someone with experience in the whole thing will be appreciated.
Cheers, Emil
- Don't add ${hw}/${hw}, but ${hw} to the includes path. The former does not exist. - Set the variable for libkms.
Inspired by the work of from Chih-Wei from the Android-x86 project.
Signed-off-by: Emil Velikov emil.l.velikov@gmail.com --- Android.mk | 2 +- freedreno/Android.mk | 3 +-- intel/Android.mk | 3 +-- libkms/Android.mk | 2 ++ nouveau/Android.mk | 3 +-- radeon/Android.mk | 3 +-- 6 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/Android.mk b/Android.mk index 6f76113..e6d85d4 100644 --- a/Android.mk +++ b/Android.mk @@ -33,7 +33,7 @@ LOCAL_MODULE := libdrm LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(LIBDRM_FILES) -LOCAL_EXPORT_C_INCLUDE_DIRS += \ +LOCAL_EXPORT_C_INCLUDE_DIRS := \ $(LOCAL_PATH) \ $(LOCAL_PATH)/include/drm
diff --git a/freedreno/Android.mk b/freedreno/Android.mk index 22520fb..31b90ef 100644 --- a/freedreno/Android.mk +++ b/freedreno/Android.mk @@ -10,8 +10,7 @@ LOCAL_MODULE_TAGS := optional LOCAL_SHARED_LIBRARIES := libdrm
LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES) -LOCAL_EXPORT_C_INCLUDE_DIRS += \ - $(LOCAL_PATH)/freedreno +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \ $(LIBDRM_TOP) \ diff --git a/intel/Android.mk b/intel/Android.mk index 202c0d5..2a6bf60 100644 --- a/intel/Android.mk +++ b/intel/Android.mk @@ -31,8 +31,7 @@ LOCAL_MODULE := libdrm_intel LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES) -LOCAL_EXPORT_C_INCLUDE_DIRS += \ - $(LOCAL_PATH)/intel +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \ $(LIBDRM_TOP) \ diff --git a/libkms/Android.mk b/libkms/Android.mk index d2df32a..4d41fbc 100644 --- a/libkms/Android.mk +++ b/libkms/Android.mk @@ -45,6 +45,8 @@ endif LOCAL_MODULE := libkms LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) + LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libdrm
LOCAL_COPY_HEADERS_TO := libdrm diff --git a/nouveau/Android.mk b/nouveau/Android.mk index 93c9ec2..8e42c40 100644 --- a/nouveau/Android.mk +++ b/nouveau/Android.mk @@ -10,8 +10,7 @@ LOCAL_MODULE_TAGS := optional LOCAL_SHARED_LIBRARIES := libdrm
LOCAL_SRC_FILES := $(LIBDRM_NOUVEAU_FILES) -LOCAL_EXPORT_C_INCLUDE_DIRS += \ - $(LOCAL_PATH)/nouveau +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \ $(LIBDRM_TOP) \ diff --git a/radeon/Android.mk b/radeon/Android.mk index 71c58bd..b4065aa 100644 --- a/radeon/Android.mk +++ b/radeon/Android.mk @@ -10,8 +10,7 @@ LOCAL_MODULE_TAGS := optional LOCAL_SHARED_LIBRARIES := libdrm
LOCAL_SRC_FILES := $(LIBDRM_RADEON_FILES) -LOCAL_EXPORT_C_INCLUDE_DIRS += \ - $(LOCAL_PATH)/radeon +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \ $(LIBDRM_TOP) \
Each of the libdrm_${hw} modules pull libdrm for linking as such:
libdrm's LOCAL_EXPORT_C_INCLUDE_DIRS are added to the includes list. The former of which is already set to ${top} and ${top}/include/drm.
Signed-off-by: Emil Velikov emil.l.velikov@gmail.com --- freedreno/Android.mk | 4 +--- intel/Android.mk | 2 -- libkms/Android.mk | 2 -- nouveau/Android.mk | 4 +--- radeon/Android.mk | 4 +--- 5 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/freedreno/Android.mk b/freedreno/Android.mk index 31b90ef..d6c19fe 100644 --- a/freedreno/Android.mk +++ b/freedreno/Android.mk @@ -13,9 +13,7 @@ LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \ - $(LIBDRM_TOP) \ - $(LIBDRM_TOP)/freedreno \ - $(LIBDRM_TOP)/include/drm + $(LIBDRM_TOP)/freedreno
LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 diff --git a/intel/Android.mk b/intel/Android.mk index 2a6bf60..8a30fb5 100644 --- a/intel/Android.mk +++ b/intel/Android.mk @@ -34,9 +34,7 @@ LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \ - $(LIBDRM_TOP) \ $(LIBDRM_TOP)/intel \ - $(LIBDRM_TOP)/include/drm \ external/libpciaccess/include
LOCAL_CFLAGS := \ diff --git a/libkms/Android.mk b/libkms/Android.mk index 4d41fbc..3c400de 100644 --- a/libkms/Android.mk +++ b/libkms/Android.mk @@ -47,8 +47,6 @@ LOCAL_SHARED_LIBRARIES := libdrm
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
-LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libdrm - LOCAL_COPY_HEADERS_TO := libdrm LOCAL_COPY_HEADERS := $(LIBKMS_H_FILES)
diff --git a/nouveau/Android.mk b/nouveau/Android.mk index 8e42c40..6c46f6c 100644 --- a/nouveau/Android.mk +++ b/nouveau/Android.mk @@ -13,9 +13,7 @@ LOCAL_SRC_FILES := $(LIBDRM_NOUVEAU_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \ - $(LIBDRM_TOP) \ - $(LIBDRM_TOP)/nouveau \ - $(LIBDRM_TOP)/include/drm + $(LIBDRM_TOP)/nouveau
LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 diff --git a/radeon/Android.mk b/radeon/Android.mk index b4065aa..d9192b6 100644 --- a/radeon/Android.mk +++ b/radeon/Android.mk @@ -13,9 +13,7 @@ LOCAL_SRC_FILES := $(LIBDRM_RADEON_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \ - $(LIBDRM_TOP) \ - $(LIBDRM_TOP)/radeon \ - $(LIBDRM_TOP)/include/drm + $(LIBDRM_TOP)/radeon
LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
Already implicitly handled by the compiler.
Signed-off-by: Emil Velikov emil.l.velikov@gmail.com --- freedreno/Android.mk | 3 --- intel/Android.mk | 1 - nouveau/Android.mk | 3 --- radeon/Android.mk | 3 --- 4 files changed, 10 deletions(-)
diff --git a/freedreno/Android.mk b/freedreno/Android.mk index d6c19fe..9031d61 100644 --- a/freedreno/Android.mk +++ b/freedreno/Android.mk @@ -12,9 +12,6 @@ LOCAL_SHARED_LIBRARIES := libdrm LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
-LOCAL_C_INCLUDES := \ - $(LIBDRM_TOP)/freedreno - LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
diff --git a/intel/Android.mk b/intel/Android.mk index 8a30fb5..7397110 100644 --- a/intel/Android.mk +++ b/intel/Android.mk @@ -34,7 +34,6 @@ LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \ - $(LIBDRM_TOP)/intel \ external/libpciaccess/include
LOCAL_CFLAGS := \ diff --git a/nouveau/Android.mk b/nouveau/Android.mk index 6c46f6c..5bc325c 100644 --- a/nouveau/Android.mk +++ b/nouveau/Android.mk @@ -12,9 +12,6 @@ LOCAL_SHARED_LIBRARIES := libdrm LOCAL_SRC_FILES := $(LIBDRM_NOUVEAU_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
-LOCAL_C_INCLUDES := \ - $(LIBDRM_TOP)/nouveau - LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
diff --git a/radeon/Android.mk b/radeon/Android.mk index d9192b6..f12e631 100644 --- a/radeon/Android.mk +++ b/radeon/Android.mk @@ -12,9 +12,6 @@ LOCAL_SHARED_LIBRARIES := libdrm LOCAL_SRC_FILES := $(LIBDRM_RADEON_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
-LOCAL_C_INCLUDES := \ - $(LIBDRM_TOP)/radeon - LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
2015年3月18日 上午7:30 於 "Emil Velikov" emil.l.velikov@gmail.com 寫道:
Already implicitly handled by the compiler.
Actually it's not handled by the compiler, but by the Android build system. It automatically adds $(LOCAL_PATH), $(intermediate), ... to the include paths.
Signed-off-by: Emil Velikov emil.l.velikov@gmail.com
freedreno/Android.mk | 3 --- intel/Android.mk | 1 - nouveau/Android.mk | 3 --- radeon/Android.mk | 3 --- 4 files changed, 10 deletions(-)
diff --git a/freedreno/Android.mk b/freedreno/Android.mk index d6c19fe..9031d61 100644 --- a/freedreno/Android.mk +++ b/freedreno/Android.mk @@ -12,9 +12,6 @@ LOCAL_SHARED_LIBRARIES := libdrm LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
-LOCAL_C_INCLUDES := \
$(LIBDRM_TOP)/freedreno
LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
diff --git a/intel/Android.mk b/intel/Android.mk index 8a30fb5..7397110 100644 --- a/intel/Android.mk +++ b/intel/Android.mk @@ -34,7 +34,6 @@ LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
LOCAL_C_INCLUDES := \
$(LIBDRM_TOP)/intel \ external/libpciaccess/include
LOCAL_CFLAGS := \ diff --git a/nouveau/Android.mk b/nouveau/Android.mk index 6c46f6c..5bc325c 100644 --- a/nouveau/Android.mk +++ b/nouveau/Android.mk @@ -12,9 +12,6 @@ LOCAL_SHARED_LIBRARIES := libdrm LOCAL_SRC_FILES := $(LIBDRM_NOUVEAU_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
-LOCAL_C_INCLUDES := \
$(LIBDRM_TOP)/nouveau
LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
diff --git a/radeon/Android.mk b/radeon/Android.mk index d9192b6..f12e631 100644 --- a/radeon/Android.mk +++ b/radeon/Android.mk @@ -12,9 +12,6 @@ LOCAL_SHARED_LIBRARIES := libdrm LOCAL_SRC_FILES := $(LIBDRM_RADEON_FILES) LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
-LOCAL_C_INCLUDES := \
$(LIBDRM_TOP)/radeon
LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
-- 2.1.3
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
On 18/03/15 01:49, Chih-Wei Huang wrote:
2015年3月18日 上午7:30 於 "Emil Velikov" <emil.l.velikov@gmail.com mailto:emil.l.velikov@gmail.com> 寫道:
Already implicitly handled by the compiler.
Actually it's not handled by the compiler, but by the Android build system. It automatically adds $(LOCAL_PATH), $(intermediate), ... to the include paths.
Indeed. Same goes for the Automake build. Unless there are bigger fish to fry, will update it before pushing.
Thanks for spotting this thinko. Emil
With earlier changes we've implicitly add the relevant directories to the includes list, via LOCAL_EXPORT_C_INCLUDES_DIRS.
Signed-off-by: Emil Velikov emil.l.velikov@gmail.com --- freedreno/Android.mk | 3 --- intel/Android.mk | 3 --- libkms/Android.mk | 3 --- nouveau/Android.mk | 3 --- radeon/Android.mk | 3 --- 5 files changed, 15 deletions(-)
diff --git a/freedreno/Android.mk b/freedreno/Android.mk index 9031d61..2645f73 100644 --- a/freedreno/Android.mk +++ b/freedreno/Android.mk @@ -15,7 +15,4 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
-LOCAL_COPY_HEADERS := $(LIBDRM_FREEDRENO_H_FILES) -LOCAL_COPY_HEADERS_TO := freedreno - include $(BUILD_SHARED_LIBRARY) diff --git a/intel/Android.mk b/intel/Android.mk index 7397110..0f498ec 100644 --- a/intel/Android.mk +++ b/intel/Android.mk @@ -39,9 +39,6 @@ LOCAL_C_INCLUDES := \ LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
-LOCAL_COPY_HEADERS := $(LIBDRM_INTEL_H_FILES) -LOCAL_COPY_HEADERS_TO := libdrm - LOCAL_SHARED_LIBRARIES := \ libdrm \ libpciaccess diff --git a/libkms/Android.mk b/libkms/Android.mk index 3c400de..12cf844 100644 --- a/libkms/Android.mk +++ b/libkms/Android.mk @@ -47,7 +47,4 @@ LOCAL_SHARED_LIBRARIES := libdrm
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
-LOCAL_COPY_HEADERS_TO := libdrm -LOCAL_COPY_HEADERS := $(LIBKMS_H_FILES) - include $(BUILD_SHARED_LIBRARY) diff --git a/nouveau/Android.mk b/nouveau/Android.mk index 5bc325c..abc6aef 100644 --- a/nouveau/Android.mk +++ b/nouveau/Android.mk @@ -15,7 +15,4 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
-LOCAL_COPY_HEADERS := $(LIBDRM_NOUVEAU_H_FILES) -LOCAL_COPY_HEADERS_TO := libdrm - include $(BUILD_SHARED_LIBRARY) diff --git a/radeon/Android.mk b/radeon/Android.mk index f12e631..ace3408 100644 --- a/radeon/Android.mk +++ b/radeon/Android.mk @@ -15,7 +15,4 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
-LOCAL_COPY_HEADERS := $(LIBDRM_RADEON_H_FILES) -LOCAL_COPY_HEADERS_TO := libdrm - include $(BUILD_SHARED_LIBRARY)
Signed-off-by: Emil Velikov emil.l.velikov@gmail.com --- libkms/Android.mk | 1 + 1 file changed, 1 insertion(+)
diff --git a/libkms/Android.mk b/libkms/Android.mk index 12cf844..4f5e3d2 100644 --- a/libkms/Android.mk +++ b/libkms/Android.mk @@ -43,6 +43,7 @@ LOCAL_SRC_FILES += $(LIBKMS_RADEON_FILES) endif
LOCAL_MODULE := libkms +LOCAL_MODULE_TAGS := optional LOCAL_SHARED_LIBRARIES := libdrm
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
2015-03-18 7:30 GMT+08:00 Emil Velikov emil.l.velikov@gmail.com:
As pointed out by Chih-Wei, Android's LOCAL_COPY_HEADERS{,_TO} has been depreciated for quite some time.
Although it was a convenient way of getting things done (no more hard-coding the location of drm) it seems that there is another more appropriate (and cleaner) solution. Namely: Annotate the includes as "exported" and as the user selects the library for linking, the build will automatically add the includes.
Big thanks to Chih-Wei for the patience and persistence explaining the whole shebang. This series is mostly based on his patch in the Android-x86 tree, with some extra bits from your truly :-)
Chih-Wei,
I've tested this a few times already, although having someone with experience in the whole thing will be appreciated.
Thank you for the effort to clean it up. The patches looks good to me.
I would suggest to remove all the use of LIBDRM_TOP. Do you want me to submit a patch?
On 18 March 2015 at 01:19, Chih-Wei Huang cwhuang@android-x86.org wrote:
2015-03-18 7:30 GMT+08:00 Emil Velikov emil.l.velikov@gmail.com:
As pointed out by Chih-Wei, Android's LOCAL_COPY_HEADERS{,_TO} has been depreciated for quite some time.
Although it was a convenient way of getting things done (no more hard-coding the location of drm) it seems that there is another more appropriate (and cleaner) solution. Namely: Annotate the includes as "exported" and as the user selects the library for linking, the build will automatically add the includes.
Big thanks to Chih-Wei for the patience and persistence explaining the whole shebang. This series is mostly based on his patch in the Android-x86 tree, with some extra bits from your truly :-)
Chih-Wei,
I've tested this a few times already, although having someone with experience in the whole thing will be appreciated.
Thank you for the effort to clean it up. The patches looks good to me.
I would suggest to remove all the use of LIBDRM_TOP. Do you want me to submit a patch?
Hmm I'm not sure that things will work correctly if we directly substitute LIBDRM_TOP with LOCAL_PATH within the following.
mkfiles := $(patsubst %,$(LIBDRM_TOP)/%/Android.mk,$(SUBDIRS))
Can you send a patch over ?
Thanks Emil
2015-03-18 9:37 GMT+08:00 Emil Velikov emil.l.velikov@gmail.com:
On 18 March 2015 at 01:19, Chih-Wei Huang cwhuang@android-x86.org wrote:
I would suggest to remove all the use of LIBDRM_TOP. Do you want me to submit a patch?
Hmm I'm not sure that things will work correctly if we directly substitute LIBDRM_TOP with LOCAL_PATH within the following.
mkfiles := $(patsubst %,$(LIBDRM_TOP)/%/Android.mk,$(SUBDIRS))
Sure. It works. But I prefer to simplify it by android build system built-in functions. See the attached 0001-* patch.
0002-* removes LIBDRM_TOP entirely.
Can you send a patch over ?
On 18/03/15 16:38, Chih-Wei Huang wrote:
2015-03-18 9:37 GMT+08:00 Emil Velikov emil.l.velikov@gmail.com:
On 18 March 2015 at 01:19, Chih-Wei Huang cwhuang@android-x86.org wrote:
I would suggest to remove all the use of LIBDRM_TOP. Do you want me to submit a patch?
Hmm I'm not sure that things will work correctly if we directly substitute LIBDRM_TOP with LOCAL_PATH within the following.
mkfiles := $(patsubst %,$(LIBDRM_TOP)/%/Android.mk,$(SUBDIRS))
Sure. It works. But I prefer to simplify it by android build system built-in functions. See the attached 0001-* patch.
0002-* removes LIBDRM_TOP entirely.
I realise that most people aren't too exited about Android, but for the future please try to use git send-email when sending patches to dri-devel or mesa-dev. I've included them below for posterity.
Patches look good imho. Just one question - when was the all-makefiles-under macro introduced ? I haven't seen it used too often.
Thanks, Emil
0001-android-simplify-the-including-rule-of-subdirs.patch
From ade5c0b13db07303bd071bd076b275315414edb5 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang cwhuang@linux.org.tw Date: Thu, 19 Mar 2015 00:17:33 +0800 Subject: [PATCH 1/2] android: simplify the including rule of subdirs
Use android build system functions to include Android.mk of subdirs.
Signed-off-by: Chih-Wei Huang cwhuang@linux.org.tw
Android.mk | 11 +---------- tests/Android.mk | 1 + 2 files changed, 2 insertions(+), 10 deletions(-) create mode 100644 tests/Android.mk
diff --git a/Android.mk b/Android.mk index 0c78fc4..bad4fe1 100644 --- a/Android.mk +++ b/Android.mk @@ -45,13 +45,4 @@ LOCAL_CFLAGS := \
include $(BUILD_SHARED_LIBRARY)
-SUBDIRS := \
- freedreno \
- intel \
- nouveau \
- radeon \
- libkms \
- tests/modetest
-mkfiles := $(patsubst %,$(LIBDRM_TOP)/%/Android.mk,$(SUBDIRS)) -include $(mkfiles) +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/Android.mk b/tests/Android.mk new file mode 100644 index 0000000..5053e7d --- /dev/null +++ b/tests/Android.mk @@ -0,0 +1 @@ +include $(call all-subdir-makefiles) -- 1.9.1
0002-android-get-rid-of-LIBDRM_TOP.patch
From 93f7cc2ced4c7fdad0f0485c87b5db12cd98eddd Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang cwhuang@linux.org.tw Date: Thu, 19 Mar 2015 00:26:59 +0800 Subject: [PATCH 2/2] android: get rid of LIBDRM_TOP
Signed-off-by: Chih-Wei Huang cwhuang@linux.org.tw
Android.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Android.mk b/Android.mk index bad4fe1..7038c3c 100644 --- a/Android.mk +++ b/Android.mk @@ -24,8 +24,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS)
-LIBDRM_TOP := $(LOCAL_PATH)
# Import variables LIBDRM_{,H_,INCLUDE_H_,INCLUDE_VMWGFX_H_}FILES include $(LOCAL_PATH)/Makefile.sources
@@ -38,7 +36,7 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \ $(LOCAL_PATH)/include/drm
LOCAL_C_INCLUDES := \
- $(LIBDRM_TOP)/include/drm
- $(LOCAL_PATH)/include/drm
LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 -- 1.9.1
2015-03-19 10:06 GMT+08:00 Emil Velikov emil.l.velikov@gmail.com:
On 18/03/15 16:38, Chih-Wei Huang wrote:
2015-03-18 9:37 GMT+08:00 Emil Velikov emil.l.velikov@gmail.com:
On 18 March 2015 at 01:19, Chih-Wei Huang cwhuang@android-x86.org wrote:
I would suggest to remove all the use of LIBDRM_TOP. Do you want me to submit a patch?
Hmm I'm not sure that things will work correctly if we directly substitute LIBDRM_TOP with LOCAL_PATH within the following.
mkfiles := $(patsubst %,$(LIBDRM_TOP)/%/Android.mk,$(SUBDIRS))
Sure. It works. But I prefer to simplify it by android build system built-in functions. See the attached 0001-* patch.
0002-* removes LIBDRM_TOP entirely.
I realise that most people aren't too exited about Android, but for the future please try to use git send-email when sending patches to dri-devel or mesa-dev. I've included them below for posterity.
Patches look good imho. Just one question - when was the all-makefiles-under macro introduced ? I haven't seen it used too often.
It's introduced since very early day of android. (git blame shows it's in commit 88b60799)
Personally I use it often.
Is there any gating item to prevent these patches (5+2) from being merged?
2015-03-19 10:56 GMT+08:00 Chih-Wei Huang cwhuang@android-x86.org:
2015-03-19 10:06 GMT+08:00 Emil Velikov emil.l.velikov@gmail.com:
On 18/03/15 16:38, Chih-Wei Huang wrote:
2015-03-18 9:37 GMT+08:00 Emil Velikov emil.l.velikov@gmail.com:
On 18 March 2015 at 01:19, Chih-Wei Huang cwhuang@android-x86.org wrote:
> > I would suggest to remove all the use of LIBDRM_TOP. > Do you want me to submit a patch?
Hmm I'm not sure that things will work correctly if we directly substitute LIBDRM_TOP with LOCAL_PATH within the following.
mkfiles := $(patsubst %,$(LIBDRM_TOP)/%/Android.mk,$(SUBDIRS))
Sure. It works. But I prefer to simplify it by android build system built-in functions. See the attached 0001-* patch.
0002-* removes LIBDRM_TOP entirely.
I realise that most people aren't too exited about Android, but for the future please try to use git send-email when sending patches to dri-devel or mesa-dev. I've included them below for posterity.
Patches look good imho. Just one question - when was the all-makefiles-under macro introduced ? I haven't seen it used too often.
It's introduced since very early day of android. (git blame shows it's in commit 88b60799)
Personally I use it often.
dri-devel@lists.freedesktop.org