]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
configure.ac: add an option: --with-man-pages
authorKefu Chai <kchai@redhat.com>
Mon, 4 May 2015 16:26:31 +0000 (00:26 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 6 May 2015 02:17:42 +0000 (10:17 +0800)
* 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 <kchai@redhat.com>
configure.ac
doc/.gitignore
man/Makefile.am

index 4b504008e28cdaf97f73d100a9f7c6036bbcf8e5..b21ad4482d58a5a24ae5555e7e7b982f45549760 100644 (file)
@@ -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])
 
index 0c7c74746ae9461d84dd5ee3cd84fbc1e46cb881..aca7518a3ee0a8bb874da5f422fb279729b3225d 100644 (file)
@@ -1,2 +1,3 @@
 /overview.png
 /object_store.png
+/Makefile
index 2298866efe6be759d5b5febfafb38fd74dcd00e6..7d1159edff0c36d0a73c1cb28ad7273bf1fde211 100644 (file)
@@ -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