forked from paulmckrcu/perfbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop using 'which' command in build scripts
These days, it becomes normal where "which" command is not found in minimal container images such as fedora and archlinux. Since POSIX 2008, a portable and efficient way of testing command availability is: command -v <command_name> Use it in build scripts (via make and shell variable WHICH) instead. Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html Signed-off-by: Akira Yokosawa <[email protected]>
- Loading branch information
Showing
6 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# | ||
# Authors: Akira Yokosawa <[email protected]> | ||
|
||
A2PING := $(shell which a2ping 2>/dev/null) | ||
A2PING := $(shell $(WHICH) a2ping 2>/dev/null) | ||
|
||
ifdef A2PING | ||
GS_950_OR_LATER := $(shell gs --version | grep -c -E "^(9\.[5-9]|10\.[0-9]).?") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# | ||
# Authors: Akira Yokosawa <[email protected]> | ||
|
||
EPSTOPDF := $(shell which epstopdf 2>/dev/null) | ||
EPSTOPDF := $(shell $(WHICH) epstopdf 2>/dev/null) | ||
GS_953_OR_LATER := $(shell gs --version | grep -c -E "^(9\.5[3-9]|10\.[0-9]).?") | ||
GS_OPT=--gsopt=-dPDFSETTINGS=/ebook | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters