Permalink
Browse files

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
  • Loading branch information...
nslater authored and dch committed Dec 3, 2012
1 parent 8422665 commit 719d2b6e43328de1eacf4f94accfdb478375d95d
View
@@ -1,120 +1,108 @@
+!.gitignore
+!.mailmap
*.beam
+*.diff
*.gz
-*.tpl
-*.o
-*.lo
*.la
-*.m4
-*.in
-*~
+*.lo
+*.o
*.orig
*.rej
+*.stamp
*.sw*
-erl_crash.dump
-configure
-autom4te.cache
-build-aux
-*.diff
-!.gitignore
+*.tpl
+*~
.*
-!.mailmap
-
-# ./configure
-
+INSTALL
Makefile
-bin/Makefile
+Makefile.in
+THANKS
+acinclude.m4
+aclocal.m4
+apache-couchdb-*
+autom4te.cache
+bin/.deps/
+bin/couch-config
+bin/couch-config_dev
+bin/couchdb
+bin/couchdb.1
+bin/couchjs_dev
+bin/couchpw
+build-aux/config.*
+build-aux/depcomp
+build-aux/install-sh
+build-aux/ltmain.sh
+build-aux/missing
+build-aux/texinfo.tex
config.h
+config.h.in
config.log
config.status
-etc/Makefile
-etc/couchdb/Makefile
-etc/default/Makefile
-etc/init/Makefile
-etc/init/couchdb
-etc/launchd/Makefile
-etc/logrotate.d/Makefile
-libtool
-share/Makefile
-src/couchdb/.deps/*
-src/couchdb/Makefile
-src/couchdb/priv/Makefile
-src/mochiweb/Makefile
-stamp-h1
-test/.deps/
-test/Makefile
-test/javascript/run_js_tests.sh
-var/Makefile
-
-# for make
-
-bin/couchdb
-bin/couchdb.1
-bin/couch-config
-bin/couch-config_dev
+configure
+couchdb.stderr
+couchdb.stdout
+cover/*
+erl_crash.dump
etc/couchdb/default.ini
+etc/couchdb/default_dev.ini
+etc/couchdb/local_dev.ini
+etc/init/couchdb
etc/launchd/org.apache.couchdb.plist
etc/logrotate.d/couchdb
+libtool
+m4
+share/doc/build/CouchDB.log
+share/doc/build/doctrees
+share/doc/build/html
+share/doc/build/latex
+share/doc/build/texinfo
+share/server/main-coffee.js
+share/server/main.js
src/couch_mrview/ebin/
src/couch_replicator/ebin/
+src/couchdb/.deps/*
src/couchdb/.libs/*
src/couchdb/couch.app
src/couchdb/couchjs
src/couchdb/edoc-info
src/couchdb/erlang.png
-src/couchdb/stylesheet.css
src/couchdb/priv/.deps/
src/couchdb/priv/.libs/
src/couchdb/priv/couch_icu_driver.la
src/couchdb/priv/couchjs
src/couchdb/priv/couchjs.1
src/couchdb/priv/couchspawnkillable
src/couchdb/priv/stat_descriptions.cfg
-src/erlang-oauth/oauth.app
-src/ibrowse/ibrowse.app
-src/ejson/ejson.app
+src/couchdb/priv/stat_descriptions.cfg
+src/couchdb/stylesheet.css
src/ejson/.deps/
src/ejson/.libs/
+src/ejson/ejson.app
src/ejson/priv
+src/erlang-oauth/oauth.app
+src/erlang-oauth/oauth.app
+src/ibrowse/ibrowse.app
+src/ibrowse/ibrowse.app
+src/mochiweb/mochiweb.app
src/mochiweb/mochiweb.app
src/snappy/.deps/
src/snappy/.libs/
-src/snappy/priv
-src/snappy/snappy.app
+src/snappy/google-snappy/.deps/
src/snappy/google-snappy/snappy-stubs-public.h
src/snappy/google-snappy/stamp-h2
-src/snappy/google-snappy/.deps/
-test/local.ini
+src/snappy/priv
+src/snappy/snappy.app
+stamp-h1
+test/.deps/
+test/bench/run
test/etap/.deps/
test/etap/run
+test/etap/run
+test/etap/temp.*
test/etap/test_cfg_register
test/etap/test_util.erl
test/javascript/run
-share/server/main.js
-share/server/main-coffee.js
-
-# for make dev
-
-bin/.deps/
-bin/couchjs_dev
-bin/couchpw
-etc/couchdb/default_dev.ini
-etc/couchdb/local_dev.ini
-utils/run
+test/javascript/run_js_tests.sh
+test/local.ini
tmp
-src/couchdb/priv/stat_descriptions.cfg
-src/erlang-oauth/oauth.app
-src/ibrowse/ibrowse.app
-src/mochiweb/mochiweb.app
-test/etap/run
-
-# for make check
-
-test/etap/temp.*
-test/bench/run
-couchdb.stderr
-couchdb.stdout
-
-# for make cover
-
-cover/*
-INSTALL
+utils/run
View
@@ -10,4 +10,4 @@ Randall Leeds <randall@apache.org> <randall.leeds@gmail.com>
Paul Joseph Davis <davisp@apache.org> Paul J. Davis <davisp@apache.org>
-Bob Dionne <bitdiddle@apache.org> bitdiddle <bitdiddle@apache.org>
+Bob Dionne <bitdiddle@apache.org> bitdiddle <bitdiddle@apache.org>
View
@@ -1,6 +1,10 @@
before_install:
- - sudo apt-get update
- - sudo apt-get install libicu-dev libmozjs-dev
+ - sudo apt-get -y update
+ - sudo apt-get -y install libicu-dev libmozjs-dev pkg-config help2man
+ - sudo apt-get -y install libtool automake autoconf autoconf-archive
+ - sudo apt-get -y install texlive-latex-base texlive-latex-recommended
+ - sudo apt-get -y install texlive-latex-extra texlive-fonts-recommended texinfo
+ - sudo apt-get -y install python-pygments python-docutils python-sphinx
before_script: ./bootstrap && ./configure
script: make distcheck
language: erlang
View
@@ -43,74 +43,76 @@ EXTRA_DIST = \
NOTICE \
README \
THANKS \
+ build-aux/sphinx-build \
+ build-aux/sphinx-touch \
license.skip
-AUTHORS.gz: $(top_srcdir)/AUTHORS
- -gzip -9 < $< > $@
+AUTHORS.gz: AUTHORS
+ gzip -9 < $< > $@
-BUGS.gz: $(top_srcdir)/BUGS
- -gzip -9 < $< > $@
+BUGS.gz: BUGS
+ gzip -9 < $< > $@
-CHANGES.gz: $(top_srcdir)/CHANGES
- -gzip -9 < $< > $@
+CHANGES.gz: CHANGES
+ gzip -9 < $< > $@
-DEVELOPERS.gz: $(top_srcdir)/DEVELOPERS
- -gzip -9 < $< > $@
+DEVELOPERS.gz: DEVELOPERS
+ gzip -9 < $< > $@
-INSTALL.gz: $(top_srcdir)/INSTALL
- -gzip -9 < $< > $@
+INSTALL.gz: INSTALL
+ gzip -9 < $< > $@
-INSTALL.Unix.gz: $(top_srcdir)/INSTALL.Unix
- -gzip -9 < $< > $@
+INSTALL.Unix.gz: INSTALL.Unix
+ gzip -9 < $< > $@
-INSTALL.Windows.gz: $(top_srcdir)/INSTALL.Windows
- -gzip -9 < $< > $@
+INSTALL.Windows.gz: INSTALL.Windows
+ gzip -9 < $< > $@
-LICENSE.gz: $(top_srcdir)/LICENSE
- -gzip -9 < $< > $@
+LICENSE.gz: LICENSE
+ gzip -9 < $< > $@
-NEWS.gz: $(top_srcdir)/NEWS
- -gzip -9 < $< > $@
+NEWS.gz: NEWS
+ gzip -9 < $< > $@
-NOTICE.gz: $(top_srcdir)/NOTICE
- -gzip -9 < $< > $@
+NOTICE.gz: NOTICE
+ gzip -9 < $< > $@
-README.gz: $(top_srcdir)/README
- -gzip -9 < $< > $@
+README.gz: README
+ gzip -9 < $< > $@
-.PHONY: THANKS.gz
-THANKS.gz: $(top_srcdir)/THANKS
- @sed -e '/^#.*/d' $< > $(top_builddir)/THANKS.tmp
- @git shortlog -se 6c976bd..HEAD \
- | grep -v @apache.org \
- | sed -E 's/^[[:blank:]]{5}[[:digit:]]+[[:blank:]]/ * /' \
- >> $(top_builddir)/THANKS.tmp
- @echo '\nFor a list of authors see the `AUTHORS` file.\n' \
- >> $(top_builddir)/THANKS.tmp
- -gzip -9 < $(top_builddir)/THANKS.tmp > $@
- @rm $(top_builddir)/THANKS.tmp
+THANKS.gz: THANKS
+ gzip -9 < $< > $@
check: dev check-js
+if TESTS
$(top_builddir)/test/etap/run $(top_srcdir)/test/etap
+endif
check-js: dev
+if TESTS
if USE_CURL
$(top_builddir)/test/javascript/run
endif
+endif
check-etap: dev
+if TESTS
$(top_builddir)/test/etap/run $(top_srcdir)/test/etap
+endif
cover: dev
+if TESTS
rm -f cover/*.coverdata
COVER=1 COVER_BIN=./src/couchdb/ $(top_builddir)/test/etap/run
SRC=./src/couchdb/ \
$(ERL) -noshell \
- -pa src/etap \
- -eval 'etap_report:create()' \
+ -pa src/etap \
+ -eval 'etap_report:create()' \
-s init stop > /dev/null 2>&1
+endif
dev: all
+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."
@@ -120,6 +122,7 @@ dev: all
mkdir -p $(top_builddir)/tmp/lib
mkdir -p $(top_builddir)/tmp/log
mkdir -p $(top_builddir)/tmp/run/couchdb
+endif
install-data-hook:
@echo
@@ -151,14 +154,15 @@ dist-hook:
find $(top_builddir) -type f -name "._*" -exec rm -f {} \;
distcheck-hook:
+ $(MAKE) -C bin distcheck-hook
+ $(MAKE) -C src/couchdb/priv distcheck-hook
+ $(MAKE) -C share/doc/build distcheck-hook
grep -rL 'http://www.apache.org/licenses/LICENSE-2.0' * \
- | grep -vEf license.skip; \
+ | grep --include= -vEf license.skip; \
test "$$?" -eq 1
.PHONY: distsign
distsign: distcheck check
- @# @@ unpack archive and run diff -r to double check missing files
- @# @@ does automake have anything that does this?
gpg --armor --detach-sig $(GPG_ARGS) \
< $(top_srcdir)/$(distdir).tar.gz \
> $(top_srcdir)/$(distdir).tar.gz.asc
View
@@ -93,8 +93,7 @@ suggesting improvements or submitting changes. Some of these people are:
* Gavin McDonald <gmcdonald@apache.org>
* Fedor Indutny <fedor@indutny.com>
* Tim Blair
-# Dear committer who merges a commit from a non-committer:
-# You don't have to manually maintain the THANKS file anymore (yay!).
-# Non-committer authors get automatically appended to THANKS and
-# moved into THANKS.gz by `make`. This note will be stripped as well.
-# Authors from commit 6c976bd and onwards are auto-inserted.
+ * Tady Walsh <hello@tady.me>
+# Authors from commit 6c976bd and onwards are auto-inserted. If you are merging
+# a commit from a non-committer, you should not add an entry to this file. When
+# `bootstrap` is run, the actual THANKS file will be generated.
Oops, something went wrong.

0 comments on commit 719d2b6

Please sign in to comment.