]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gprofng: avoid use of non-portable which [PR32166]
authorSam James <sam@gentoo.org>
Wed, 11 Sep 2024 21:01:49 +0000 (22:01 +0100)
committerSam James <sam@gentoo.org>
Thu, 12 Sep 2024 21:53:22 +0000 (22:53 +0100)
Distributions like Debian [0] and Gentoo are phasing out the use of
the non-portable `which` utility. Use POSIX's `command -v` instead.

[0] https://lwn.net/Articles/874049/

gprofng/ChangeLog
PR gprofng/32166
* testsuite/lib/Makefile.skel (JAVABIN): Replace use of which.

gprofng/testsuite/lib/Makefile.skel

index 8ea994d2e59cb2604cf151d7ad21c057d779320c..2c98720c4c4b376677bb341d0a4c911a0b9a4937 100644 (file)
@@ -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