summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorTedd Ho-Jeong An <tedd.an@intel.com>2021-05-03 22:02:05 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-05-04 16:49:01 -0700
commitb66f406e1e15fb7137412963b82ad143e4a4cd93 (patch)
tree8e78a9810b74998a891d06a776edd8d8321e5bd1 /Makefile.am
parentc0cae92548b4716869b440c3d454ff4517d1fde1 (diff)
downloadbluez-b66f406e1e15fb7137412963b82ad143e4a4cd93.tar.gz
monitor: Convert manpage to rst format
This patch adds support to convert reStructuredText formatted btmon manpage to manpage with rst2man tool.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index cb0d5fc0a..4e9cae885 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -594,7 +594,7 @@ if LIBRARY
pkgconfig_DATA = lib/bluez.pc
endif
-EXTRA_DIST += $(manual_pages:.1=.txt)
+EXTRA_DIST += $(manual_pages:.1=.rst)
DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles --enable-library \
--enable-health \
@@ -616,11 +616,20 @@ SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(SED) -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
< $< > $@
+if RUN_RST2MAN
+RST2MAN_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(RST2MAN) --strict --no-raw \
+ --no-generator --no-datestamp $< $@
+else
+RST2MAN_PROCESS = $(AM_V_GEN)test -f $@ || \
+ { echo "Generated manual page $@ does not exist"; false; }
+endif
+
%.service: %.service.in Makefile
$(SED_PROCESS)
-%.1: %.txt
- $(AM_V_GEN)a2x --doctype manpage --format manpage $(srcdir)/$<
+%.1: %.rst Makefile
+ $(RST2MAN_PROCESS)
src/builtin.h: src/genbuiltin $(builtin_sources)
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@