diff mbox

[libdrm,0/5] Yet another round of Android build cleanups

Message ID CAKc24n3HSgehn8Qq6gD=6eBz0jxsAowYa-kPnp1_WeBA+CtCVA@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chih-Wei Huang March 18, 2015, 4:38 p.m. UTC
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 ?

Comments

Emil Velikov March 19, 2015, 2:06 a.m. UTC | #1
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
>
Chih-Wei Huang March 19, 2015, 2:56 a.m. UTC | #2
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.
Chih-Wei Huang March 20, 2015, 6:34 a.m. UTC | #3
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.
Emil Velikov March 20, 2015, 5:32 p.m. UTC | #4
On 20/03/15 06:34, Chih-Wei Huang wrote:
> 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
diff mbox

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