From: Trond Norbye Date: Wed, 21 Jul 2010 16:18:14 +0000 (+0200) Subject: Added --without-docs to configure X-Git-Tag: 0.44~13^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=d19633c9a900fbf48d87d49d7202c7b60036e620;p=m6w6%2Flibmemcached Added --without-docs to configure The purpose of this option is to be able to disable generation of manual pages from pod2man (to enable compilation of libmemcached on systems without a working pod2man) --- diff --git a/Makefile.am b/Makefile.am index 0728e01d..38649411 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ noinst_LTLIBRARIES = noinst_PROGRAMS = include_HEADERS = nobase_include_HEADERS = -check_PROGRAMS = +check_PROGRAMS = EXTRA_HEADERS = BUILT_SOURCES= EXTRA_DIST= \ @@ -30,8 +30,11 @@ EXTRA_DIST= \ m4/po.m4 \ m4/progtest.m4 - +TEST_DOCS= +if BUILD_DOCS SUBDIRS = docs +TEST_DOCS+=test-docs +endif test-docs: (cd docs && $(MAKE) test-docs) @@ -84,7 +87,7 @@ lcov: lcov-clean check genhtml -o lcov --function-coverage -t libmemcached libmemcached/lcov.out lcov-clean: clean - rm -rf lcov */lcov.out + rm -rf lcov */lcov.out find . -name '*.gcno' | xargs rm -f find . -name '*.gcda' | xargs rm -f diff --git a/configure.ac b/configure.ac index d450ef1f..c192234c 100644 --- a/configure.ac +++ b/configure.ac @@ -50,8 +50,6 @@ DETECT_BYTEORDER ENABLE_UTILLIB SETSOCKOPT_SANITY ENABLE_HSIEH_HASH -REQUIRE_POD2MAN -REQUIRE_PODCHECKER PROTOCOL_BINARY_TEST WITH_MEMCACHED ENABLE_DEPRECATED @@ -73,6 +71,20 @@ AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[ [1], [Define to true if you want to use functions from atomic.h])])]) +AC_ARG_WITH([docs], + [AS_HELP_STRING([--with-docs], + [Generate documentation (yes|no) @<:@default=yes@:>@])], + [with_docs=$withval], + [with_docs=yes]) + +AS_IF([test "$with_docs" = "yes"], + [ + REQUIRE_POD2MAN + REQUIRE_PODCHECKER + ]) +AM_CONDITIONAL(BUILD_DOCS, test "$with_docs" = "yes") + + AC_CONFIG_FILES([ Makefile docs/Makefile @@ -109,3 +121,13 @@ case "$host_os" in ;; esac +AS_IF(test "$with_docs" = "no", + [ + echo "*****" + echo "*" + echo "* WARNING: You are not generating any documentation." + echo "* Please don't ship libmemcached to an end user" + echo "* without documentation..." + echo "*" + echo "*****" + ]) diff --git a/tests/include.am b/tests/include.am index 3d0d7760..7a9c2062 100644 --- a/tests/include.am +++ b/tests/include.am @@ -91,7 +91,7 @@ tests_memplus_LDADD = $(tests_memplus_DEPENDENCIES) $(LIBSASL) test: check -check-local: test-docs test-mem test-hash memcapable +check-local: $(TEST_DOCS) test-mem test-hash memcapable echo "Tests completed" test-x: check-local test-plus test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat