mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-02 00:00:03 +03:00
Fix errors related to rst2man warning message:
- Warning message doesn't print and causes build to exit. - .SHELLSTATUS doesn't work on some versions of Make. Signed-off-by: Brett Holman <bholman.devel@gmail.com>
This commit is contained in:
parent
60a6b2882e
commit
08420d2481
18
Makefile
18
Makefile
@ -61,22 +61,16 @@ else
|
|||||||
INITRAMFS_DIR=/etc/initramfs-tools
|
INITRAMFS_DIR=/etc/initramfs-tools
|
||||||
endif
|
endif
|
||||||
|
|
||||||
var := $(shell rst2man -V 2>/dev/null)
|
STATUS:=$(shell rst2man -V 2>/dev/null; echo $$?)
|
||||||
ifeq ($(.SHELLSTATUS),0)
|
ifeq ($(STATUS),0)
|
||||||
RST2MAN=rst2man
|
RST2MAN=rst2man
|
||||||
endif
|
endif
|
||||||
|
|
||||||
var := $(shell rst2man.py -V 2>/dev/null)
|
STATUS:=$(shell rst2man.py -V 2>/dev/null; echo $$?)
|
||||||
ifeq ($(.SHELLSTATUS),0)
|
ifeq ($(STATUS),0)
|
||||||
RST2MAN=rst2man.py
|
RST2MAN=rst2man.py
|
||||||
endif
|
endif
|
||||||
|
|
||||||
undefine var
|
|
||||||
|
|
||||||
ifeq (,$(RST2MAN))
|
|
||||||
@echo "WARNING: no RST2MAN found!"
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: bcachefs bcachefs.5
|
all: bcachefs bcachefs.5
|
||||||
|
|
||||||
@ -98,9 +92,13 @@ DOCSRC := opts_macro.h bcachefs.5.rst.tmpl
|
|||||||
DOCGENERATED := bcachefs.5 doc/bcachefs.5.rst
|
DOCGENERATED := bcachefs.5 doc/bcachefs.5.rst
|
||||||
DOCDEPS := $(addprefix ./doc/,$(DOCSRC))
|
DOCDEPS := $(addprefix ./doc/,$(DOCSRC))
|
||||||
bcachefs.5: $(DOCDEPS) libbcachefs/opts.h
|
bcachefs.5: $(DOCDEPS) libbcachefs/opts.h
|
||||||
|
ifneq (,$(RST2MAN))
|
||||||
$(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
|
||||||
|
else
|
||||||
|
@echo "WARNING: no rst2man found! Man page not generated."
|
||||||
|
endif
|
||||||
|
|
||||||
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