Yet another round of Android build cleanups
cover Yet another round of Android build cleanups
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
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/5 android: correcly set LOCAL_EXPORT_C_INCLUDE_DIRS
- 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.
--- 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(-)
Android.mk +1 -1
@@ -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
freedreno/Android.mk +1 -2
@@ -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) \
intel/Android.mk +1 -2
@@ -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) \
libkms/Android.mk +2 -0
@@ -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
nouveau/Android.mk +1 -2
@@ -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) \
radeon/Android.mk +1 -2
@@ -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) \
Signature · 6 lines
2.1.3 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/5 android: simplify LOCAL_C_INCLUDES
In reply to Emil VelikovEach 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.
--- 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(-)
freedreno/Android.mk +1 -3
@@ -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
intel/Android.mk +0 -2
@@ -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 := \
libkms/Android.mk +0 -2
@@ -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)
nouveau/Android.mk +1 -3
@@ -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
radeon/Android.mk +1 -3
@@ -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
Signature · 6 lines
2.1.3 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/5 android: remove ${srcdir} from the includes
In reply to Emil VelikovAlready implicitly handled by the compiler.
--- freedreno/Android.mk | 3 --- intel/Android.mk | 1 - nouveau/Android.mk | 3 --- radeon/Android.mk | 3 --- 4 files changed, 10 deletions(-)
freedreno/Android.mk +0 -3
@@ -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
intel/Android.mk +0 -1
@@ -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 := \
nouveau/Android.mk +0 -3
@@ -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
radeon/Android.mk +0 -3
@@ -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
Signature · 6 lines
2.1.3 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm 3/5] android: remove ${srcdir} from the includes
2015年3月18日 上午7:30 於 "Emil Velikov" <[email protected]> 寫道:
Quoted 2 lines
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.
Quoted 65 lines
Signed-off-by Emil Velikov <[email protected]>--- freedreno/Android.mk | 3 --- intel/Android.mk | 1 - nouveau/Android.mk | 3 --- radeon/Android.mk | 3 --- 4 files changed, 10 deletions(-)freedreno/Android.mk +0
-3@@ -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=1intel/Android.mk +0
-1@@ -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 := \nouveau/Android.mk +0
-3@@ -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=1radeon/Android.mk +0
-4@@ -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
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm 3/5] android: remove ${srcdir} from the includes
Quoted 9 lines · Chih-Wei Huang
2015年3月18日 上午7:30 於 "Emil Velikov" <[email protected] <mailto:[email protected]>> 寫道:
Quoted 2 lines
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
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/5 android: remove LOCAL_COPY_HEADERS* variables
In reply to Emil VelikovWith earlier changes we've implicitly add the relevant directories to the includes list, via LOCAL_EXPORT_C_INCLUDES_DIRS.
--- 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(-)
freedreno/Android.mk +0 -3
@@ -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)
intel/Android.mk +0 -3
@@ -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
libkms/Android.mk +0 -3
@@ -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)
nouveau/Android.mk +0 -3
@@ -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)
radeon/Android.mk +0 -3
@@ -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)
Signature · 6 lines
2.1.3 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/5 android: add the missing tag "optional" to libkms
In reply to Emil Velikov--- libkms/Android.mk | 1 + 1 file changed, 1 insertion(+)
libkms/Android.mk +1 -0
@@ -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)
Signature · 6 lines
2.1.3 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
2015-03-18 7:30 GMT+08:00 Emil Velikov <[email protected]>:
Quoted 10 lines
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.
Quoted 8 lines
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?
_______________________________________________
dri-devel mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 17 lines · Chih-Wei Huang
2015-03-18 7:30 GMT+08:00 Emil Velikov <[email protected]>:
Quoted 16 lines
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,
Quoted 8 lines
Quoted 2 lines
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
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
2015-03-18 9:37 GMT+08:00 Emil Velikov <[email protected]>:
Quoted 8 lines · Chih-Wei Huang
Quoted 3 lines
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_TOPwithLOCAL_PATHwithin 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.
Quoted 1 line
Can you send a patch over ?
Signature · 3 lines
Chih-Wei Android-x86 project http://www.android-x86.org
From ade5c0b13db07303bd071bd076b275315414edb5 Mon Sep 17 00:00:00 2001
From: Chih-Wei Huang <[email protected]>
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.
--- Android.mk | 11 +---------- tests/Android.mk | 1 + 2 files changed, 2 insertions(+), 10 deletions(-) create mode 100644 tests/Android.mk
Android.mk +1 -10
@@ -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))
tests/Android.mk new file +1 -0
@@ -0,0 +1 @@ +include $(call all-subdir-makefiles)
Signature · 1 line
1.9.1
From 93f7cc2ced4c7fdad0f0485c87b5db12cd98eddd Mon Sep 17 00:00:00 2001
From: Chih-Wei Huang <[email protected]>
Date: Thu, 19 Mar 2015 00:26:59 +0800
Subject: [PATCH 2/2] android: get rid of LIBDRM_TOP
--- Android.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Android.mk +1 -3
@@ -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
Signature · 1 line
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Chih-Wei Huang
2015-03-18 9:37 GMT+08:00 Emil Velikov <[email protected]>:
Quoted 7 lines
Quoted 7 lines · Chih-Wei Huang
Quoted 3 lines
Quoted 3 lines
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_TOPwithLOCAL_PATHwithin the following.
Quoted 7 lines
Quoted 1 line
Quoted 1 line
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_TOPentirely.
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
Quoted 76 lines
0001-android-simplify-the-including-rule-of-subdirs.patch
From
ade5c0b13db07303bd071bd076b275315414edb5Mon Sep 17 00:00:00 2001
From: Chih-Wei Huang <[email protected]>
Date: Thu, 19 Mar 2015 00:17:33 +0800
Subject: [PATCH 1/2] android: simplify the including rule of subdirsUse android build system functions to include Android.mk of subdirs.
Signed-off-by Chih-Wei Huang <[email protected]>--- Android.mk | 11 +---------- tests/Android.mk | 1 + 2 files changed, 2 insertions(+), 10 deletions(-) create mode 100644 tests/Android.mkAndroid.mk +1
-10@@ -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))tests/Android.mk new file +1
-1@@ -0,0 +1 @@ +include $(call all-subdir-makefiles) -- 1.9.10002-android-get-rid-of-LIBDRM_TOP.patch
From
93f7cc2ced4c7fdad0f0485c87b5db12cd98edddMon Sep 17 00:00:00 2001
From: Chih-Wei Huang <[email protected]>
Date: Thu, 19 Mar 2015 00:26:59 +0800
Subject: [PATCH 2/2] android: get rid ofLIBDRM_TOPSigned-off-by Chih-Wei Huang <[email protected]>--- Android.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)Android.mk +0
-2@@ -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
Android.mk LOCAL_EXPORT_C_INCLUDE_DIRS := \
Quoted 9 lines
Android.mk +1
-2@@ -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
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
2015-03-19 10:06 GMT+08:00 Emil Velikov <[email protected]>:
Quoted 14 lines · Chih-Wei Huang
Quoted 13 lines
2015-03-18 9:37 GMT+08:00 Emil Velikov <[email protected]>:
Quoted 8 lines
Quoted 8 lines · Chih-Wei Huang
Quoted 3 lines
Quoted 3 lines
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_TOPwithLOCAL_PATHwithin 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.
Quoted 8 lines
Quoted 2 lines
0002-* removes
LIBDRM_TOPentirely.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 mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
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 <[email protected]>:
Quoted 28 lines
2015-03-19 10:06 GMT+08:00 Emil Velikov <[email protected]>:
Quoted 14 lines · Chih-Wei Huang
Quoted 13 lines
2015-03-18 9:37 GMT+08:00 Emil Velikov <[email protected]>:
Quoted 8 lines
Quoted 8 lines · Chih-Wei Huang
Quoted 3 lines
Quoted 3 lines
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_TOPwithLOCAL_PATHwithin 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.Quoted 8 lines
Quoted 2 lines
0002-* removes
LIBDRM_TOPentirely.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 commit88b60799)Personally I use it often.
Signature · 7 lines
Chih-Wei Android-x86 project http://www.android-x86.org _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 3 lines · Chih-Wei Huang
Is there any gating item to prevent
these patches (5+2) from being merged?
None in particular. I prefer to give it a day or two as people might want to comment, yet their mail queue does not allow them.
I've pushed them now. Thanks !
Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel