gprofng: avoid use of non-portable which [PR32166]

Message ID 7fcc71c9d5c6cbac316b5ad77483a5a280163389.1726088623.git.sam@gentoo.org
State New
Headers
Series gprofng: avoid use of non-portable which [PR32166] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Sam James Sept. 11, 2024, 9:03 p.m. UTC
  gprofng/ChangeLog
	PR gprofng/32166
	* testsuite/lib/Makefile.skel (JAVABIN): Replace use of which.
---
 gprofng/testsuite/lib/Makefile.skel | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: ad0751b6ecf40cb94ecb693d1acfc38fd223f408
  

Comments

Vladimir Mezentsev Sept. 12, 2024, 7:15 p.m. UTC | #1
LGTM.

Thank you for improving gprofng.

-Vladimir

On 9/11/24 14:03, Sam James wrote:
> gprofng/ChangeLog
> 	PR gprofng/32166
> 	* testsuite/lib/Makefile.skel (JAVABIN): Replace use of which.
> ---
>   gprofng/testsuite/lib/Makefile.skel | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gprofng/testsuite/lib/Makefile.skel b/gprofng/testsuite/lib/Makefile.skel
> index 8ea994d2e59..2c98720c4c4 100644
> --- a/gprofng/testsuite/lib/Makefile.skel
> +++ b/gprofng/testsuite/lib/Makefile.skel
> @@ -23,7 +23,7 @@ CFLAGS      = -g -Wall
>   SHAREDOPT	= -fpic	-shared
>   
>   #JAVABIN = /usr/java/latest/bin
> -JAVABIN = $(shell dirname `which java`)
> +JAVABIN = $(shell dirname `command -v java`)
>   JAVA    = $(JAVABIN)/java
>   JAVAC   = $(JAVABIN)/javac
>   
>
> base-commit: ad0751b6ecf40cb94ecb693d1acfc38fd223f408
  
Sam James Sept. 12, 2024, 9:55 p.m. UTC | #2
Vladimir Mezentsev <vladimir.mezentsev@oracle.com> writes:

> LGTM.
>
> Thank you for improving gprofng.

Thank you Vladimir! Pushed.

>
> -Vladimir
>
> On 9/11/24 14:03, Sam James wrote:
>> gprofng/ChangeLog
>> 	PR gprofng/32166
>> 	* testsuite/lib/Makefile.skel (JAVABIN): Replace use of which.
>> ---
>>   gprofng/testsuite/lib/Makefile.skel | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gprofng/testsuite/lib/Makefile.skel b/gprofng/testsuite/lib/Makefile.skel
>> index 8ea994d2e59..2c98720c4c4 100644
>> --- a/gprofng/testsuite/lib/Makefile.skel
>> +++ b/gprofng/testsuite/lib/Makefile.skel
>> @@ -23,7 +23,7 @@ CFLAGS      = -g -Wall
>>   SHAREDOPT	= -fpic	-shared
>>     #JAVABIN = /usr/java/latest/bin
>> -JAVABIN = $(shell dirname `which java`)
>> +JAVABIN = $(shell dirname `command -v java`)
>>   JAVA    = $(JAVABIN)/java
>>   JAVAC   = $(JAVABIN)/javac
>>   base-commit: ad0751b6ecf40cb94ecb693d1acfc38fd223f408
  

Patch

diff --git a/gprofng/testsuite/lib/Makefile.skel b/gprofng/testsuite/lib/Makefile.skel
index 8ea994d2e59..2c98720c4c4 100644
--- a/gprofng/testsuite/lib/Makefile.skel
+++ b/gprofng/testsuite/lib/Makefile.skel
@@ -23,7 +23,7 @@  CFLAGS      = -g -Wall
 SHAREDOPT	= -fpic	-shared
 
 #JAVABIN = /usr/java/latest/bin
-JAVABIN = $(shell dirname `which java`)
+JAVABIN = $(shell dirname `command -v java`)
 JAVA    = $(JAVABIN)/java
 JAVAC   = $(JAVABIN)/javac