File: which-command-v.patch

package info (click to toggle)
libdebug 0.5.3-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 264 kB
  • sloc: ansic: 1,194; makefile: 130
file content (25 lines) | stat: -rw-r--r-- 562 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Use `command -v` instead of `which`.
Forwarded: yes
Author: Peter Pentchev <roam@ringlet.net>
Last-Updated: 2021-12-29

--- a/vars.mk
+++ b/vars.mk
@@ -62,13 +62,13 @@
 
 _CC = $(CROSS)$(COLOR)gcc
 
-ifeq ($(shell which $(_CC)),)
+ifeq ($(shell command -v $(_CC)),)
 _CC = $(CROSS)gcc
-endif	# ifeq ($(shell which $(_CC)),)
+endif	# ifeq ($(shell command -v $(_CC)),)
 
-ifeq ($(shell which $(_CC)),)
+ifeq ($(shell command -v $(_CC)),)
 _CC = gcc
-endif	# ifeq ($(shell which $(_CC)),)
+endif	# ifeq ($(shell command -v $(_CC)),)
 
 CC ?= $(_CC)