mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
Makefile: add support for 'make help' on FreeBSD
This simply uses GNU grep instead of the FreeBSD base grep. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
4
Makefile
4
Makefile
@ -63,8 +63,10 @@ PKG_MANAGER ?= $(shell command -v dnf yum|head -n1)
|
||||
PRE_COMMIT = $(shell command -v bin/venv/bin/pre-commit ~/.local/bin/pre-commit pre-commit | head -n1)
|
||||
ifeq ($(shell uname -s),FreeBSD)
|
||||
SED=gsed
|
||||
GREP=ggrep
|
||||
else
|
||||
SED=sed
|
||||
GREP=grep
|
||||
endif
|
||||
|
||||
# This isn't what we actually build; it's a superset, used for target
|
||||
@ -220,7 +222,7 @@ endif
|
||||
# the `help` target. Otherwise These simple-substitutions are resolved
|
||||
# at reference-time (due to `=` and not `=:`).
|
||||
_HLP_TGTS_RX = '^[[:print:]]+:.*?\#\# .*$$'
|
||||
_HLP_TGTS_CMD = grep -E $(_HLP_TGTS_RX) $(MAKEFILE_LIST)
|
||||
_HLP_TGTS_CMD = $(GREP) -E $(_HLP_TGTS_RX) $(MAKEFILE_LIST)
|
||||
_HLP_TGTS_LEN = $(shell $(call err_if_empty,_HLP_TGTS_CMD) | cut -d : -f 1 | wc -L 2>/dev/null || echo "PARSING_ERROR")
|
||||
# Separated condition for Darwin
|
||||
ifeq ($(shell uname -s)$(_HLP_TGTS_LEN),DarwinPARSING_ERROR)
|
||||
|
Reference in New Issue
Block a user