Skip to content

Commit

Permalink
configure.ac: add an option: --with-man-pages
Browse files Browse the repository at this point in the history
* do not require sphinx-build if --without-man-pages
* dist rst files for man pages
* build and dist .8 files if sphinx-build is found

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed May 6, 2015
1 parent e324578 commit 5b2357e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@ if test -d ".git" ; then
fi
AC_MSG_NOTICE([RPM_RELEASE='$RPM_RELEASE'])

AC_CHECK_PROGS(SPHINX_BUILD, sphinx-1.0-build sphinx-build, no)
AM_CONDITIONAL(HAS_SPHINX_BUILD, test x"$SPHINX_BUILD" != "xno")
AC_ARG_WITH([man-pages],
[AS_HELP_STRING([--with-man-pages], [build man pages])],
[],
[with_man_pages=check])
AS_IF([test "x$with_man_pages" != "xno"],
[AC_CHECK_PROGS(SPHINX_BUILD, sphinx-1.0-build sphinx-build)
AS_IF([test -z "$SPHINX_BUILD" && \
test "x$with_man_pages" = "xyes"],
[AC_MSG_ERROR([sphinx-build not found (python-sphinx)])])])
AM_CONDITIONAL(WITH_MAN_PAGES, test -n "$SPHINX_BUILD")

AC_CONFIG_MACRO_DIR([m4])

Expand Down
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/overview.png
/object_store.png
/Makefile
2 changes: 1 addition & 1 deletion man/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ EXTRA_DIST = conf.py

dist_man_MANS =

if HAS_SPHINX_BUILD
if WITH_MAN_PAGES
if ENABLE_CLIENT
include Makefile-client.am
endif
Expand Down

0 comments on commit 5b2357e

Please sign in to comment.