summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNoah Slater <nslater@apache.org>2012-12-03 10:06:06 +0100
committerDave Cottlehuber <dch@apache.org>2012-12-11 14:10:52 +0100
commit719d2b6e43328de1eacf4f94accfdb478375d95d (patch)
tree0be0d70dc4aa8d15661858997a966756b88ad41d /src
parent84226656ab3fad6f95029aad993be9f5ec4f1794 (diff)
downloadcouchdb-719d2b6e43328de1eacf4f94accfdb478375d95d.tar.gz
Integrate Sphinx into autotools
Integrate Sphinx into autotools - Remove M4 macros and require as external dependencies instead - Skip help2man generation if help2man is not installed - ensure THANKS file is only updated during make distcheck - Add TexInfo, PDF, HTML doc targets via Sphinx - Add licenses and header compliance checking - support optional builds of PDF, HTML, texinfo via Sphinx and pdflatex - support skipping docs or compiler tests for happy developers Travis: clean up package dependencies - include sphinx via aptitude - use spidermonkey 1.8.5 instead of default libmozjs - include latex components for building PDFs
Diffstat (limited to 'src')
-rw-r--r--src/couch_mrview/Makefile.am2
-rw-r--r--src/couch_replicator/Makefile.am2
-rw-r--r--src/couchdb/priv/Makefile.am51
3 files changed, 44 insertions, 11 deletions
diff --git a/src/couch_mrview/Makefile.am b/src/couch_mrview/Makefile.am
index b544cb70e..2b9ef86fa 100644
--- a/src/couch_mrview/Makefile.am
+++ b/src/couch_mrview/Makefile.am
@@ -57,7 +57,9 @@ EXTRA_DIST = $(include_files) $(source_files) $(test_files)
CLEANFILES = $(compiled_files)
check:
+if TESTS
$(abs_top_builddir)/test/etap/run $(abs_top_srcdir)/src/couch_mrview/test
+endif
ebin/%.app: src/%.app.src
@mkdir -p ebin/
diff --git a/src/couch_replicator/Makefile.am b/src/couch_replicator/Makefile.am
index 746a62f71..71d370280 100644
--- a/src/couch_replicator/Makefile.am
+++ b/src/couch_replicator/Makefile.am
@@ -60,7 +60,9 @@ EXTRA_DIST = $(include_files) $(source_files) $(test_files)
CLEANFILES = $(compiled_files)
check:
+if TESTS
$(abs_top_builddir)/test/etap/run $(abs_top_srcdir)/src/couch_replicator/test
+endif
ebin/%.app: src/%.app.src
@mkdir -p ebin/
diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am
index 704e8708d..8fce9d05f 100644
--- a/src/couchdb/priv/Makefile.am
+++ b/src/couchdb/priv/Makefile.am
@@ -13,20 +13,28 @@
couchlibdir = $(localerlanglibdir)/couch-$(version)
couchprivdir = $(couchlibdir)/priv
couchprivlibdir = $(couchlibdir)/priv/lib
+man1dir = $(mandir)/man1
-if HELP2MAN
-dist_man1_MANS = couchjs.1
+man_file = couchjs.1
+
+if BUILD_MAN
+man_file_build = $(man_file)
+else
+man_file_build =
endif
+BUILT_SOURCES = $(man_file_build)
+
EXTRA_DIST = \
spawnkillable/couchspawnkillable.sh \
stat_descriptions.cfg.in \
couch_ejson_compare/erl_nif_compat.h \
couch_js/sm170.c \
couch_js/sm180.c \
- couch_js/sm185.c
+ couch_js/sm185.c \
+ $(man_file_build)
-CLEANFILES = $(dist_man1_MANS) stat_descriptions.cfg
+CLEANFILES = $(man_file_build) stat_descriptions.cfg
couchprivlib_LTLIBRARIES = couch_icu_driver.la
if USE_EJSON_COMPARE_NIF
@@ -66,13 +74,24 @@ couchjs_LDADD = $(CURL_LIBS) $(JS_LIBS)
couchpriv_DATA = stat_descriptions.cfg
couchpriv_PROGRAMS = couchspawnkillable
-HELP2MAN_OPTION=--no-info --help-option="-h" --version-option="-V"
-
-couchjs.1: couchjs
- touch $@
- if test -x "$(HELP2MAN_EXECUTABLE)"; then \
- $(HELP2MAN_EXECUTABLE) $(HELP2MAN_OPTION) \
- --name="$(package_name) JavaScript interpreter" ./couchjs --output $@; \
+# Depend on source files so distributed man pages are not rebuilt for end user.
+
+$(man_file): $(COUCHJS_SRCS)
+ $(MAKE) -f Makefile couchjs; \
+ $(top_srcdir)/build-aux/missing --run \
+ help2man \
+ --no-info \
+ --help-option="-h" \
+ --version-option="-V" \
+ --name="$(package_name) JavaScript interpreter" \
+ ./couchjs --output $@
+
+install-data-local:
+ if test -s $(man_file); then \
+ if test `cat $(man_file) | wc -l` -gt 1; then \
+ $(INSTALL) -d $(DESTDIR)$(man1dir); \
+ $(INSTALL_DATA) $(man_file) $(DESTDIR)$(man1dir)/$(man_file); \
+ fi \
fi
%.cfg: %.cfg.in
@@ -115,6 +134,16 @@ if WINDOWS
endif
uninstall-local:
+ rm -f $(DESTDIR)$(man1dir)/$(man_file)
if test -f "$(DESTDIR)$(couchprivlibdir)/couch_erl_driver"; then \
rm -f "$(DESTDIR)$(couchprivlibdir)/couch_erl_driver.so"; \
fi
+
+distcheck-hook:
+ if test ! -s $(man_file); then \
+ $(top_srcdir)/build-aux/dist-error $(man_file); \
+ else \
+ if test ! `cat $(man_file) | wc -l` -gt 1; then \
+ $(top_srcdir)/build-aux/dist-error $(man_file); \
+ fi \
+ fi