Updated Branches: refs/heads/docs 8c09e5ead -> 1270573ff
Improving configure.ac checks Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1270573f Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1270573f Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1270573f Branch: refs/heads/docs Commit: 1270573ff6cbb29e8b1ac86f3f473b5afcb0152f Parents: bdbe14e Author: Noah Slater <nsla...@apache.org> Authored: Sun Oct 14 00:10:33 2012 +0100 Committer: Noah Slater <nsla...@apache.org> Committed: Sun Oct 14 00:10:33 2012 +0100 ---------------------------------------------------------------------- Makefile.am | 10 +++--- bin/Makefile.am | 2 +- configure.ac | 55 +++++++++++++++++++++------------ share/doc/build/Makefile.am | 2 + src/couch_mrview/Makefile.am | 2 +- src/couch_replicator/Makefile.am | 2 +- 6 files changed, 45 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/1270573f/Makefile.am ---------------------------------------------------------------------- diff --git a/Makefile.am b/Makefile.am index 56f0fe1..5a700e8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -91,24 +91,24 @@ THANKS.gz: $(top_srcdir)/THANKS @rm $(top_builddir)/THANKS.tmp check: dev check-js -if RUN_TESTS +if TESTS $(top_builddir)/test/etap/run $(top_srcdir)/test/etap endif check-js: dev -if RUN_TESTS +if TESTS if USE_CURL $(top_builddir)/test/javascript/run endif endif check-etap: dev -if RUN_TESTS +if TESTS $(top_builddir)/test/etap/run $(top_srcdir)/test/etap endif cover: dev -if RUN_TESTS +if TESTS rm -f cover/*.coverdata COVER=1 COVER_BIN=./src/couchdb/ $(top_builddir)/test/etap/run SRC=./src/couchdb/ \ @@ -119,7 +119,7 @@ if RUN_TESTS endif dev: all -if RUN_TESTS +if TESTS @echo "This command is intended for developers to use;" @echo "it creates development ini files as well as a" @echo "$(top_builddir)/tmp structure for development runtime files." http://git-wip-us.apache.org/repos/asf/couchdb/blob/1270573f/bin/Makefile.am ---------------------------------------------------------------------- diff --git a/bin/Makefile.am b/bin/Makefile.am index f391154..3d342fc 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -120,6 +120,6 @@ couchdb.1: couchdb.tpl.in touch $@ if test -x "$(HELP2MAN_EXECUTABLE)"; then \ $(MAKE) -f Makefile couchdb; \ - $(HELP2MAN_EXECUTABLE) $(HELP2MAN_OPTION) \ + $(HELP2MAN) $(HELP2MAN_OPTION) \ --name="Apache CouchDB database server" ./couchdb --output $@; \ fi http://git-wip-us.apache.org/repos/asf/couchdb/blob/1270573f/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 194b04c..55fe220 100644 --- a/configure.ac +++ b/configure.ac @@ -419,11 +419,6 @@ Are the Erlang headers installed? Use the `--with-erlang' option to specify the path to the Erlang include directory.])]) CPPFLAGS="$OLD_CPPFLAGS" -AC_PATH_PROG([HELP2MAN_EXECUTABLE], [help2man]) -if test x${HELP2MAN_EXECUTABLE} = x; then - AC_MSG_WARN([You will be unable to regenerate any man pages.]) -fi - use_init=yes use_launchd=yes native_mochijson_enabled=no @@ -438,19 +433,23 @@ AC_ARG_ENABLE([launchd], [AC_HELP_STRING([--disable-launchd], use_launchd=$enableval ], []) +AC_ARG_ENABLE([native-mochijson], [AC_HELP_STRING([--enable-native-mochijson], + [compile mochijson to native code (EXPERIMENTAL)])], [ + native_mochijson_enabled=$enableval +], []) + AC_ARG_ENABLE([tests], [AC_HELP_STRING([--disable-tests], [skip tests during build])], [ tests_enabled=$enableval ], []) -AC_ARG_ENABLE([native-mochijson], [AC_HELP_STRING([--enable-native-mochijson], - [compile mochijson to native code (EXPERIMENTAL)])], [ - native_mochijson_enabled=$enableval +AC_ARG_ENABLE([strictness], [AC_HELP_STRING([--enable-strictness], + [exit when optional checks fail])], [ + strictness_enabled=$enableval ], []) init_enabled=false launchd_enabled=false -tests_enabled=false if test "$use_init" = "yes"; then AC_MSG_CHECKING(location of init directory) @@ -481,26 +480,42 @@ if test "$use_launchd" = "yes"; then fi fi -AC_ARG_VAR([ERL], [path to the `erl' executable]) -AC_ARG_VAR([ERLC], [path to the `erlc' executable]) -AC_ARG_VAR([HELP2MAN_EXECUTABLE], [path to the `help2man' program]) +AC_PATH_PROG([HELP2MAN], [help2man]) -if test -n "$HELP2MAN_EXECUTABLE"; then - help2man_enabled=true -else - if test -f "$srcdir/bin/couchdb.1" -a -f "$srcdir/src/couchdb/priv/couchjs.1"; then - help2man_enabled=true +if test x${HELP2MAN} = x; then + if test x${strictness_enabled} = xyes; then + AC_MSG_ERROR([Could not find the `help2man' executable.]) + else + AC_MSG_WARN([You will be unable to regenerate any man pages.]) + fi +fi + +AC_PATH_PROG([SPHINX_BUILD], [sphinx-build]) + +if test x${SPHINX_BUILD} = x; then + if test x${strictness_enabled} = xyes; then + AC_MSG_ERROR([Could not find the `sphinx-build' executable.]) else - help2man_enabled=false + AC_MSG_WARN([You will be unable to regenerate any documentation.]) fi fi + +AC_ARG_VAR([ERL], [path to the `erl' executable]) +AC_ARG_VAR([ERLC], [path to the `erlc' executable]) + AM_CONDITIONAL([INIT], [test x${init_enabled} = xtrue]) AM_CONDITIONAL([LAUNCHD], [test x${launchd_enabled} = xtrue]) -AM_CONDITIONAL([RUN_TESTS], [test x${skip_tests} = xyes]) -AM_CONDITIONAL([HELP2MAN], [test x${help2man_enabled} = xtrue]) AM_CONDITIONAL([USE_NATIVE_MOCHIJSON], [test x${native_mochijson_enabled} = xyes]) AM_CONDITIONAL([USE_CURL], [test x${use_curl} = xyes]) +AM_CONDITIONAL([TESTS], [test x${tests_enabled} = xyes]) +AM_CONDITIONAL([STRICTNESS], [test x${strictness_enabled} = xyes]) + +AM_CONDITIONAL([HELP2MAN], [test ! x${HELP2MAN} = x]) +AM_CONDITIONAL([SPHINX_BUILD], [test ! x${SPHINX_BUILD} = x]) + +AC_SUBST([HELP2MAN]) +AC_SUBST([SPHINX_BUILD]) AC_SUBST([package_author_name], ["LOCAL_PACKAGE_AUTHOR_NAME"]) AC_SUBST([package_author_address], ["LOCAL_PACKAGE_AUTHOR_ADDRESS"]) http://git-wip-us.apache.org/repos/asf/couchdb/blob/1270573f/share/doc/build/Makefile.am ---------------------------------------------------------------------- diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am index 165ec82..92449ea 100644 --- a/share/doc/build/Makefile.am +++ b/share/doc/build/Makefile.am @@ -14,6 +14,8 @@ # @@ TODO LIST BEFORE WE CAN MERGE +# @@ add RM checks to configure.ac + # @@ improve conf.py settings # @@ replace "test !" in configure.ac with "test -f X; then :; else" for portability http://git-wip-us.apache.org/repos/asf/couchdb/blob/1270573f/src/couch_mrview/Makefile.am ---------------------------------------------------------------------- diff --git a/src/couch_mrview/Makefile.am b/src/couch_mrview/Makefile.am index 0360c2a..2b9ef86 100644 --- a/src/couch_mrview/Makefile.am +++ b/src/couch_mrview/Makefile.am @@ -57,7 +57,7 @@ EXTRA_DIST = $(include_files) $(source_files) $(test_files) CLEANFILES = $(compiled_files) check: -if RUN_TESTS +if TESTS $(abs_top_builddir)/test/etap/run $(abs_top_srcdir)/src/couch_mrview/test endif http://git-wip-us.apache.org/repos/asf/couchdb/blob/1270573f/src/couch_replicator/Makefile.am ---------------------------------------------------------------------- diff --git a/src/couch_replicator/Makefile.am b/src/couch_replicator/Makefile.am index 75326ab..71d3702 100644 --- a/src/couch_replicator/Makefile.am +++ b/src/couch_replicator/Makefile.am @@ -60,7 +60,7 @@ EXTRA_DIST = $(include_files) $(source_files) $(test_files) CLEANFILES = $(compiled_files) check: -if RUN_TESTS +if TESTS $(abs_top_builddir)/test/etap/run $(abs_top_srcdir)/src/couch_replicator/test endif