Skip to content

Commit

Permalink
rst2man build support
Browse files Browse the repository at this point in the history
  • Loading branch information
narategithub authored and tom95858 committed Dec 10, 2024
1 parent 341bee3 commit 0b022e6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ nobase_include_HEADERS = ovis-ldms-config.h
docdir = $(datadir)/doc/@PACKAGE@
dist_doc_DATA = COPYING gpl-2.0.txt

SUBDIRS = lib ldms util gnulib
SUBDIRS = lib ldms util gnulib docs

# this definition of DIST_SUBDIRS is unusual. May decide to improve later.
# For now, we ship as we expect to configure.
Expand Down
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ AM_PROG_CC_C_O
AC_C_CONST
AC_C_FLEXIBLE_ARRAY_MEMBER

AC_ARG_VAR([RST2MAN], [rst2man command])
AC_CHECK_PROG([RST2MAN], [rst2man], [rst2man], [no])
AS_IF([test "x$RST2MAN" = "xno"],
[AC_MSG_WARN([rst2man not found. Please install python3-docutils package.])])
AM_CONDITIONAL([HAVE_RST2MAN], [test "x$RST2MAN" = xrst2man])

OVIS_PKGLIBDIR

AC_LIB_HAVE_LINKFLAGS([jansson], [], [#include <jansson.h>])
Expand Down Expand Up @@ -954,6 +960,7 @@ AC_SUBST(ac_configure_args)
AC_SUBST(configure_input)

AC_CONFIG_FILES([Makefile
docs/Makefile
util/Makefile
util/relocation/Makefile
lib/Doxyfile
Expand Down
14 changes: 14 additions & 0 deletions docs/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
EXTRA_DIST= \
conf.py \
index.rst \
README.rst \
requirements.txt

man7_MANS =

if HAVE_RST2MAN

%.man: %.rst
rst2man $< $@

endif

0 comments on commit 0b022e6

Please sign in to comment.