All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CodeSamples/Makefile: Add conditional for liburcu on Ubuntu Bionic
@ 2018-10-03 14:52 Akira Yokosawa
  2018-10-04  3:32 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Akira Yokosawa @ 2018-10-03 14:52 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 91e27d8066e353966b4c35de15f70e278fbcb8ce Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Wed, 3 Oct 2018 23:29:29 +0900
Subject: [PATCH] CodeSamples/Makefile: Add conditional for liburcu on Ubuntu Bionic

On Ubuntu Bionic, header files of liburcu-dev are installed under
an arch dependent directory such as /usr/include/x86_64-linux-gnu/.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 CodeSamples/Makefile   | 4 +++-
 CodeSamples/depends.mk | 7 +++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/CodeSamples/Makefile b/CodeSamples/Makefile
index 036fc66..3a96f5c 100644
--- a/CodeSamples/Makefile
+++ b/CodeSamples/Makefile
@@ -39,7 +39,9 @@ endif
 	echo "" >> api.h
 	cat api-pthreads/api-gcc.h >> api.h
 	echo "" >> api.h
-	if test -f /usr/include/urcu-call-rcu.h -o -f /usr/local/include/urcu-call-rcu.h ; \
+	if test -f /usr/include/urcu-call-rcu.h -o \
+		-f /usr/local/include/urcu-call-rcu.h -o \
+		-f /usr/include/$(subdir_ub)/urcu-call-rcu.h ; \
 	then \
 		echo "#define _LGPL_SOURCE" >> api.h; \
 		echo "#include <urcu/rculist.h>" >> api.h; \
diff --git a/CodeSamples/depends.mk b/CodeSamples/depends.mk
index 77a76bf..31a8daf 100644
--- a/CodeSamples/depends.mk
+++ b/CodeSamples/depends.mk
@@ -4,18 +4,25 @@ endif
 
 ifeq ($(arch),i686)
 target := x86
+subdir_ub := i386-linux-gnu
 else ifeq ($(arch),x86_64)
 target := x86
+subdir_ub := x86_64-linux-gnu
 else ifeq ($(arch),ppc64)
 target := ppc64
+subdir_ub :=
 else ifeq ($(arch),ppc64le)
 target := ppc64
+subdir_ub := powerpc64le-linux-gnu
 else ifeq ($(arch),aarch64)
 target := arm64
+subdir_ub := aarch64-linux-gnu
 else ifneq (,$(findstring arm,$(arch)))
 target := arm
+subdir_ub := arm-linux-gnueabihf
 else
 target :=
+subdir_ub :=
 endif
 
 api_depend_common := $(top)/linux/common.h \
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] CodeSamples/Makefile: Add conditional for liburcu on Ubuntu Bionic
  2018-10-03 14:52 [PATCH] CodeSamples/Makefile: Add conditional for liburcu on Ubuntu Bionic Akira Yokosawa
@ 2018-10-04  3:32 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2018-10-04  3:32 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Wed, Oct 03, 2018 at 11:52:54PM +0900, Akira Yokosawa wrote:
> >From 91e27d8066e353966b4c35de15f70e278fbcb8ce Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Wed, 3 Oct 2018 23:29:29 +0900
> Subject: [PATCH] CodeSamples/Makefile: Add conditional for liburcu on Ubuntu Bionic
> 
> On Ubuntu Bionic, header files of liburcu-dev are installed under
> an arch dependent directory such as /usr/include/x86_64-linux-gnu/.
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>

Applied and pushed, thank you!

							Thanx, Paul

> ---
>  CodeSamples/Makefile   | 4 +++-
>  CodeSamples/depends.mk | 7 +++++++
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/CodeSamples/Makefile b/CodeSamples/Makefile
> index 036fc66..3a96f5c 100644
> --- a/CodeSamples/Makefile
> +++ b/CodeSamples/Makefile
> @@ -39,7 +39,9 @@ endif
>  	echo "" >> api.h
>  	cat api-pthreads/api-gcc.h >> api.h
>  	echo "" >> api.h
> -	if test -f /usr/include/urcu-call-rcu.h -o -f /usr/local/include/urcu-call-rcu.h ; \
> +	if test -f /usr/include/urcu-call-rcu.h -o \
> +		-f /usr/local/include/urcu-call-rcu.h -o \
> +		-f /usr/include/$(subdir_ub)/urcu-call-rcu.h ; \
>  	then \
>  		echo "#define _LGPL_SOURCE" >> api.h; \
>  		echo "#include <urcu/rculist.h>" >> api.h; \
> diff --git a/CodeSamples/depends.mk b/CodeSamples/depends.mk
> index 77a76bf..31a8daf 100644
> --- a/CodeSamples/depends.mk
> +++ b/CodeSamples/depends.mk
> @@ -4,18 +4,25 @@ endif
>  
>  ifeq ($(arch),i686)
>  target := x86
> +subdir_ub := i386-linux-gnu
>  else ifeq ($(arch),x86_64)
>  target := x86
> +subdir_ub := x86_64-linux-gnu
>  else ifeq ($(arch),ppc64)
>  target := ppc64
> +subdir_ub :=
>  else ifeq ($(arch),ppc64le)
>  target := ppc64
> +subdir_ub := powerpc64le-linux-gnu
>  else ifeq ($(arch),aarch64)
>  target := arm64
> +subdir_ub := aarch64-linux-gnu
>  else ifneq (,$(findstring arm,$(arch)))
>  target := arm
> +subdir_ub := arm-linux-gnueabihf
>  else
>  target :=
> +subdir_ub :=
>  endif
>  
>  api_depend_common := $(top)/linux/common.h \
> -- 
> 2.7.4
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-04 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-03 14:52 [PATCH] CodeSamples/Makefile: Add conditional for liburcu on Ubuntu Bionic Akira Yokosawa
2018-10-04  3:32 ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.