support: Add support_install_rootsbindir

Message ID 20190514102138.23239-1-ahajkova@redhat.com
State Committed
Headers

Commit Message

Alexandra Hájková May 14, 2019, 10:21 a.m. UTC
  From: Alexandra Hájková <ahajkova@redhat.com>

---
 support/Makefile        | 3 ++-
 support/support.h       | 2 ++
 support/support_paths.c | 6 ++++++
 3 files changed, 10 insertions(+), 1 deletion(-)
  

Comments

Adhemerval Zanella Netto May 14, 2019, 2:06 p.m. UTC | #1
On 14/05/2019 07:21, Alexandra Hájková wrote:
> From: Alexandra Hájková <ahajkova@redhat.com>

LGTM with following nit below.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> 
> ---
>  support/Makefile        | 3 ++-
>  support/support.h       | 2 ++
>  support/support_paths.c | 6 ++++++
>  3 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/support/Makefile b/support/Makefile
> index 64044f6f5c..3ed607a79b 100644
> --- a/support/Makefile
> +++ b/support/Makefile
> @@ -179,7 +179,8 @@ CFLAGS-support_paths.c = \
>  		-DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \
>  		-DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \
>  		-DINSTDIR_PATH=\"$(prefix)\" \
> -		-DLIBDIR_PATH=\"$(libdir)\"
> +		-DLIBDIR_PATH=\"$(libdir)\" \
> +		-DROOTSBINDIR_PATH=\"$(rootsbindir)\"

Ok.

>  
>  ifeq (,$(CXX))
>  LINKS_DSO_PROGRAM = links-dso-program-c
> diff --git a/support/support.h b/support/support.h
> index 97fef2cd23..c5297a642d 100644
> --- a/support/support.h
> +++ b/support/support.h
> @@ -106,6 +106,8 @@ extern const char support_install_prefix[];
>  /* Corresponds to the install's lib/ or lib64/ directory.  */
>  extern const char support_libdir_prefix[];
>  
> +extern const char support_install_rootsbindir[];
> +

Add a comment as for other variables.

>  extern ssize_t support_copy_file_range (int, off64_t *, int, off64_t *,
>  					size_t, unsigned int);
>  
> diff --git a/support/support_paths.c b/support/support_paths.c
> index 937e6e1012..c54be4faf6 100644
> --- a/support/support_paths.c
> +++ b/support/support_paths.c
> @@ -57,3 +57,9 @@ const char support_libdir_prefix[] = LIBDIR_PATH;
>  #else
>  # error please -DLIBDIR_PATH=something in the Makefile
>  #endif
> +
> +#ifdef ROOTSBINDIR_PATH
> +const char support_install_rootsbindir[] = ROOTSBINDIR_PATH;
> +#else
> +# error please -DROOTSBINDIR_PATH=something in the Makefile
> +#endif
> 

Ok.
  

Patch

diff --git a/support/Makefile b/support/Makefile
index 64044f6f5c..3ed607a79b 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -179,7 +179,8 @@  CFLAGS-support_paths.c = \
 		-DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \
 		-DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \
 		-DINSTDIR_PATH=\"$(prefix)\" \
-		-DLIBDIR_PATH=\"$(libdir)\"
+		-DLIBDIR_PATH=\"$(libdir)\" \
+		-DROOTSBINDIR_PATH=\"$(rootsbindir)\"
 
 ifeq (,$(CXX))
 LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/support/support.h b/support/support.h
index 97fef2cd23..c5297a642d 100644
--- a/support/support.h
+++ b/support/support.h
@@ -106,6 +106,8 @@  extern const char support_install_prefix[];
 /* Corresponds to the install's lib/ or lib64/ directory.  */
 extern const char support_libdir_prefix[];
 
+extern const char support_install_rootsbindir[];
+
 extern ssize_t support_copy_file_range (int, off64_t *, int, off64_t *,
 					size_t, unsigned int);
 
diff --git a/support/support_paths.c b/support/support_paths.c
index 937e6e1012..c54be4faf6 100644
--- a/support/support_paths.c
+++ b/support/support_paths.c
@@ -57,3 +57,9 @@  const char support_libdir_prefix[] = LIBDIR_PATH;
 #else
 # error please -DLIBDIR_PATH=something in the Makefile
 #endif
+
+#ifdef ROOTSBINDIR_PATH
+const char support_install_rootsbindir[] = ROOTSBINDIR_PATH;
+#else
+# error please -DROOTSBINDIR_PATH=something in the Makefile
+#endif