Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 65497DEB5 for ; Thu, 6 Dec 2012 11:34:54 +0000 (UTC) Received: (qmail 15042 invoked by uid 500); 6 Dec 2012 11:34:48 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 14955 invoked by uid 500); 6 Dec 2012 11:34:48 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 14148 invoked by uid 99); 6 Dec 2012 11:34:41 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 11:34:41 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7557B8196DA; Thu, 6 Dec 2012 11:34:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: jan@apache.org To: commits@couchdb.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [4/50] [abbrv] git commit: Integrate Sphinx into autotools Message-Id: <20121206113440.7557B8196DA@tyr.zones.apache.org> Date: Thu, 6 Dec 2012 11:34:40 +0000 (UTC) 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 Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/956a57e6 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/956a57e6 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/956a57e6 Branch: refs/heads/1536-feature-add-docs Commit: 956a57e6b72c8c4759d36388f86bbce3ad375c1a Parents: 7f66e6f Author: Noah Slater Authored: Mon Dec 3 10:06:06 2012 +0100 Committer: Jan Lehnardt Committed: Thu Dec 6 12:31:05 2012 +0100 ---------------------------------------------------------------------- .gitignore | 144 ++++++------- .mailmap | 2 +- .travis.yml | 8 +- Makefile.am | 80 ++++---- THANKS | 100 --------- THANKS.in | 99 +++++++++ bin/Makefile.am | 81 +++++--- bootstrap | 84 ++++++-- build-aux/dist-error | 28 +++ build-aux/sphinx-build | 67 ++++++ build-aux/sphinx-touch | 24 ++ configure.ac | 390 ++++++++++++++++++++++++--------- license.skip | 76 ++++--- m4/ac_check_curl.m4.gz | Bin 944 -> 0 bytes m4/ac_check_icu.m4.gz | Bin 956 -> 0 bytes m4/pkg.m4.gz | Bin 2202 -> 0 bytes share/Makefile.am | 2 + share/doc/Makefile.am | 14 ++ share/doc/build/Makefile.am | 323 +++++++++++++++++++++++++++ src/couch_mrview/Makefile.am | 2 + src/couch_replicator/Makefile.am | 2 + src/couchdb/priv/Makefile.am | 51 ++++- test/etap/Makefile.am | 1 + 23 files changed, 1157 insertions(+), 421 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index e60aedd..d3217db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,67 +1,71 @@ +!.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 @@ -69,52 +73,36 @@ 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 http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/.mailmap ---------------------------------------------------------------------- diff --git a/.mailmap b/.mailmap index 31f59e1..a51c763 100644 --- a/.mailmap +++ b/.mailmap @@ -10,4 +10,4 @@ Randall Leeds Paul Joseph Davis Paul J. Davis -Bob Dionne bitdiddle \ No newline at end of file +Bob Dionne bitdiddle http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index 29d14a3..ba6eee8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/Makefile.am ---------------------------------------------------------------------- diff --git a/Makefile.am b/Makefile.am index d6836d2..afeea73 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/THANKS ---------------------------------------------------------------------- diff --git a/THANKS b/THANKS deleted file mode 100644 index 6217c94..0000000 --- a/THANKS +++ /dev/null @@ -1,100 +0,0 @@ -Apache CouchDB THANKS -===================== - -A number of people have contributed to Apache CouchDB by reporting problems, -suggesting improvements or submitting changes. Some of these people are: - - * William Beh - * Dirk Schalge - * Roger Leigh - * Sam Ruby - * Carlos Valiente - * Till Klampaeckel - * Jim Lindley - * Yoan Blanc - * Michael Gottesman - * Mark Baran - * Michael Hendricks - * Antony Blakey - * Paul Carey - * Hunter Morris - * Brian Palmer - * Maximillian Dornseif - * Eric Casteleijn - * Maarten Thibaut - * Florian Ebeling - * Volker Mische - * Brian Candler - * Brad Anderson - * Nick Gerakines - * Kevin Ilchmann Jørgensen - * Dirkjan Ochtman - * Sebastian Cohnen - * Sven Helmberger - * Dan Walters - * Curt Arnold - * Gustavo Niemeyer - * Joshua Bronson - * Kostis Sagonas - * Matthew Hooker - * Ilia Cheishvili - * Lena Herrmann - * Jack Moffit - * Damjan Georgievski - * Jan Kassens - * James Marca - * Matt Goodall - * Joel Clark - * Matt Lyon - * mikeal - * Joscha Feth - * Jarrod Roberson - * Jae Kwon - * Gavin Sherry - * Timothy Smith - * Martin Haaß - * Hans Ulrich Niedermann - * Dmitry Unkovsky - * Zachary Zolton - * Brian Jenkins - * Paul Bonser - * Caleb Land - * Juhani Ränkimies - * Kev Jackson - * Jonathan D. Knezek - * David Rose - * Lim Yue Chuan - * David Davis - * Klaus Trainer - * Juuso Väänänen - * Jeff Zellner - * Benjamin Young - * Gabriel Farrell - * Mike Leddy - * Wayne Conrad - * Thomas Vander Stichele - * Felix Hummel - * Tim Smith - * Dipesh Patel - * Sam Bisbee - * Nathan Vander Wilt - * Caolan McMahon - * Andrey Somov - * Chris Coulson - * Trond Norbye - * Alexander Shorin - * Christopher Bonhage - * Christian Carter - * Lukasz Mielicki - * Omar Yasin - * Simon Leblanc - * Rogutės Sparnuotos - * Gavin McDonald - * Fedor Indutny - * 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. http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/THANKS.in ---------------------------------------------------------------------- diff --git a/THANKS.in b/THANKS.in new file mode 100644 index 0000000..4ebf3f0 --- /dev/null +++ b/THANKS.in @@ -0,0 +1,99 @@ +Apache CouchDB THANKS +===================== + +A number of people have contributed to Apache CouchDB by reporting problems, +suggesting improvements or submitting changes. Some of these people are: + + * William Beh + * Dirk Schalge + * Roger Leigh + * Sam Ruby + * Carlos Valiente + * Till Klampaeckel + * Jim Lindley + * Yoan Blanc + * Michael Gottesman + * Mark Baran + * Michael Hendricks + * Antony Blakey + * Paul Carey + * Hunter Morris + * Brian Palmer + * Maximillian Dornseif + * Eric Casteleijn + * Maarten Thibaut + * Florian Ebeling + * Volker Mische + * Brian Candler + * Brad Anderson + * Nick Gerakines + * Kevin Ilchmann Jørgensen + * Dirkjan Ochtman + * Sebastian Cohnen + * Sven Helmberger + * Dan Walters + * Curt Arnold + * Gustavo Niemeyer + * Joshua Bronson + * Kostis Sagonas + * Matthew Hooker + * Ilia Cheishvili + * Lena Herrmann + * Jack Moffit + * Damjan Georgievski + * Jan Kassens + * James Marca + * Matt Goodall + * Joel Clark + * Matt Lyon + * mikeal + * Joscha Feth + * Jarrod Roberson + * Jae Kwon + * Gavin Sherry + * Timothy Smith + * Martin Haaß + * Hans Ulrich Niedermann + * Dmitry Unkovsky + * Zachary Zolton + * Brian Jenkins + * Paul Bonser + * Caleb Land + * Juhani Ränkimies + * Kev Jackson + * Jonathan D. Knezek + * David Rose + * Lim Yue Chuan + * David Davis + * Klaus Trainer + * Juuso Väänänen + * Jeff Zellner + * Benjamin Young + * Gabriel Farrell + * Mike Leddy + * Wayne Conrad + * Thomas Vander Stichele + * Felix Hummel + * Tim Smith + * Dipesh Patel + * Sam Bisbee + * Nathan Vander Wilt + * Caolan McMahon + * Andrey Somov + * Chris Coulson + * Trond Norbye + * Alexander Shorin + * Christopher Bonhage + * Christian Carter + * Lukasz Mielicki + * Omar Yasin + * Simon Leblanc + * Rogutės Sparnuotos + * Gavin McDonald + * Fedor Indutny + * Tim Blair + * Tady Walsh +# 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. http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/bin/Makefile.am ---------------------------------------------------------------------- diff --git a/bin/Makefile.am b/bin/Makefile.am index f391154..d666bbd 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -16,13 +16,23 @@ else bin_SCRIPTS = couchdb couch-config endif +man1dir = $(mandir)/man1 + noinst_SCRIPTS = couchjs_dev couch-config_dev -if HELP2MAN -dist_man1_MANS = couchdb.1 +man_file = couchdb.1 + +if BUILD_MAN +man_file_build = $(man_file) +else +man_file_build = endif -CLEANFILES = $(bin_SCRIPTS) $(dist_man1_MANS) $(noinst_SCRIPTS) +BUILT_SOURCES = $(man_file_build) + +EXTRA_DIST = $(man_file_build) + +CLEANFILES = $(bin_SCRIPTS) $(man_file_build) $(noinst_SCRIPTS) transform = @program_transform_name@ couchdb_command_name = `echo couchdb | sed '$(transform)'` @@ -67,16 +77,16 @@ couch-config: couch-config.tpl -e "s|%bindir%|@bindir@|g" \ -e "s|%localerlanglibdir%|@localerlanglibdir@|g" \ -e "s|%localconfdir%|@localconfdir@|g" \ - -e "s|%localdatadir%|$(localdatadir)|g" \ - -e "s|%localbuilddatadir%|$(localdatadir)|g" \ + -e "s|%localdatadir%|$(localdatadir)|g" \ + -e "s|%localbuilddatadir%|$(localdatadir)|g" \ -e "s|%localstatelogdir%|@localstatelogdir@|g" \ -e "s|%localstatelibdir%|@localstatelibdir@|g" \ -e "s|%localstatedir%|@localstatedir@|g" \ -e "s|%localstaterundir%|@localstaterundir@|g" \ - -e "s|%couchlibdir%|@localerlanglibdir@/couch-%version%|g"\ - -e "s|%couchincludedir%|@localerlanglibdir@/include|g"\ - -e "s|%couchebindir%|@localerlanglibdir@/ebin|g"\ - -e "s|%couchprivlibdir%|@localerlanglibdir@/couch-%version%/priv/lib|g"\ + -e "s|%couchlibdir%|@localerlanglibdir@/couch-%version%|g"\ + -e "s|%couchincludedir%|@localerlanglibdir@/include|g"\ + -e "s|%couchebindir%|@localerlanglibdir@/ebin|g"\ + -e "s|%couchprivlibdir%|@localerlanglibdir@/couch-%version%/priv/lib|g"\ -e "s|%bug_uri%|@bug_uri@|g" \ -e "s|%package_author_address%|@package_author_address@|g" \ -e "s|%package_author_name%|@package_author_name@|g" \ @@ -90,17 +100,17 @@ couch-config_dev: couch-config.tpl sed -e "s|%ERL%|$(ERL)|g" \ -e "s|%bindir%|$(abs_top_builddir)/bin|g" \ -e "s|%localerlanglibdir%|$(abs_top_builddir)\/src\/couchdb|g" \ - -e "s|%couchlibdir%|$(abs_top_builddir)\/src\/couchdb|g"\ - -e "s|%couchincludedir%|$(abs_top_builddir)\/src\/couchdb|g"\ - -e "s|%couchebindir%|$(abs_top_builddir)\/src\/couchdb|g"\ - -e "s|%couchprivlibdir%|$(abs_top_builddir)/src/couchdb/priv/.libs|g"\ - -e "s|%localdatadir%|$(abs_top_srcdir)/share|g" \ - -e "s|%localbuilddatadir%|$(abs_top_builddir)/share|g" \ + -e "s|%couchlibdir%|$(abs_top_builddir)\/src\/couchdb|g"\ + -e "s|%couchincludedir%|$(abs_top_builddir)\/src\/couchdb|g"\ + -e "s|%couchebindir%|$(abs_top_builddir)\/src\/couchdb|g"\ + -e "s|%couchprivlibdir%|$(abs_top_builddir)/src/couchdb/priv/.libs|g"\ + -e "s|%localdatadir%|$(abs_top_srcdir)/share|g" \ + -e "s|%localbuilddatadir%|$(abs_top_builddir)/share|g" \ -e "s|%localstatelibdir%|$(abs_top_builddir)/tmp/lib|g" \ -e "s|%localstatelogdir%|$(abs_top_builddir)/tmp/log|g" \ - -e "s|%localstatedir%|$(abs_top_builddir)/tmp|g" \ + -e "s|%localstatedir%|$(abs_top_builddir)/tmp|g" \ -e "s|%localstaterundir%|$(abs_top_builddir)/tmp/run|g" \ - -e "s|%bug_uri%|@bug_uri@|g" \ + -e "s|%bug_uri%|@bug_uri@|g" \ -e "s|%package_author_address%|@package_author_address@|g" \ -e "s|%package_author_name%|@package_author_name@|g" \ -e "s|%package_name%|@package_name@|g" \ @@ -109,17 +119,34 @@ couch-config_dev: couch-config.tpl $@ < $< chmod +x $@ +# Depend on source files so distributed man pages are not rebuilt for end user. -HELP2MAN_OPTION=--no-info --help-option="-h" --version-option="-V" +$(man_file): couchdb.tpl.in + $(MAKE) -f Makefile couchdb; \ + $(top_srcdir)/build-aux/missing --run \ + help2man \ + --no-info \ + --help-option="-h" \ + --version-option="-V" \ + --name="$(package_name) database server" \ + ./couchdb --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 -# XXX: Because the scripts are made at build time for the user we need to -# XXX: depend on the original templates so as not to cause the rebuilding of -# XXX: the man pages. +uninstall-local: + rm -f $(DESTDIR)$(man1dir)/$(man_file) -couchdb.1: couchdb.tpl.in - touch $@ - if test -x "$(HELP2MAN_EXECUTABLE)"; then \ - $(MAKE) -f Makefile couchdb; \ - $(HELP2MAN_EXECUTABLE) $(HELP2MAN_OPTION) \ - --name="Apache CouchDB database server" ./couchdb --output $@; \ +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 http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/bootstrap ---------------------------------------------------------------------- diff --git a/bootstrap b/bootstrap index 4af3936..b7c949a 100755 --- a/bootstrap +++ b/bootstrap @@ -12,6 +12,8 @@ # License for the specific language governing permissions and limitations under # the License. +cd `dirname $0` + get () { variable_name=$1 echo "changequote(\`[', \`]')" > acinclude.m4.tmp @@ -29,32 +31,26 @@ get () { rm -f acinclude.m4.tmp } -mkdir -p build-aux - if test -z "$REVISION"; then if test -d .git; then REVISION=`git describe --always`-git - else - # default to svn - REVISION=`\`which svn\` info . 2> /dev/null | awk "/Revision:/{print \\$2}"` fi fi + if test -z "`get LOCAL_VERSION_STAGE`" -o -z "$REVISION"; then sed "s/%release%//" < acinclude.m4.in > acinclude.m4 else sed "s/%release%/$REVISION/" < acinclude.m4.in > acinclude.m4 fi -gunzip -c m4/ac_check_icu.m4.gz > m4/ac_check_icu.m4 -gunzip -c m4/ac_check_curl.m4.gz > m4/ac_check_curl.m4 -gunzip -c m4/pkg.m4.gz > m4/pkg.m4 +if test -d .git; then + sed -e "/^#.*/d" THANKS.in > THANKS + git shortlog -se 6c976bd..HEAD \ + | grep -v @apache.org \ + | sed -E "s/^[[:blank:]]{5}[[:digit:]]+[[:blank:]]/ * /" >> THANKS + echo "\nFor a list of authors see the \`AUTHORS\` file." >> THANKS +fi -# Seach a list of names for the first occurence of a program. -# Some systems may use aclocal-1.10, others may have aclocal etc. -# -# Exit with status code 0 if the program exists (and print the -# path to stdout), exit with status code 1 if it can't be -# located find_program() { set +e for f in "$@" @@ -68,8 +64,9 @@ find_program() { fi done - echo "Failed to locate required program:" 1>&2 - echo "\t$@" 1>&2 + echo "Unable to find any variant: $@" 1>&2 + echo 1>&2 + echo "Have you installed a version of this package?" 1>&2 set -e exit 1 } @@ -80,16 +77,63 @@ AUTOHEADER=`find_program autoheader` AUTOMAKE=`find_program automake-1.11 automake-1.10 automake-1.9 automake` AUTOCONF=`find_program autoconf` +get_aclocal_dir_list () { + aclocal_dir=`$ACLOCAL --print-ac-dir` + echo $aclocal_dir + aclocal_dirlist="$aclocal_dir/dirlist" + if test -e $aclocal_dirlist; then + cat $aclocal_dirlist | while read dir; do + if test -d "$dir"; then + echo $dir + fi + done + fi +} + +aclocal_dir_list=`get_aclocal_dir_list` + +if test -z "`find $aclocal_dir_list -name ax_check_icu.m4`"; then + echo "Unable to find the \`ax_check_icu.m4' file." + echo + echo "Have you installed GNU Autoconf Archive?" + exit 1 +fi + +if test -z "`find $aclocal_dir_list -name ax_lib_curl.m4`"; then + echo "Unable to find the \`ax_check_icu.m4' file." + echo + echo "Have you installed GNU Autoconf Archive?" + exit 1 +fi + +if test -z "`find $aclocal_dir_list -name pkg.m4`"; then + echo "Unable to find the \`pkg.m4' file." + echo + echo "Have you installed pkg-config?" + exit 1 +fi + + +mkdir -p build-aux +mkdir -p m4 + ${LIBTOOLIZE} -f -c --automake -${ACLOCAL} -I m4 +${ACLOCAL} -I m4 -Wall ${AUTOHEADER} -f -${AUTOMAKE} -f -a 2>&1 | sed -e "/install/d" -${AUTOCONF} -f +${AUTOMAKE} -f -a -Wall +${AUTOCONF} -f -Wall + +rm -f INSTALL ln -f -s "`dirname \`readlink build-aux/missing\``/INSTALL" +if test ! -s INSTALL; then + echo "Broken INSTALL file." + exit 1 +fi + cat << EOF You have bootstrapped Apache CouchDB, time to relax. Run \`./configure' to configure the source before you install. -EOF +EOF \ No newline at end of file http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/build-aux/dist-error ---------------------------------------------------------------------- diff --git a/build-aux/dist-error b/build-aux/dist-error new file mode 100755 index 0000000..73486b5 --- /dev/null +++ b/build-aux/dist-error @@ -0,0 +1,28 @@ +#!/bin/sh -e + +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +# This script is called by the build system and is used to provide an error +# about missing or empty files. Some files are optional, and will be built when +# the environment allows. But these files are required for distribution. + +cat << EOF +ERROR: This file is missing or incomplete: + + $1 + + This file is optional at build and install time, + but is required when preparing a distribution. +EOF + +exit 1 http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/build-aux/sphinx-build ---------------------------------------------------------------------- diff --git a/build-aux/sphinx-build b/build-aux/sphinx-build new file mode 100755 index 0000000..87120f9 --- /dev/null +++ b/build-aux/sphinx-build @@ -0,0 +1,67 @@ +#!/bin/sh -e + +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +# This script is called by the build system and is used to call sphinx-build if +# is is available, or alternatively, emit a warning, and perform a no-op. Any +# required directories or Makefiles are created and stubbed out as appropriate. + +if test -z "`which sphinx-build`"; then + missing=yes + cat << EOF +WARNING: 'sphinx-build' is needed, and is missing on your system. + You might have modified some files without having the + proper tools for further handling them. +EOF +fi + +if test "$2" = "texinfo"; then + if test -z "`which makeinfo`"; then + missing=yes + cat << EOF +WARNING: 'makeinfo' is needed, and is missing on your system. + You might have modified some files without having the + proper tools for further handling them. +EOF + fi + if test "$missing" != "yes"; then + sphinx-build $* + else + mkdir -p texinfo + echo "info:" > texinfo/Makefile + fi +fi + +if test "$2" = "latex"; then + if test -z "`which pdflatex`"; then + missing=yes + cat << EOF +WARNING: 'pdflatex' is needed, and is missing on your system. + You might have modified some files without having the + proper tools for further handling them. +EOF + fi + if test "$missing" != "yes"; then + sphinx-build $* + else + mkdir -p latex + echo "all-pdf:" > latex/Makefile + fi +fi +if test "$2" = "html"; then + if test "$missing" != "yes"; then + sphinx-build $* + else + mkdir -p html + fi +fi http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/build-aux/sphinx-touch ---------------------------------------------------------------------- diff --git a/build-aux/sphinx-touch b/build-aux/sphinx-touch new file mode 100755 index 0000000..ed7217d --- /dev/null +++ b/build-aux/sphinx-touch @@ -0,0 +1,24 @@ +#!/bin/sh -e + +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +# This script is called by the build system and is used to touch the list of +# expected output files when sphinx-build is not available. If the files exist, +# this will satisfy make. If they do not exist, we create of empty files. + +if test -z "`which sphinx-build`"; then + for file in $*; do + mkdir -p `dirname $file` + touch $file + done +fi \ No newline at end of file http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 3c0e231..5246830 100644 --- a/configure.ac +++ b/configure.ac @@ -10,27 +10,30 @@ dnl WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the dnl License for the specific language governing permissions and limitations dnl under the License. -AC_INIT([LOCAL_PACKAGE_NAME], [LOCAL_VERSION], [LOCAL_BUG_URI], +AC_INIT( + [LOCAL_PACKAGE_NAME], + [LOCAL_VERSION], + [LOCAL_BUG_URI], [LOCAL_PACKAGE_TARNAME]) -AC_PREREQ([2.59]) +AC_PREREQ([2.68]) AC_CONFIG_SRCDIR([CHANGES]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) -AM_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([src/snappy/google-snappy/config.h]) AM_INIT_AUTOMAKE([1.6.3 foreign]) -AC_GNU_SOURCE +AC_USE_SYSTEM_EXTENSIONS AC_ENABLE_SHARED AC_DISABLE_STATIC AC_PROG_CC LT_INIT([win32-dll]) -AC_PROG_LIBTOOL +LT_INIT AC_PROG_LN_S PKG_PROG_PKG_CONFIG @@ -48,32 +51,36 @@ AC_CHECK_FUNC([mmap]) AC_MSG_CHECKING([if the compiler supports __builtin_expect]) -AC_TRY_COMPILE(, [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return __builtin_expect(1, 1) ? 1 : 0 -], [ +]])],[ snappy_have_builtin_expect=yes AC_MSG_RESULT([yes]) -], [ +],[ snappy_have_builtin_expect=no AC_MSG_RESULT([no]) ]) + if test x$snappy_have_builtin_expect = xyes ; then - AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], [Define to 1 if the compiler supports __builtin_expect.]) + AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], + [Define to 1 if the compiler supports __builtin_expect.]) fi AC_MSG_CHECKING([if the compiler supports __builtin_ctzll]) -AC_TRY_COMPILE(, [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return (__builtin_ctzll(0x100000000LL) == 32) ? 1 : 0 -], [ +]])],[ snappy_have_builtin_ctz=yes AC_MSG_RESULT([yes]) -], [ +],[ snappy_have_builtin_ctz=no AC_MSG_RESULT([no]) ]) + if test x$snappy_have_builtin_ctz = xyes ; then - AC_DEFINE([HAVE_BUILTIN_CTZ], [1], [Define to 1 if the compiler supports __builtin_ctz and friends.]) + AC_DEFINE([HAVE_BUILTIN_CTZ], [1], + [Define to 1 if the compiler supports __builtin_ctz and friends.]) fi if test "$ac_cv_header_stdint_h" = "yes"; then @@ -94,16 +101,18 @@ SNAPPY_PATCHLEVEL="snappy_patchlevel" AC_SUBST([SNAPPY_MAJOR]) AC_SUBST([SNAPPY_MINOR]) AC_SUBST([SNAPPY_PATCHLEVEL]) -dnl End of google snappy specific config AC_MSG_CHECKING([for pthread_create in -lpthread]) original_LIBS="$LIBS" LIBS="-lpthread $original_LIBS" -AC_TRY_LINK([#include], - [pthread_create((void *)0, (void *)0, (void *)0, (void *)0)], - [pthread=yes], [pthread=no]) +AC_LINK_IFELSE([ + AC_LANG_PROGRAM( + [[#include]], + [[pthread_create((void *)0, (void *)0, (void *)0, (void *)0)]])], + [pthread=yes], + [pthread=no]) if test x${pthread} = xyes; then AC_MSG_RESULT([yes]) @@ -113,28 +122,32 @@ else fi AC_PATH_PROG([ERL], [erl]) + AS_IF([test x${ERL} = x], [ AC_MSG_ERROR([Could not find the `erl' executable. Is Erlang installed?]) - ]) +]) -AC_ARG_WITH([erlang], [AC_HELP_STRING([--with-erlang=PATH], - [set PATH to the Erlang include directory])], [ +AC_ARG_WITH([erlang], + [AS_HELP_STRING([--with-erlang=PATH], + [set PATH to the Erlang include directory]) +], [ ERLANG_FLAGS="-I$withval" ], [ realerl=`readlink -f $ERL 2>/dev/null` AS_IF([test $? -eq 0], [ - erlbase=`dirname $realerl` - erlbase=`dirname $erlbase` - ERLANG_FLAGS="-I${erlbase}/usr/include" - ], [ - # Failed to figure out where erl is installed.. - # try to add some default directories to search - ERLANG_FLAGS="-I${libdir}/erlang/usr/include" - ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/lib/erlang/usr/include" - ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/local/lib/erlang/usr/include" - ERLANG_FLAGS="$ERLANG_FLAGS -I/opt/local/lib/erlang/usr/include" - ]) + erlbase=`dirname $realerl` + erlbase=`dirname $erlbase` + ERLANG_FLAGS="-I${erlbase}/usr/include" + ], [ + # Failed to figure out where erl is installed.. + # try to add some default directories to search + ERLANG_FLAGS="-I${libdir}/erlang/usr/include" + ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/lib/erlang/usr/include" + ERLANG_FLAGS="$ERLANG_FLAGS -I/usr/local/lib/erlang/usr/include" + ERLANG_FLAGS="$ERLANG_FLAGS -I/opt/local/lib/erlang/usr/include" + ]) ]) + AC_SUBST(ERLANG_FLAGS) PKG_CHECK_MODULES([JS], [mozjs185], [ @@ -152,30 +165,35 @@ PKG_CHECK_MODULES([JS], [mozjs185], [ ]) ]) -AC_ARG_WITH([js-include], [AC_HELP_STRING([--with-js-include=PATH], - [set PATH to the SpiderMonkey include directory])], [ +AC_ARG_WITH([js-include], + [AS_HELP_STRING([--with-js-include=PATH], + [set PATH to the SpiderMonkey include directory]) +], [ JS_INCLUDE="$withval" JS_CFLAGS="-I$JS_INCLUDE" ], []) -AC_ARG_WITH([js-lib], [AC_HELP_STRING([--with-js-lib=PATH], - [set PATH to the SpiderMonkey library directory])], - [ +AC_ARG_WITH([js-lib], + [AS_HELP_STRING([--with-js-lib=PATH], + [set PATH to the SpiderMonkey library directory]) +], [ JS_LIB_DIR=$withval JS_LIBS="-L$withval" ], []) use_js_trunk=no -AC_ARG_ENABLE([js-trunk], [AC_HELP_STRING([--enable-js-trunk], - [allow use of SpiderMonkey versions newer than js185-1.0.0])], [ + +AC_ARG_ENABLE([js-trunk], + [AS_HELP_STRING([--enable-js-trunk], + [allow use of SpiderMonkey versions newer than js185-1.0.0]) +], [ use_js_trunk=$enableval ], []) AC_ARG_VAR([ERLC_FLAGS], [general flags to prepend to ERLC_FLAGS]) AC_ARG_VAR([FLAGS], [general flags to prepend to LDFLAGS and CPPFLAGS]) -AS_CASE([$(uname -s)], - [CYGWIN*], [] , - [*], [ + +AS_CASE([$(uname -s)], [CYGWIN*], [] , [*], [ CPPFLAGS="$CPPFLAGS -I/opt/local/include" CPPFLAGS="$CPPFLAGS -I/opt/local/include/js" CPPFLAGS="$CPPFLAGS -I/usr/local/include" @@ -185,6 +203,7 @@ AS_CASE([$(uname -s)], LDFLAGS="$LDFLAGS -L/opt/local/lib" LDFLAGS="$LDFLAGS -L/usr/local/lib" ]) + CPPFLAGS="$CPPFLAGS $FLAGS" LDFLAGS="$LDFLAGS $FLAGS" @@ -194,33 +213,31 @@ CFLAGS="-O2 $CFLAGS" LIBS="$LIBS $LDFLAGS" -AS_CASE([$(uname -s)], - [CYGWIN*], [ - JS_CFLAGS="-DXP_WIN $JS_CFLAGS" - IS_WINDOWS="TRUE" - ] , - [*], [ - # XP_UNIX required for jsapi.h and has been tested to work on Linux and Darwin. - JS_CFLAGS="-DXP_UNIX $JS_CFLAGS" +AS_CASE([$(uname -s)], [CYGWIN*], [ + JS_CFLAGS="-DXP_WIN $JS_CFLAGS" + IS_WINDOWS="TRUE" +], [*], [ + # XP_UNIX required for jsapi.h, tested on Linux and Darwin. + JS_CFLAGS="-DXP_UNIX $JS_CFLAGS" ]) AM_CONDITIONAL([WINDOWS], [test x$IS_WINDOWS = xTRUE]) OLD_LIBS="$LIBS" LIBS="$JS_LIBS $LIBS" + OLD_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$JS_CFLAGS $CPPFLAGS" AC_CHECK_HEADER([jsapi.h], [], [ - AC_CHECK_HEADER([js/jsapi.h], - [ + AC_CHECK_HEADER([js/jsapi.h], [ CPPFLAGS="$CPPFLAGS -I$JS_INCLUDE/js" - ], - [ - AC_MSG_ERROR([Could not find the jsapi header. + ], [ + AC_MSG_ERROR([Could not find the jsapi header. Are the Mozilla SpiderMonkey headers installed?]) - ])]) + ]) +]) AC_CHECK_LIB([mozjs185], [JS_NewContext], [JS_LIB_BASE=mozjs185], [ AC_CHECK_LIB([mozjs185-1.0], [JS_NewContext], [JS_LIB_BASE=mozjs185-1.0], [ @@ -230,13 +247,18 @@ AC_CHECK_LIB([mozjs185], [JS_NewContext], [JS_LIB_BASE=mozjs185], [ AC_CHECK_LIB([js32], [JS_NewContext], [JS_LIB_BASE=js32], [ AC_MSG_ERROR([Could not find the js library. -Is the Mozilla SpiderMonkey library installed?])])])])])])]) +Is the Mozilla SpiderMonkey library installed?]) + ]) + ]) + ]) + ]) + ]) +]) # Figure out what version of SpiderMonkey to use AC_CHECK_LIB([$JS_LIB_BASE], [JS_NewCompartmentAndGlobalObject], # Prevent people from accidentally using SpiderMonkey's that are too new - if test "$use_js_trunk" = "no"; then AC_CHECK_DECL([JSOPTION_ANONFUNFIX], [], [ AC_MSG_ERROR([Your SpiderMonkey library is too new. @@ -246,23 +268,27 @@ enforcement of preventing anonymous functions in a statement context. This will most likely break your existing JavaScript code as well as render all example code invalid. -If you wish to ignore this error pass --enable-js-trunk to ./configure.])], - [[#include ]]) +If you wish to ignore this error pass --enable-js-trunk to ./configure.]) + ], [ + [#include ] + ]) fi - AC_DEFINE([SM185], [1], - [Use SpiderMonkey 1.8.5])) + AC_DEFINE([SM185], [1], [Use SpiderMonkey 1.8.5]) +) AC_CHECK_LIB([$JS_LIB_BASE], [JS_ThrowStopIteration], AC_DEFINE([SM180], [1], - [Use SpiderMonkey 1.8.0])) + [Use SpiderMonkey 1.8.0]) +) AC_CHECK_LIB([$JS_LIB_BASE], [JS_GetStringCharsAndLength], AC_DEFINE([HAVE_JS_GET_STRING_CHARS_AND_LENGTH], [1], - [Use newer JS_GetCharsAndLength function.])) + [Use newer JS_GetCharsAndLength function.]) +) # Else, hope that 1.7.0 works -# Deal with JSScript -> JSObject -> JSScript switcheroo +# Deal with JSScript to JSObject to JSScript switcheroo AC_CHECK_TYPE([JSScript*], [AC_DEFINE([JSSCRIPT_TYPE], [JSScript*], [Use JSObject* for scripts])], @@ -273,9 +299,7 @@ AC_CHECK_TYPE([JSScript*], AC_DEFINE([COUCHJS_NAME], ["couchjs"], ["CouchJS executable name."]) if test x${IS_WINDOWS} = xTRUE; then - AC_DEFINE([COUCHJS_NAME], ["couchjs.exe"], ["CouchJS executable name."]) - if test -f "$JS_LIB_DIR/$JS_LIB_BASE.dll"; then # seamonkey 1.7- build layout on Windows JS_LIB_BINARY="$JS_LIB_DIR/$JS_LIB_BASE.dll" @@ -288,50 +312,53 @@ if test x${IS_WINDOWS} = xTRUE; then fi fi AC_SUBST(JS_LIB_BINARY) - # On windows we need to know the path to the openssl binaries. - AC_ARG_WITH([openssl-bin-dir], [AC_HELP_STRING([--with-openssl-bin-dir=PATH], - [path to the open ssl binaries for distribution on Windows])], [ + AC_ARG_WITH([openssl-bin-dir], + [AS_HELP_STRING([--with-openssl-bin-dir=PATH], + [path to the open ssl binaries for distribution on Windows]) + ], [ openssl_bin_dir=`cygpath -m "$withval"` AC_SUBST(openssl_bin_dir) ], []) - # Windows uses Inno setup - look for its compiler. AC_PATH_PROG([INNO_COMPILER_EXECUTABLE], [iscc]) if test x${INNO_COMPILER_EXECUTABLE} = x; then AC_MSG_WARN([You will be unable to build the Windows installer.]) fi - # We need the msvc redistributables for this platform too # (in theory we could just install the assembly locally - but # there are at least 4 directories with binaries, meaning 4 copies; # so using the redist .exe means it ends up installed globally...) - AC_ARG_WITH([msvc-redist-dir], [AC_HELP_STRING([--with-msvc-redist-dir=PATH], - [path to the msvc redistributables for the Windows platform])], [ + AC_ARG_WITH([msvc-redist-dir], + [AS_HELP_STRING([--with-msvc-redist-dir=PATH], + [path to the msvc redistributables for the Windows platform]) + ], [ msvc_redist_dir=`cygpath -m "$withval"` msvc_redist_name="vcredist_x86.exe" AC_SUBST(msvc_redist_dir) AC_SUBST(msvc_redist_name) ], []) if test ! -f ${msvc_redist_dir}/${msvc_redist_name}; then - AC_MSG_WARN([The MSVC redistributable seems to be missing; expect the installer to fail.]) + AC_MSG_WARN([Installer may fail due to missing MSVC redistributable.]) fi fi JS_LIBS="-l$JS_LIB_BASE -lm $JS_LIBS" + AC_SUBST(JS_LIBS) LIBS="$OLD_LIBS" CPPFLAGS="$OLD_CPPFLAGS" - -AC_ARG_WITH([win32-icu-binaries], [AC_HELP_STRING([--with-win32-icu-binaries=PATH], - [set PATH to the Win32 native ICU binaries directory])], [ +AC_ARG_WITH([win32-icu-binaries], + [AS_HELP_STRING([--with-win32-icu-binaries=PATH], + [set PATH to the Win32 native ICU binaries directory]) +], [ ICU_CPPFLAGS="-I$withval/include" ICU_LIBS="-L$withval/lib -licuuc -licudt -licuin" ICU_BIN=$withval/bin ], [ - AC_CHECK_ICU([3.4.1]) + AX_CHECK_ICU([3.4.1]) ICU_BIN= ]) @@ -341,16 +368,20 @@ AC_SUBST(ICU_LIBS) AC_SUBST(ICU_BIN) use_curl=yes -AC_ARG_WITH([win32-curl], [AC_HELP_STRING([--with-win32-curl=PATH], - [set PATH to the Win32 native curl directory])], [ + +AC_ARG_WITH([win32-curl], + [AS_HELP_STRING([--with-win32-curl=PATH], + [set PATH to the Win32 native curl directory]) +], [ # default build on windows is a static lib, and that's what we want too CURL_CFLAGS="-I$withval/include -DCURL_STATICLIB" CURL_LIBS="-L$withval/lib -llibcurl -lWs2_32 -lkernel32 -luser32 -ladvapi32 -lWldap32" # OpenSSL libraries may be pulled in via libcurl if it was built with SSL # these are libeay32 ssleay32 instead of crypto ssl on unix ], [ - AC_CHECK_CURL([7.18.0], - [AC_DEFINE([HAVE_CURL], [1], ["Provide HTTP support to couchjs"])], [ + AX_LIB_CURL([7.18.0],[ + AC_DEFINE([HAVE_CURL], [1], ["Provide HTTP support to couchjs"]) + ],[ AC_MSG_WARN([You will be unable to run some JavaScript unit tests.]) use_curl=no CURL_LIBS= @@ -392,56 +423,97 @@ if test `echo $version | ${AWK} "{print \\$2}"` -eq 7; then fi fi -otp_release="`${ERL} -noshell -eval 'io:put_chars(erlang:system_info(otp_release)).' -s erlang halt`" +otp_release="`\ + ${ERL} -noshell \ + -eval 'io:put_chars(erlang:system_info(otp_release)).' \ + -s erlang halt`" + AC_SUBST(otp_release) + AM_CONDITIONAL([USE_OTP_NIFS], [test x$otp_release \> xR13B03]) AM_CONDITIONAL([USE_EJSON_COMPARE_NIF], [test x$otp_release \> xR14B03]) -has_crypto=`${ERL} -eval "case application:load(crypto) of ok -> ok; _ -> exit(no_crypto) end." -noshell -s init stop` +has_crypto=`\ + ${ERL} -eval "\ + case application:load(crypto) of ok -> ok; _ -> exit(no_crypto) end. \ + " -noshell -s init stop` if test -n "$has_crypto"; then - AC_MSG_ERROR([Could not find the Erlang crypto library. Has Erlang been compiled with OpenSSL support?]) + AC_MSG_ERROR([Could not find the Erlang crypto library. + +Has Erlang been compiled with OpenSSL support?]) fi AC_PATH_PROG([ERLC], [erlc]) if test x${ERLC} = x; then - AC_MSG_ERROR([Could not find the `erlc' executable. Is Erlang installed?]) + AC_MSG_ERROR([Could not find the `erlc' executable. + +Is Erlang installed?]) fi OLD_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$ERLANG_FLAGS $CPPFLAGS" + AC_CHECK_HEADER([erl_driver.h], [], [ AC_MSG_ERROR([Could not find the `erl_driver.h' header. -Are the Erlang headers installed? Use the `--with-erlang' option to specify the -path to the Erlang include directory.])]) -CPPFLAGS="$OLD_CPPFLAGS" +Are the Erlang headers installed? -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 the `--with-erlang' option to specify the Erlang include directory.]) +]) + +CPPFLAGS="$OLD_CPPFLAGS" use_init=yes use_launchd=yes native_mochijson_enabled=no +tests_enabled=yes +docs_enabled=yes +strictness_enabled=no -AC_ARG_ENABLE([init], [AC_HELP_STRING([--disable-init], - [don't install init script where applicable])], [ +AC_ARG_ENABLE([init], + [AS_HELP_STRING([--disable-init], + [don't install init script where applicable]) +], [ use_init=$enableval ], []) -AC_ARG_ENABLE([launchd], [AC_HELP_STRING([--disable-launchd], - [don't install launchd configuration where applicable])], [ +AC_ARG_ENABLE([launchd], + [AS_HELP_STRING([--disable-launchd], + [don't install launchd configuration where applicable]) +], [ use_launchd=$enableval ], []) -AC_ARG_ENABLE([native-mochijson], [AC_HELP_STRING([--enable-native-mochijson], - [compile mochijson to native code (EXPERIMENTAL)])], [ +AC_ARG_ENABLE([native-mochijson], + [AS_HELP_STRING([--enable-native-mochijson], + [compile mochijson to native code (EXPERIMENTAL)]) +], [ native_mochijson_enabled=$enableval ], []) +AC_ARG_ENABLE([tests], + [AS_HELP_STRING([--disable-tests], + [skip tests during build]) +], [ + tests_enabled=$enableval +], []) + +AC_ARG_ENABLE([docs], + [AS_HELP_STRING([--disable-docs], + [skip docs during build]) +], [ + docs_enabled=$enableval +], []) + +AC_ARG_ENABLE([strictness], + [AS_HELP_STRING([--enable-strictness], + [exit when optional checks fail]) +], [ + strictness_enabled=$enableval +], []) + init_enabled=false launchd_enabled=false @@ -474,26 +546,122 @@ 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_CHECK_PROG([HAS_HELP2MAN], [help2man], [yes]) + +if test x${HAS_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 man pages.]) + fi +fi + +AC_CHECK_PROG([HAS_PDFLATEX], [pdflatex], [yes]) + +if test x${HAS_PDFLATEX} = x; then + if test x${strictness_enabled} = xyes; then + AC_MSG_ERROR([Could not find the `pdflatex' executable. + +Is LaTeX installed?]) + else + AC_MSG_WARN([You will be unable to regenerate PDF documentation.]) + fi +fi + +AC_CHECK_PROG([HAS_MAKEINFO], [makeinfo], [yes]) + +if test x${HAS_MAKEINFO} = x; then + if test x${strictness_enabled} = xyes; then + AC_MSG_ERROR([Could not find the `makeinfo' executable. + +Is GNU Texinfo installed?]) + else + AC_MSG_WARN([You will be unable to regenerate info documentation.]) + fi +fi + +AC_CHECK_PROG([HAS_INSTALLINFO], [install-info], [yes]) -if test -n "$HELP2MAN_EXECUTABLE"; then - help2man_enabled=true +if test x${HAS_INSTALLINFO} = x; then + if test x${strictness_enabled} = xyes; then + AC_MSG_ERROR([Could not find the `install-info' executable. + +Is GNU Texinfo installed?]) + else + AC_MSG_WARN([You will be unable to install info documentation.]) + fi +fi + +AC_CHECK_PROG([HAS_SPHINX_BUILD], [sphinx-build], [yes]) + +if test x${HAS_SPHINX_BUILD} = x; then + if test x${strictness_enabled} = xyes; then + AC_MSG_ERROR([Could not find the `sphinx-build' executable.]) + else + AC_MSG_WARN([You will be unable to regenerate documentation.]) + fi +fi + +if test x${docs_enabled} = xyes; then + if test x${HAS_HELP2MAN} = xyes; then + build_man=yes + fi + if test x${HAS_SPHINX_BUILD} = xyes; then + build_html=yes + if test x${HAS_MAKEINFO} = xyes; then + build_info=yes + fi + if test x${HAS_PDFLATEX} = xyes; then + build_pdf=yes + fi + fi +fi + +if test x${strictness_enabled} = xyes; then + AX_PYTHON_MODULE([pygments], [fatal]) +else + AX_PYTHON_MODULE([pygments]) +fi + +AC_MSG_CHECKING(pygments version >= 1.5) + +python 2> /dev/null << EOF +import sys +import pygments + +if float(pygments.__version__) >= 1.5: + sys.exit(0) +else: + sys.exit(1) +EOF + +if test $? -eq 0; then + AC_MSG_RESULT(yes) else - if test -f "$srcdir/bin/couchdb.1" -a -f "$srcdir/src/couchdb/priv/couchjs.1"; then - help2man_enabled=true + AC_MSG_RESULT(no) + if test x${strictness_enabled} = xyes; then + AC_MSG_ERROR([Your copy of pygments is out of date.], 1) else - help2man_enabled=false + AC_MSG_WARN([Syntax highlighting may not work.]) 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([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([BUILD_MAN], [test x${build_man} = xyes]) +AM_CONDITIONAL([BUILD_INFO], [test x${build_info} = xyes]) +AM_CONDITIONAL([BUILD_PDF], [test x${build_pdf} = xyes]) +AM_CONDITIONAL([BUILD_HTML], [test x${build_html} = xyes]) + +AM_CONDITIONAL([TESTS], [test x${tests_enabled} = xyes]) +AM_CONDITIONAL([STRICTNESS], [test x${strictness_enabled} = xyes]) + AC_SUBST([package_author_name], ["LOCAL_PACKAGE_AUTHOR_NAME"]) AC_SUBST([package_author_address], ["LOCAL_PACKAGE_AUTHOR_ADDRESS"]) AC_SUBST([package_identifier], ["LOCAL_PACKAGE_IDENTIFIER"]) @@ -549,6 +717,8 @@ AC_CONFIG_FILES([etc/logrotate.d/Makefile]) AC_CONFIG_FILES([etc/windows/Makefile]) AC_CONFIG_FILES([etc/Makefile]) AC_CONFIG_FILES([share/Makefile]) +AC_CONFIG_FILES([share/doc/Makefile]) +AC_CONFIG_FILES([share/doc/build/Makefile]) AC_CONFIG_FILES([src/Makefile]) AC_CONFIG_FILES([src/couch_index/Makefile]) AC_CONFIG_FILES([src/couch_mrview/Makefile]) @@ -581,14 +751,18 @@ AC_OUTPUT # identifies this dastardly mix as a unix variant, and libtool kindly # passes incorrect flags and names through to the MS linker. The simplest fix # is to modify libtool via sed to remove those options. +# # As this is only done once at first configure, and subsequent config or source # changes may trigger a silent reversion to the non-functioning original. +# # Changes are; +# # 1. replace LIB$name with $name in libname_spec (e.g. libicu -> icu) to ensure # correct windows versions of .lib and .dlls are found or generated. # 2. remove incompatible \w-link\w from archive_cmds # 3. remove GNU-style directives to be passed through to the linker # 4. swap GNU-style shared library flags with MS -dll variant +# # This obscene hackery is tracked under COUCHDB-440 and COUCHDB-1197. if test x${IS_WINDOWS} = xTRUE; then http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/license.skip ---------------------------------------------------------------------- diff --git a/license.skip b/license.skip index 8ee890f..98c0c78 100644 --- a/license.skip +++ b/license.skip @@ -1,4 +1,4 @@ -\.svn +^.*.DS_Store ^AUTHORS ^BUGS ^CHANGES @@ -18,26 +18,26 @@ ^README ^THANKS ^aclocal.m4 -^apache-couchdb-* -^autom4te.cache/* +^apache-couchdb-.* +^autom4te.cache/.* ^bin/Makefile ^bin/Makefile.in ^bin/couchdb.1 ^bin/couchjs.1 -^build-aux/* -^config.* +^build-aux/.* +^config..* ^configure ^couchdb.stderr ^couchdb.stdout -^cover/.*\.coverdata -^cover/.*\.html +^cover/.*.coverdata +^cover/.*.html ^erl_crash.dump ^etc/Makefile ^etc/Makefile.in ^etc/couchdb/Makefile ^etc/couchdb/Makefile.in -^etc/couchdb/default* -^etc/couchdb/local* +^etc/couchdb/default.* +^etc/couchdb/local.* ^etc/default/Makefile ^etc/default/Makefile.in ^etc/default/couchdb @@ -45,78 +45,82 @@ ^etc/init/Makefile.in ^etc/launchd/Makefile ^etc/launchd/Makefile.in -^etc/launchd/org.apache.couchdb.plist.* +^etc/launchd/org.apache.couchdb.plist ^etc/logrotate.d/Makefile ^etc/logrotate.d/Makefile.in -^etc/logrotate.d/couchdb* +^etc/logrotate.d/couchdb.* ^etc/windows/Makefile ^etc/windows/README.txt.tpl ^libtool ^license.skip -^m4/* +^m4/.* ^share/Makefile ^share/Makefile.in +^share/doc/Makefile +^share/doc/Makefile.in +^share/doc/build/.* +^share/doc/images/.* +^share/doc/static/rtd.css ^share/server/json2.js ^share/server/mimeparse.js ^share/server/coffee-script.js ^share/www/favicon.ico -^share/www/image/* -^share/www/script/jquery.* +^share/www/image/.* +^share/www/script/jquery..* ^share/www/script/json2.js -^share/www/script/jspec/* +^share/www/script/jspec/.* ^share/www/script/sha1.js ^share/www/script/base64.js -^share/www/script/test/lorem* +^share/www/script/test/lorem.* ^share/www/style/jquery-ui-1.8.11.custom.css ^src/Makefile ^src/Makefile.in ^src/couch_index/Makefile ^src/couch_index/Makefile.in -^src/couch_index/ebin/.*beam +^src/couch_index/ebin/.*.beam ^src/couch_mrview/Makefile ^src/couch_mrview/Makefile.in -^src/couch_mrview/ebin/.*beam +^src/couch_mrview/ebin/.*.beam ^src/couch_replicator/Makefile ^src/couch_replicator/Makefile.in -^src/couch_replicator/ebin/.*beam -^src/couchdb/.*beam -^src/couchdb/.deps/* +^src/couch_replicator/ebin/.*.beam +^src/couchdb/.*.beam +^src/couchdb/.deps/.* ^src/couchdb/Makefile ^src/couchdb/Makefile.in -^src/couchdb/couch.app* -^src/couchdb/couch.app.tpl.in -^src/couchdb/priv/.*o -^src/couchdb/priv/.deps/* +^src/couchdb/couch.app.* +^src/couchdb/priv/.*.o +^src/couchdb/priv/.deps/.* ^src/couchdb/priv/Makefile ^src/couchdb/priv/Makefile.in ^src/couchdb/priv/couch_icu_driver.la ^src/couchdb/priv/couchjs ^src/couchdb/priv/couchspawnkillable ^src/couchdb/priv/stat_descriptions.cfg -^src/erlang-oauth/* -^src/ejson/* -^src/etap/* -^src/ibrowse/* -^src/mochiweb/* -^src/snappy/* +^src/erlang-oauth/.* +^src/ejson/.* +^src/etap/.* +^src/ibrowse/.* +^src/mochiweb/.* +^src/snappy/.* ^stamp-h1 ^test/Makefile ^test/Makefile.in ^test/bench/Makefile ^test/bench/Makefile.in -^test/etap/.*beam -^test/etap/.*\.o -^test/etap/.deps/* +^test/etap/.*.beam +^test/etap/.*.o +^test/etap/.deps/.* ^test/etap/test_cfg_register ^test/etap/Makefile ^test/etap/Makefile.in -^test/etap/temp.* +^test/etap/temp..* ^test/javascript/Makefile ^test/javascript/Makefile.in ^test/local.ini ^test/view_server/Makefile ^test/view_server/Makefile.in -^tmp/* +^tmp/.* ^utils/Makefile ^utils/Makefile.in ^var/Makefile http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/m4/ac_check_curl.m4.gz ---------------------------------------------------------------------- diff --git a/m4/ac_check_curl.m4.gz b/m4/ac_check_curl.m4.gz deleted file mode 100644 index 020e646..0000000 Binary files a/m4/ac_check_curl.m4.gz and /dev/null differ http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/m4/ac_check_icu.m4.gz ---------------------------------------------------------------------- diff --git a/m4/ac_check_icu.m4.gz b/m4/ac_check_icu.m4.gz deleted file mode 100644 index 8af50ff..0000000 Binary files a/m4/ac_check_icu.m4.gz and /dev/null differ http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/m4/pkg.m4.gz ---------------------------------------------------------------------- diff --git a/m4/pkg.m4.gz b/m4/pkg.m4.gz deleted file mode 100644 index 08b9e6b..0000000 Binary files a/m4/pkg.m4.gz and /dev/null differ http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/share/Makefile.am ---------------------------------------------------------------------- diff --git a/share/Makefile.am b/share/Makefile.am index aa73b6b..31373ee 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -10,6 +10,8 @@ ## License for the specific language governing permissions and limitations under ## the License. +SUBDIRS = doc + JS_FILE = server/main.js JS_FILE_COMPONENTS = \ http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/share/doc/Makefile.am ---------------------------------------------------------------------- diff --git a/share/doc/Makefile.am b/share/doc/Makefile.am new file mode 100644 index 0000000..34b41a0 --- /dev/null +++ b/share/doc/Makefile.am @@ -0,0 +1,14 @@ +## Licensed under the Apache License, Version 2.0 (the "License"); you may not +## use this file except in compliance with the License. You may obtain a copy of +## the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +## License for the specific language governing permissions and limitations under +## the License. + +SUBDIRS = build + http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/share/doc/build/Makefile.am ---------------------------------------------------------------------- diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am new file mode 100644 index 0000000..5346d8c --- /dev/null +++ b/share/doc/build/Makefile.am @@ -0,0 +1,323 @@ +## Licensed under the Apache License, Version 2.0 (the "License"); you may not +## use this file except in compliance with the License. You may obtain a copy of +## the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +## License for the specific language governing permissions and limitations under +## the License. + +SPHINXOPTS = \ + -d doctrees \ + -n -c $(srcdir)/../src \ \ + -A local=1 \ + $(srcdir)/../src + +info_file_dist = texinfo/CouchDB.info + +info_file_inst = CouchDB + +if BUILD_INFO +info_file_build = $(info_file_dist) +else +info_file_build = +endif + +pdf_file_dist = latex/CouchDB.pdf.gz + +pdf_file_inst = CouchDB.pdf.gz + +if BUILD_PDF +pdf_file_build = $(pdf_file_dist) +else +pdf_file_build = +endif + +# Please keep lists of rst and related generated files sorted + +html_files = \ + html/_images/futon-createdb.png \ + html/_images/futon-editdoc.png \ + html/_images/futon-editeddoc.png \ + html/_images/futon-overview.png \ + html/_images/futon-replform.png \ + html/_sources/api/authn.txt \ + html/_sources/api/configuration.txt \ + html/_sources/api/database.txt \ + html/_sources/api/dbmaint.txt \ + html/_sources/api/design.txt \ + html/_sources/api/documents.txt \ + html/_sources/api/local.txt \ + html/_sources/api/misc.txt \ + html/_sources/api/reference.txt \ + html/_sources/api-basics.txt \ + html/_sources/changelog.txt \ + html/_sources/changes.txt \ + html/_sources/commonjs.txt \ + html/_sources/config_reference.txt \ + html/_sources/configuring.txt \ + html/_sources/ddocs.txt \ + html/_sources/errors.txt \ + html/_sources/http-proxying.txt \ + html/_sources/index.txt \ + html/_sources/intro.txt \ + html/_sources/json-structure.txt \ + html/_sources/os-daemons.txt \ + html/_sources/pretty_urls.txt \ + html/_sources/query-servers.txt \ + html/_sources/range.txt \ + html/_sources/release.txt \ + html/_sources/replication.txt \ + html/_sources/ssl.txt \ + html/_static/ajax-loader.gif \ + html/_static/basic.css \ + html/_static/comment-bright.png \ + html/_static/comment-close.png \ + html/_static/comment.png \ + html/_static/default.css \ + html/_static/doctools.js \ + html/_static/down-pressed.png \ + html/_static/down.png \ + html/_static/favicon.ico \ + html/_static/file.png \ + html/_static/jquery.js \ + html/_static/logo.png \ + html/_static/minus.png \ + html/_static/plus.png \ + html/_static/pygments.css \ + html/_static/rtd.css \ + html/_static/searchtools.js \ + html/_static/sidebar.js \ + html/_static/underscore.js \ + html/_static/up-pressed.png \ + html/_static/up.png \ + html/_static/websupport.js \ + html/api/authn.html \ + html/api/configuration.html \ + html/api/database.html \ + html/api/dbmaint.html \ + html/api/design.html \ + html/api/documents.html \ + html/api/local.html \ + html/api/misc.html \ + html/api/reference.html \ + html/api-basics.html \ + html/changelog.html \ + html/changes.html \ + html/commonjs.html \ + html/config_reference.html \ + html/configuring.html \ + html/ddocs.html \ + html/errors.html \ + html/http-proxying.html \ + html/index.html \ + html/intro.html \ + html/json-structure.html \ + html/os-daemons.html \ + html/pretty_urls.html \ + html/query-servers.html \ + html/range.html \ + html/release.html \ + html/replication.html \ + html/ssl.html \ + html/objects.inv \ + html/genindex.html \ + html/search.html \ + html/searchindex.js + +if BUILD_HTML +html_files_build = $(html_files) +else +html_files_build = +endif + +image_files = \ + ../images/epub-icon.png \ + ../images/favicon.ico \ + ../images/futon-createdb.png \ + ../images/futon-editdoc.png \ + ../images/futon-editeddoc.png \ + ../images/futon-overview.png \ + ../images/futon-replform.png \ + ../images/logo.png + +src_files = \ + ../src/api/authn.rst \ + ../src/api/configuration.rst \ + ../src/api/database.rst \ + ../src/api/dbmaint.rst \ + ../src/api/design.rst \ + ../src/api/documents.rst \ + ../src/api/local.rst \ + ../src/api/misc.rst \ + ../src/api/reference.rst \ + ../src/api-basics.rst \ + ../src/changelog.rst \ + ../src/changes.rst \ + ../src/commonjs.rst \ + ../src/config_reference.rst \ + ../src/configuring.rst \ + ../src/ddocs.rst \ + ../src/errors.rst \ + ../src/http-proxying.rst \ + ../src/index.rst \ + ../src/intro.rst \ + ../src/json-structure.rst \ + ../src/os-daemons.rst \ + ../src/pretty_urls.rst \ + ../src/query-servers.rst \ + ../src/range.rst \ + ../src/release.rst \ + ../src/replication.rst \ + ../src/ssl.rst \ + ../src/conf.py + +src_files_html = \ + ../static/rtd.css \ + ../templates/help.html \ + ../templates/searchbox.html \ + ../templates/utilities.html + +EXTRA_DIST = \ + $(image_files) \ + $(src_files) \ + $(src_files_html) \ + $(info_file_build) \ + $(pdf_file_build) \ + $(html_files_build) + +BUILT_SOURCES = \ + $(info_file_build) \ + $(pdf_file_build) \ + $(html_files_build) + +$(pdf_file_dist): pdf + +$(html_files): html + +$(info_file_dist): info.stamp + @if test -f $@; then :; else \ + rm -f info.stamp; \ + $(MAKE) $(AM_MAKEFLAGS) info.stamp; \ + fi + +info.stamp: $(image_files) $(src_files) + @rm -f info.tmp + @touch info.tmp + $(top_srcdir)/build-aux/sphinx-build \ + -b texinfo $(SPHINXOPTS) $(builddir)/texinfo + $(MAKE) -C texinfo info + $(top_srcdir)/build-aux/sphinx-touch $(info_file_dist) + @mv -f info.tmp $@ + +$(pdf_file_dist): pdf.stamp + @if test -f $@; then :; else \ + rm -f pdf.stamp; \ + $(MAKE) $(AM_MAKEFLAGS) pdf.stamp; \ + fi + +pdf.stamp: $(image_files) $(src_files) + @rm -f pdf.tmp + @touch pdf.tmp + $(top_srcdir)/build-aux/sphinx-build \ + -b latex $(SPHINXOPTS) $(builddir)/latex + $(MAKE) -C latex all-pdf + $(top_srcdir)/build-aux/sphinx-touch latex/CouchDB.pdf + gzip -9 < latex/CouchDB.pdf > $(pdf_file_dist) + @mv -f pdf.tmp $@ + +$(html_files): html.stamp + @if test -f $@; then :; else \ + rm -f html.stamp; \ + $(MAKE) $(AM_MAKEFLAGS) html.stamp; \ + fi + +html.stamp: $(image_files) $(src_files) $(src_files_html) + @rm -f html.tmp + @touch html.tmp + $(top_srcdir)/build-aux/sphinx-build \ + -b html $(SPHINXOPTS) $(builddir)/html + $(top_srcdir)/build-aux/sphinx-touch $(html_files) + @mv -f html.tmp $@ + +pdf-local: + $(MAKE) $(AM_MAKEFLAGS) pdf.stamp + +html-local: + $(MAKE) $(AM_MAKEFLAGS) html.stamp + +install-data-local: + if test -s $(info_file_dist); then \ + $(INSTALL) -d $(DESTDIR)$(infodir); \ + $(INSTALL_DATA) \ + $(info_file_dist) $(DESTDIR)$(infodir)/$(info_file_inst); \ + if test -n "`which install-info`"; then \ + install-info \ + $(DESTDIR)$(infodir)/$(info_file_inst) \ + $(DESTDIR)$(infodir)/dir \ + || true; \ + fi \ + fi + if test -s $(pdf_file_dist); then \ + $(INSTALL) -d $(DESTDIR)$(localdocdir); \ + $(INSTALL_DATA) \ + $(pdf_file_dist) $(DESTDIR)$(localdocdir)/$(pdf_file_inst); \ + fi + for dist_file in $(html_files); do \ + if test -s $$dist_file; then \ + inst_file=`echo $$dist_file | sed s,^html,docs,`; \ + $(INSTALL) -d `dirname $(DESTDIR)$(localdatadir)/www/$$inst_file`; \ + $(INSTALL_DATA) \ + $$dist_file $(DESTDIR)$(localdatadir)/www/$$inst_file; \ + fi \ + done + +uninstall-local: + rm -f $(DESTDIR)$(infodir)/$(info_file_inst) + if test -d $(DESTDIR)$(infodir); then \ + if test -n "`which install-info`"; then\ + install-info \ + --delete \ + $(DESTDIR)$(infodir)/$(info_file_inst) \ + $(DESTDIR)$(infodir)/dir \ + || true; \ + fi \ + fi + rm -f $(DESTDIR)$(localdocdir)/$(pdf_file_inst) + for dist_file in $(html_files); do \ + if test -s $$dist_file; then \ + inst_file=`echo $$dist_file | sed s,^html,docs,`; \ + rm -f $(DESTDIR)$(localdatadir)/www/$$inst_file; \ + fi \ + done + +DISTCLEANFILES = \ + info.stamp \ + pdf.stamp \ + html.stamp + +distclean-local: + rm -fr doctrees + rm -fr html + rm -fr latex + rm -fr texinfo + +# We handle exit code manually. Please fix if there is a better way. +distcheck-hook: + if test ! -s $(info_file_dist); then \ + $(top_srcdir)/build-aux/dist-error $(info_file_dist); \ + fi + if test ! -s $(pdf_file_dist); then \ + $(top_srcdir)/build-aux/dist-error $(pdf_file_dist); \ + fi + exit_code=0; \ + for file in $(html_files); do \ + if test ! -s $$file; then \ + exit_code=1; \ + $(top_srcdir)/build-aux/dist-error $$file || break; \ + fi \ + done; \ + exit $$exit_code; http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/src/couch_mrview/Makefile.am ---------------------------------------------------------------------- diff --git a/src/couch_mrview/Makefile.am b/src/couch_mrview/Makefile.am index b544cb7..2b9ef86 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/ http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/src/couch_replicator/Makefile.am ---------------------------------------------------------------------- diff --git a/src/couch_replicator/Makefile.am b/src/couch_replicator/Makefile.am index 746a62f..71d3702 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/ http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/src/couchdb/priv/Makefile.am ---------------------------------------------------------------------- diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am index 704e870..8fce9d0 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 http://git-wip-us.apache.org/repos/asf/couchdb/blob/956a57e6/test/etap/Makefile.am ---------------------------------------------------------------------- diff --git a/test/etap/Makefile.am b/test/etap/Makefile.am index 957d1a1..e13737f 100644 --- a/test/etap/Makefile.am +++ b/test/etap/Makefile.am @@ -26,6 +26,7 @@ run: run.tpl $@ < $< chmod +x $@ +# @@ wildcards are NOT portable, please replace with clean-local rules CLEANFILES = run *.beam DISTCLEANFILES = temp.*