]) # LB_CONFIG_DOCS
#
+# LB_CONFIG_MANPAGES
+#
+# Build manpages?
+#
+AC_DEFUN([LB_CONFIG_MANPAGES], [
+AC_MSG_CHECKING([whether to build Lustre manpages])
+AC_ARG_ENABLE([manpages],
+ AC_HELP_STRING([--disable-manpages],
+ [skip creation and inclusion of man pages (default is enable)]),
+ [], [enable_manpages="yes"])
+AC_MSG_RESULT([$enable_manpages])
+AS_IF([test "x$enable_manpages" = xyes], [
+AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], [])
+ if test "x$RST2MAN" = "x"; then
+ AC_MSG_ERROR(
+ [rst2man is needed to build the man pages. Install python-docutils.])
+fi
+])
+]) # LB_CONFIG_MANPAGES
+
+#
# LB_CONFIG_HEADERS
#
# add -include config.h
AM_CONDITIONAL([UTILS], [test x$enable_utils = xyes])
AM_CONDITIONAL([TESTS], [test x$enable_tests = xyes])
AM_CONDITIONAL([DOC], [test x$ENABLE_DOC = x1])
+AM_CONDITIONAL([MANPAGES], [test x$enable_manpages = xyes])
AM_CONDITIONAL([LINUX], [test x$lb_target_os = xlinux])
AM_CONDITIONAL([USES_DPKG], [test x$uses_dpkg = xyes])
AM_CONDITIONAL([USE_QUILT], [test x$use_quilt = xyes])
--enable-utils | --disable-utils ) ;;
--enable-iokit | --disable-iokit ) ;;
--enable-dlc | --disable-dlc ) ;;
+ --enable-manpages | --disable-manpages ) ;;
* ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;;
esac
done
if test x$USE_DLC = xyes ; then
RPMBINARGS="$RPMBINARGS --with lnet_dlc"
fi
+if test x$enable_manpages != xyes ; then
+ RPMBINARGS="$RPMBINARGS --without manpages"
+fi
RPMBUILD_BINARY_ARGS=$RPMBINARGS
RPMBUILD_SOURCE_ARGS=$RPMSRCARGS
LC_OSD_ADDON
LB_CONFIG_DOCS
+LB_CONFIG_MANPAGES
LB_CONFIG_UTILS
LB_CONFIG_TESTS
LC_CONFIG_CLIENT
LB_CONFIG_MPITESTS
LB_CONFIG_SERVERS
-AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], [])
-if test "x$RST2MAN" = "x"; then
- AC_MSG_ERROR(
- [rst2man is needed to build the man pages. Install python-docutils.])
-fi
-
# Tests depends from utils (multiop from liblustreapi)
AS_IF([test "x$enable_utils" = xno], [enable_tests="no"])
%bcond_without lustre_iokit
%bcond_without lustre_modules
%bcond_with lnet_dlc
+%bcond_without manpages
%if %{without servers}
# --without servers overrides --with {ldiskfs|zfs}
Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre
Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}
Requires: %{name}-modules = %{version}
-BuildRequires: libtool python-docutils
+BuildRequires: libtool
+%if %{with manpages}
+BuildRequires: python-docutils
+%endif
%if %{with servers}
Requires: lustre-osd
Requires: lustre-osd-mount
%{!?with_servers:--disable-server} \
%{!?with_zfs:--without-zfs} \
%{!?with_lnet_dlc:--disable-dlc} \
+ %{!?with_manpages:--disable-manpages} \
--with-release=%{release} \
--with-linux=%{kdir} \
--with-linux-obj=%{kobjdir} \
%{_libdir}/libcfsutil.a
%{_libdir}/liblustreapi.a
%{_libdir}/liblustreapi.so
+%if %{with manpages}
%{_mandir}/man?/*
+%endif
%{_includedir}/lustre
%{_includedir}/libcfs
%endif
llverdev.8 llbackup.8 llapi_quotactl.3 llobdstat.8 llstat.8 \
plot-llstat.8 l_getgroups.8 lst.8 routerstat.8 \
ll_recover_lost_found_objs.8 llog_reader.8 llapi_file_open.3 \
- llapi_file_create.3 llapi_file_get_stripe.3 lustreapi.7 \
+ llapi_file_create.3 llapi_file_get_stripe.3 \
lustre_rsync.8 lfs_migrate.1 lhbadm.8 ldev.8 ldev.conf.5 nids.5 \
lfs-hsm.1 llapi_hsm_state_get.3 llapi_hsm_state_set.3 \
lustre_routes_config.8 lustre_routes_conversion.8 \
DISTONLY_MANFILES = $(SERVER_MANFILES)
endif
+# Generated manpages with their sources in ReST. Generated files are
+# not part of the dist target; they may or may not have been
+# generated (see --disable-manpages option).
+RST_MANFILES = lustreapi.rst
+GEN_MANFILES = lustreapi.7
+
if UTILS
-man_MANS = $(MANFILES)
+if MANPAGES
+man_MANS = $(MANFILES) $(GEN_MANFILES)
+endif
endif
.rst.3 .rst.7:
@RST2MAN@ $? $@
-CLEANFILES = *.aux *.tex *.log *.pdf
+CLEANFILES = *.aux *.tex *.log *.pdf $(GEN_MANFILES)
-EXTRA_DIST = $(MANFILES) *.rst $(DISTONLY_MANFILES)
+EXTRA_DIST = $(MANFILES) $(RST_MANFILES) $(DISTONLY_MANFILES)
all: