]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
fixup! rst2man detection hangs
authorjpsollie <janpieter.sollie@edpnet.be>
Sat, 24 Jul 2021 07:50:52 +0000 (09:50 +0200)
committerKent Overstreet <kent.overstreet@gmail.com>
Sat, 24 Jul 2021 21:10:10 +0000 (17:10 -0400)
rst2man tend to hang when called without arguments, so a small -V is appended to print the version.
Also, make sure we found at least one rst2man executable

Signed-off-by: jpsollie <janpieter.sollie@edpnet.be>
Makefile

index bdcc5d395d913ee431f0527aa2852b43fb5ff056..596357c7c45ed21533efadeb812ffc42c9a0d676 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -61,18 +61,22 @@ else
        INITRAMFS_DIR=/etc/initramfs-tools
 endif
 
-var := $(shell rst2man 2>/dev/null)
+var := $(shell rst2man -V 2>/dev/null)
 ifeq ($(.SHELLSTATUS),0)
        RST2MAN=rst2man
 endif
 
-var := $(shell rst2man.py 2>/dev/null)
+var := $(shell rst2man.py -V 2>/dev/null)
 ifeq ($(.SHELLSTATUS),0)
        RST2MAN=rst2man.py
 endif
 
 undefine var
 
+ifeq (,$(RST2MAN))
+       @echo "WARNING: no RST2MAN found!"
+endif
+
 .PHONY: all
 all: bcachefs bcachefs.5