mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-09 00:00:04 +03:00
Makefile: detect rst2man
On some distros, rst2man has a .py extension and there is no rst2man. Fix build on such systems by detecting what is available. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
parent
632feaa69a
commit
05c9879524
14
Makefile
14
Makefile
@ -72,6 +72,18 @@ else
|
|||||||
INITRAMFS_DIR=/etc/initramfs-tools
|
INITRAMFS_DIR=/etc/initramfs-tools
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
var := $(shell rst2man 2>/dev/null)
|
||||||
|
ifeq ($(.SHELLSTATUS),0)
|
||||||
|
RST2MAN=rst2man
|
||||||
|
endif
|
||||||
|
|
||||||
|
var := $(shell rst2man.py 2>/dev/null)
|
||||||
|
ifeq ($(.SHELLSTATUS),0)
|
||||||
|
RST2MAN=rst2man.py
|
||||||
|
endif
|
||||||
|
|
||||||
|
undefine var
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: bcachefs bcachefs.5
|
all: bcachefs bcachefs.5
|
||||||
|
|
||||||
@ -95,7 +107,7 @@ DOCDEPS := $(addprefix ./doc/,$(DOCSRC))
|
|||||||
bcachefs.5: $(DOCDEPS) libbcachefs/opts.h
|
bcachefs.5: $(DOCDEPS) libbcachefs/opts.h
|
||||||
$(CC) doc/opts_macro.h -I libbcachefs -I include -E 2>/dev/null \
|
$(CC) doc/opts_macro.h -I libbcachefs -I include -E 2>/dev/null \
|
||||||
| doc/macro2rst.py
|
| doc/macro2rst.py
|
||||||
rst2man doc/bcachefs.5.rst bcachefs.5
|
$(RST2MAN) doc/bcachefs.5.rst bcachefs.5
|
||||||
|
|
||||||
SRCS=$(shell find . -type f -iname '*.c')
|
SRCS=$(shell find . -type f -iname '*.c')
|
||||||
DEPS=$(SRCS:.c=.d)
|
DEPS=$(SRCS:.c=.d)
|
||||||
|
Loading…
Reference in New Issue
Block a user