summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDoug Rabson <dfr@rabson.org>2022-06-28 08:03:48 +0100
committerDoug Rabson <dfr@rabson.org>2022-06-28 10:29:50 +0100
commitaf16edf499d9ed320d5725b0828465cc5b184045 (patch)
tree90ce35fd9e6a9430dfb981c1ebd8e037d411a213 /Makefile
parent94a634fcfe32da09493cc6dc0d04d568121bc202 (diff)
downloadpodman-af16edf499d9ed320d5725b0828465cc5b184045.tar.gz
podman-af16edf499d9ed320d5725b0828465cc5b184045.tar.bz2
podman-af16edf499d9ed320d5725b0828465cc5b184045.zip
Makefile: use GNU sed to convert manpages on FreeBSD
The sed implementation on FreeBSD has a strict interpretation of posix 'basic' regular expressions. It would be better to re-implement this using 'extended' regular expressions but for now, just use GNU sed. This should have no functional difference on currently supported platforms. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4fe928bad..2ba6e1876 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,11 @@ PYTHON ?= $(shell command -v python3 python|head -n1)
PKG_MANAGER ?= $(shell command -v dnf yum|head -n1)
# ~/.local/bin is not in PATH on all systems
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
+else
+SED=sed
+endif
# This isn't what we actually build; it's a superset, used for target
# dependencies. Basically: all *.go and *.c files, except *_test.go,
@@ -428,7 +433,7 @@ $(MANPAGES): %: %.md .install.md2man docdir
### replaces "\" at the end of a line with two spaces
### this ensures that manpages are renderd correctly
- @sed -e 's/\((podman[^)]*\.md\(#.*\)\?)\)//g' \
+ @$(SED) -e 's/\((podman[^)]*\.md\(#.*\)\?)\)//g' \
-e 's/\[\(podman[^]]*\)\]/\1/g' \
-e 's/\[\([^]]*\)](http[^)]\+)/\1/g' \
-e 's;<\(/\)\?\(a\|a\s\+[^>]*\|sup\)>;;g' \