couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [31/50] couchdb commit: updated refs/heads/developer-preview-2.0 to 2a31bca
Date Wed, 22 Jul 2015 05:29:48 GMT
Add --infodir --mandir --docdir --htmldir --pdfdir.

Also copy docs into these dirs on make install.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c1e69c57
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c1e69c57
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c1e69c57

Branch: refs/heads/developer-preview-2.0
Commit: c1e69c5757aaa47ddb857e19a1bd68d974d77414
Parents: b335877
Author: Jan Lehnardt <jan@apache.org>
Authored: Wed Jun 24 21:03:11 2015 +0200
Committer: Jan Lehnardt <jan@apache.org>
Committed: Wed Jun 24 23:07:47 2015 +0200

----------------------------------------------------------------------
 Makefile                     |  48 ++++++++-----
 configure                    | 116 +++++++++++++++++++++++++++++---
 test/build/test-configure.sh | 138 ++++++++++++++++++++++++++++++--------
 3 files changed, 245 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c1e69c57/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 23970f6..ecf8205 100644
--- a/Makefile
+++ b/Makefile
@@ -56,26 +56,33 @@ dist: all
 release:
 	@./build-aux/couchdb-build-release.sh $(COUCHDB_VERSION)
 
-	# build fauxton
-	$(MAKE) fauxton
-	cp -r share/www apache-couchdb-$(COUCHDB_VERSION)/share/
-
-	# build docs
-	cd src/docs; $(MAKE)
-	mkdir apache-couchdb-$(COUCHDB_VERSION)/share/docs
-	cp -r src/docs/build/html apache-couchdb-$(COUCHDB_VERSION)/share/docs/html
-
-	# Tar!
-	tar czf apache-couchdb-$(COUCHDB_VERSION).tar.gz apache-couchdb-$(COUCHDB_VERSION)
-	echo "Done: apache-couchdb-$(COUCHDB_VERSION).tar.gz"
+# build fauxton
+	@$(MAKE) fauxton
+	@cp -r share/www apache-couchdb-$(COUCHDB_VERSION)/share/
+
+# build docs
+	@cd src/docs; $(MAKE)
+	@mkdir -p apache-couchdb-$(COUCHDB_VERSION)/share/docs/html
+	@cp -r src/docs/build/html apache-couchdb-$(COUCHDB_VERSION)/share/docs/html
+	@mkdir -p apache-couchdb-$(COUCHDB_VERSION)/share/docs/pdf
+	@cp src/docs/build/latex/CouchDB.pdf apache-couchdb-$(COUCHDB_VERSION)/share/docs/pdf/
+
+	@mkdir -p apache-couchdb-$(COUCHDB_VERSION)/share/docs/man
+	@cp src/docs/build/man/apachecouchdb.1 apache-couchdb-$(COUCHDB_VERSION)/share/docs/man/
+	@mkdir -p apache-couchdb-$(COUCHDB_VERSION)/share/docs/info
+	@cp src/docs/build/texinfo/CouchDB.info apache-couchdb-$(COUCHDB_VERSION)/share/docs/info/
+
+# Tar!
+	@tar czf apache-couchdb-$(COUCHDB_VERSION).tar.gz apache-couchdb-$(COUCHDB_VERSION)
+	@echo "Done: apache-couchdb-$(COUCHDB_VERSION).tar.gz"
 
 distclean: clean
 	@rm -f install.mk
 	@rm -f config.erl
 	@rm -f rel/couchdb.config
 ifneq ($(IN_RELEASE), true)
-	# when we are in a release, don’t delete the
-	# copied sources, generated docs, or fauxton
+# when we are in a release, don’t delete the
+# copied sources, generated docs, or fauxton
 	@rm -rf rel/couchdb
 	@rm -rf share/www
 	@rm -rf src/docs
@@ -117,10 +124,15 @@ install: all
 	@mkdir -p $(DESTDIR)/$(data_dir)
 	@cp -R share/server share/www $(DESTDIR)/$(data_dir)
 
-	# TODO: copy over man, pdf, info etc. files
-	#       after including them in the release tarball in `make release`
-	#@mkdir -p $(DESTDIR)/$(doc_dir)
-	#@cp -R
+	@mkdir -p $(DESTDIR)/$(doc_dir)
+	@mkdir -p $(DESTDIR)/$(html_dir)
+	@mkdir -p $(DESTDIR)/$(pdf_dir)
+	@mkdir -p $(DESTDIR)/$(man_dir)
+	@mkdir -p $(DESTDIR)/$(info_dir)
+	@cp -R share/docs/html $(DESTDIR)/$(html_dir)/html
+	@cp share/docs/pdf/CouchDB.pdf $(DESTDIR)/$(pdf_dir)/CouchDB.pdf
+	@cp share/docs/info/CouchDB.info $(DESTDIR)/$(info_dir)/CouchDB.info
+	@cp share/docs/man/apachecouchdb.1 $(DESTDIR)/$(man_dir)/couchdb.1
 
 	@echo "...done"
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c1e69c57/configure
----------------------------------------------------------------------
diff --git a/configure b/configure
index da198df..da71444 100755
--- a/configure
+++ b/configure
@@ -28,9 +28,15 @@ DATAROOTDIR=
 DATADIR=
 LOCALSTATEDIR=
 RUNSTATEDIR=
-DOCDIR=
 LIBDIR=
 
+INFODIR=
+MANDIR=
+DOCDIR=
+
+HTMLDIR=
+PDFDIR=
+
 DATABASEDIR=
 VIEWDIR=
 LOGDIR=
@@ -67,13 +73,13 @@ Options:
     --libdir=DIR            object code libraries [EPREFIX/lib]
     --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
     --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-    # --infodir=DIR           info documentation [DATAROOTDIR/info]
-    # --mandir=DIR            man documentation [DATAROOTDIR/man]
-    # --docdir=DIR            documentation root [DATAROOTDIR/doc/apache-couchdb]
-    # --htmldir=DIR           html documentation [DOCDIR]
-    # --dvidir=DIR            dvi documentation [DOCDIR]
-    # --pdfdir=DIR            pdf documentation [DOCDIR]
-    # --psdir=DIR             ps documentation [DOCDIR]
+    --infodir=DIR           info documentation [DATAROOTDIR/info]
+    --mandir=DIR            man documentation [DATAROOTDIR/man]
+    --docdir=DIR            documentation root [DATAROOTDIR/doc/apache-couchdb]
+    --htmldir=DIR           html documentation [DOCDIR]
+    --dvidir=DIR            dvi documentation [DOCDIR]
+    --pdfdir=DIR            pdf documentation [DOCDIR]
+    --psdir=DIR             ps documentation [DOCDIR]
 EOF
 }
 
@@ -295,6 +301,42 @@ parse_opts() {
                 exit 1
                 ;;
 
+            --mandir)
+                if [ -n "$2" ]; then
+                    eval MANDIR=$2
+                    shift 2
+                    continue
+                else
+                    printf 'ERROR: "--mandir" requires a non-empty argument.\n' >&2
+                    exit 1
+                fi
+                ;;
+            --mandir=?*)
+                eval MANDIR=${1#*=}
+                ;;
+            --mandir=)
+                printf 'ERROR: "--mandir" requires a non-empty argument.\n' >&2
+                exit 1
+                ;;
+
+            --infodir)
+                if [ -n "$2" ]; then
+                    eval INFODIR=$2
+                    shift 2
+                    continue
+                else
+                    printf 'ERROR: "--infodir" requires a non-empty argument.\n' >&2
+                    exit 1
+                fi
+                ;;
+            --infodir=?*)
+                eval INFODIR=${1#*=}
+                ;;
+            --infodir=)
+                printf 'ERROR: "--infodir" requires a non-empty argument.\n' >&2
+                exit 1
+                ;;
+
             --libdir)
                 if [ -n "$2" ]; then
                     eval LIBDIR=$2
@@ -367,6 +409,42 @@ parse_opts() {
                 exit 1
                 ;;
 
+            --htmldir)
+                if [ -n "$2" ]; then
+                    eval HTMLDIR=$2
+                    shift 2
+                    continue
+                else
+                    printf 'ERROR: "--htmldir" requires a non-empty argument.\n' >&2
+                    exit 1
+                fi
+                ;;
+            --htmldir=?*)
+                eval HTMLDIR=${1#*=}
+                ;;
+            --htmldir=)
+                printf 'ERROR: "--htmldir" requires a non-empty argument.\n' >&2
+                exit 1
+                ;;
+
+            --pdfdir)
+                if [ -n "$2" ]; then
+                    eval PDFDIR=$2
+                    shift 2
+                    continue
+                else
+                    printf 'ERROR: "--pdfdir" requires a non-empty argument.\n' >&2
+                    exit 1
+                fi
+                ;;
+            --pdfdir=?*)
+                eval PDFDIR=${1#*=}
+                ;;
+            --pdfdir=)
+                printf 'ERROR: "--pdfdir" requires a non-empty argument.\n' >&2
+                exit 1
+                ;;
+
             --) # End of options
                 shift
                 break
@@ -410,7 +488,13 @@ parse_opts() {
         RUNSTATEDIR="$LOCALSTATEDIR/run";
     fi
     if test -z "$DOCDIR"; then
-        DOCDIR="$DATAROOTDIR/doc";
+        DOCDIR="$DATAROOTDIR/doc/apache-couchdb";
+    fi
+    if test -z "$INFODIR"; then
+        INFODIR="$DATAROOTDIR/info";
+    fi
+    if test -z "$MANDIR"; then
+        MANDIR="$DATAROOTDIR/man";
     fi
     if test -z "$LIBDIR"; then
         LIBDIR="$EXEC_PREFIX/lib";
@@ -424,6 +508,12 @@ parse_opts() {
     if test -z "$LOGDIR"; then
         LOGDIR="$LOCALSTATEDIR/log";
     fi
+    if test -z "$HTMLDIR"; then
+        HTMLDIR="$DOCDIR/html";
+    fi
+    if test -z "$PDFDIR"; then
+        PDFDIR="$DOCDIR/pdf";
+    fi
 }
 
 parse_opts $@
@@ -433,7 +523,7 @@ parse_opts $@
 if [ "$TEST" = "1" ]; then
     echo $PREFIX $EXEC_PREFIX $BINDIR $LIBEXECDIR $SYSCONFDIR $DATAROOTDIR \
          $DATADIR $LOCALSTATEDIR $RUNSTATEDIR $DOCDIR $LIBDIR $DATABASEDIR \
-         $VIEWDIR $LOGDIR
+         $VIEWDIR $LOGDIR $MANDIR $INFODIR $HTMLDIR $PDFDIR
     exit 0
 fi
 
@@ -497,6 +587,12 @@ data_dir = $DATADIR/couchdb
 database_dir = $DATABASEDIR
 view_index_dir = $VIEWDIR
 log_file = $LOG_FILE
+
+html_dir = $HTMLDIR
+pdf_dir = $PDFDIR
+man_dir = $MANDIR
+info_dir = $INFODIR
+
 user = $COUCHDB_USER
 EOF
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c1e69c57/test/build/test-configure.sh
----------------------------------------------------------------------
diff --git a/test/build/test-configure.sh b/test/build/test-configure.sh
index 2be0953..b83f633 100755
--- a/test/build/test-configure.sh
+++ b/test/build/test-configure.sh
@@ -52,13 +52,13 @@ fi
 CMD="./configure --test "
 
 test_defaults() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /usr/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
     RESULT=`$CMD`
     assertEquals "test defaults" "$EXPECT" "$RESULT"
 }
 
 test_prefix() {
-    EXPECT="/opt/local /opt/local /opt/local/bin /opt/local/libexec /opt/local/etc /opt/local/share
/opt/local/share /opt/local/var /opt/local/var/run /opt/local/share/doc /opt/local/lib /opt/local/var/lib
/opt/local/var/lib /opt/local/var/log"
+    EXPECT="/opt/local /opt/local /opt/local/bin /opt/local/libexec /opt/local/etc /opt/local/share
/opt/local/share /opt/local/var /opt/local/var/run /opt/local/share/doc/apache-couchdb /opt/local/lib
/opt/local/var/lib /opt/local/var/lib /opt/local/var/log /opt/local/share/man /opt/local/share/info
/opt/local/share/doc/apache-couchdb/html /opt/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --prefix=/opt/local`
     assertEquals "test prefix" "$EXPECT" "$RESULT"
@@ -79,7 +79,7 @@ test_prefix_error() {
 
 
 test_exec_prefix() {
-    EXPECT="/usr/local /opt/local /opt/local/bin /opt/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /opt/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /opt/local /opt/local/bin /opt/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /opt/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --exec-prefix=/opt/local`
     assertEquals "test exec_prefix" "$EXPECT" "$RESULT"
@@ -89,7 +89,7 @@ test_exec_prefix() {
 }
 
 test_exec_prefix_eval() {
-    EXPECT="/horse/local /horse/local /horse/local/bin /horse/local/libexec /horse/local/etc
/horse/local/share /horse/local/share /horse/local/var /horse/local/var/run /horse/local/share/doc
/horse/local/lib /horse/local/var/lib /horse/local/var/lib /horse/local/var/log"
+    EXPECT="/horse/local /horse/local /horse/local/bin /horse/local/libexec /horse/local/etc
/horse/local/share /horse/local/share /horse/local/var /horse/local/var/run /horse/local/share/doc/apache-couchdb
/horse/local/lib /horse/local/var/lib /horse/local/var/lib /horse/local/var/log /horse/local/share/man
/horse/local/share/info /horse/local/share/doc/apache-couchdb/html /horse/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --prefix=/horse/local --exec-prefix=\\${prefix}`
     assertEquals "test exec_prefix" "$EXPECT" "$RESULT"
@@ -109,7 +109,7 @@ test_exec_prefix_error() {
 }
 
 test_bindir() {
-    EXPECT="/usr/local /usr/local /my/funky/bindir /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /usr/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /my/funky/bindir /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --bindir=/my/funky/bindir`
     assertEquals "test bindir" "$EXPECT" "$RESULT"
@@ -129,7 +129,7 @@ test_bindir_error() {
 }
 
 test_libexecdir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /opt/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /usr/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /opt/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --libexecdir=/opt/local/libexec`
     assertEquals "test libexecdir" "$EXPECT" "$RESULT"
@@ -149,7 +149,7 @@ test_libexecdir_error() {
 }
 
 test_sysconfdir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /opt/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /usr/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /opt/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --sysconfdir=/opt/local/etc`
     assertEquals "test sysconfdir" "$EXPECT" "$RESULT"
@@ -169,7 +169,7 @@ test_sysconfdir_error() {
 }
 
 test_datarootdir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /opt/local/share
/opt/local/share /usr/local/var /usr/local/var/run /opt/local/share/doc /usr/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /opt/local/share
/opt/local/share /usr/local/var /usr/local/var/run /opt/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /opt/local/share/man /opt/local/share/info
/opt/local/share/doc/apache-couchdb/html /opt/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --datarootdir=/opt/local/share`
     assertEquals "test datarootdir" "$EXPECT" "$RESULT"
@@ -189,7 +189,7 @@ test_datarootdir_error() {
 }
 
 test_localstatedir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /horse/local/var /horse/local/var/run /usr/local/share/doc /usr/local/lib
/horse/local/var/lib /horse/local/var/lib /horse/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /horse/local/var /horse/local/var/run /usr/local/share/doc/apache-couchdb
/usr/local/lib /horse/local/var/lib /horse/local/var/lib /horse/local/var/log /usr/local/share/man
/usr/local/share/info /usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --localstatedir=/horse/local/var`
     assertEquals "test localstatedir" "$EXPECT" "$RESULT"
@@ -209,7 +209,7 @@ test_localstatedir_error() {
 }
 
 test_runstatedir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /horse/local/var/run /usr/local/share/doc /usr/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /horse/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --runstatedir=/horse/local/var/run`
     assertEquals "test runstatedir" "$EXPECT" "$RESULT"
@@ -229,7 +229,7 @@ test_runstatedir_error() {
 }
 
 test_docdir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /horse/local/share/doc /usr/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /horse/local/share/doc /usr/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info /horse/local/share/doc/html
/horse/local/share/doc/pdf"
 
     RESULT=`$CMD --docdir=/horse/local/share/doc`
     assertEquals "test docdir" "$EXPECT" "$RESULT"
@@ -249,7 +249,7 @@ test_docdir_error() {
 }
 
 test_libdir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /horse/local/lib /usr/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /horse/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --libdir=/horse/local/lib`
     assertEquals "test libdir" "$EXPECT" "$RESULT"
@@ -269,63 +269,143 @@ test_libdir_error() {
 }
 
 test_database_dir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /usr/local/lib /horse/local/var/lib
/usr/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/horse/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --databasedir=/horse/local/var/lib`
-    assertEquals "test database_dir" "$EXPECT" "$RESULT"
+    assertEquals "test databasedir" "$EXPECT" "$RESULT"
 
     RESULT=`$CMD --databasedir /horse/local/var/lib`
-    assertEquals "test database_dir" "$EXPECT" "$RESULT"
+    assertEquals "test databasedir" "$EXPECT" "$RESULT"
 }
 
 test_database_dir_error() {
     EXPECT='ERROR: "--databasedir" requires a non-empty argument.'
 
     RESULT=`$CMD --databasedir= 2>&1`
-    assertEquals "test database_dir error" "$EXPECT" "$RESULT"
+    assertEquals "test databasedir error" "$EXPECT" "$RESULT"
 
     RESULT=`$CMD --databasedir 2>&1`
-    assertEquals "test database_dir error" "$EXPECT" "$RESULT"
+    assertEquals "test databasedir error" "$EXPECT" "$RESULT"
 }
 
 test_view_dir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /usr/local/lib /usr/local/var/lib
/horse/local/var/lib /usr/local/var/log"
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /horse/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --viewindexdir=/horse/local/var/lib`
-    assertEquals "test view_dir" "$EXPECT" "$RESULT"
+    assertEquals "test viewindexdir" "$EXPECT" "$RESULT"
 
     RESULT=`$CMD --viewindexdir /horse/local/var/lib`
-    assertEquals "test view_dir" "$EXPECT" "$RESULT"
+    assertEquals "test viewindexdir" "$EXPECT" "$RESULT"
 }
 
 test_view_dir_error() {
     EXPECT='ERROR: "--viewindexdir" requires a non-empty argument.'
 
     RESULT=`$CMD --viewindexdir= 2>&1`
-    assertEquals "test view_dir error" "$EXPECT" "$RESULT"
+    assertEquals "test viewindexdir error" "$EXPECT" "$RESULT"
 
     RESULT=`$CMD --viewindexdir 2>&1`
-    assertEquals "test view_dir error" "$EXPECT" "$RESULT"
+    assertEquals "test viewindexdir error" "$EXPECT" "$RESULT"
 }
 
-test_log_dir() {
-    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc /usr/local/lib /usr/local/var/lib
/usr/local/var/lib /horse/log"
+test_logdir() {
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /horse/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
 
     RESULT=`$CMD --logdir=/horse/log`
-    assertEquals "test log_dir" "$EXPECT" "$RESULT"
+    assertEquals "test logdir" "$EXPECT" "$RESULT"
 
     RESULT=`$CMD --logdir /horse/log`
-    assertEquals "test log_dir" "$EXPECT" "$RESULT"
+    assertEquals "test logdir" "$EXPECT" "$RESULT"
 }
 
-test_log_dir_error() {
+test_logdir_error() {
     EXPECT='ERROR: "--logdir" requires a non-empty argument.'
 
     RESULT=`$CMD --logdir= 2>&1`
-    assertEquals "test log_dir error" "$EXPECT" "$RESULT"
+    assertEquals "test logdir error" "$EXPECT" "$RESULT"
 
     RESULT=`$CMD --logdir 2>&1`
-    assertEquals "test log_dir error" "$EXPECT" "$RESULT"
+    assertEquals "test logdir error" "$EXPECT" "$RESULT"
+}
+
+test_mandir() {
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /horse/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
+
+    RESULT=`$CMD --mandir=/horse/local/share/man`
+    assertEquals "test mandir" "$EXPECT" "$RESULT"
+
+    RESULT=`$CMD --mandir /horse/local/share/man`
+    assertEquals "test mandir" "$EXPECT" "$RESULT"
+}
+
+test_mandir_error() {
+    EXPECT='ERROR: "--mandir" requires a non-empty argument.'
+
+    RESULT=`$CMD --mandir= 2>&1`
+    assertEquals "test mandir error" "$EXPECT" "$RESULT"
+
+    RESULT=`$CMD --mandir 2>&1`
+    assertEquals "test mandir error" "$EXPECT" "$RESULT"
+}
+
+test_infodir() {
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /horse/local/share/info
/usr/local/share/doc/apache-couchdb/html /usr/local/share/doc/apache-couchdb/pdf"
+
+    RESULT=`$CMD --infodir=/horse/local/share/info`
+    assertEquals "test infodir" "$EXPECT" "$RESULT"
+
+    RESULT=`$CMD --infodir /horse/local/share/info`
+    assertEquals "test infodir" "$EXPECT" "$RESULT"
+}
+
+test_infodir_error() {
+    EXPECT='ERROR: "--infodir" requires a non-empty argument.'
+
+    RESULT=`$CMD --infodir= 2>&1`
+    assertEquals "test infodir error" "$EXPECT" "$RESULT"
+
+    RESULT=`$CMD --infodir 2>&1`
+    assertEquals "test infodir error" "$EXPECT" "$RESULT"
+}
+
+test_htmldir() {
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/horse/local/share/doc/html /usr/local/share/doc/apache-couchdb/pdf"
+
+    RESULT=`$CMD --htmldir=/horse/local/share/doc/html`
+    assertEquals "test htmldir" "$EXPECT" "$RESULT"
+
+    RESULT=`$CMD --htmldir /horse/local/share/doc/html`
+    assertEquals "test htmldir" "$EXPECT" "$RESULT"
+}
+
+test_htmldir_error() {
+    EXPECT='ERROR: "--htmldir" requires a non-empty argument.'
+
+    RESULT=`$CMD --htmldir= 2>&1`
+    assertEquals "test htmldir error" "$EXPECT" "$RESULT"
+
+    RESULT=`$CMD --htmldir 2>&1`
+    assertEquals "test htmldir error" "$EXPECT" "$RESULT"
+}
+
+test_pdfdir() {
+    EXPECT="/usr/local /usr/local /usr/local/bin /usr/local/libexec /usr/local/etc /usr/local/share
/usr/local/share /usr/local/var /usr/local/var/run /usr/local/share/doc/apache-couchdb /usr/local/lib
/usr/local/var/lib /usr/local/var/lib /usr/local/var/log /usr/local/share/man /usr/local/share/info
/usr/local/share/doc/apache-couchdb/html /horse/local/share/doc/pdf"
+
+    RESULT=`$CMD --pdfdir=/horse/local/share/doc/pdf`
+    assertEquals "test pdfdir" "$EXPECT" "$RESULT"
+
+    RESULT=`$CMD --pdfdir /horse/local/share/doc/pdf`
+    assertEquals "test pdfdir" "$EXPECT" "$RESULT"
+}
+
+test_pdfdir_error() {
+    EXPECT='ERROR: "--pdfdir" requires a non-empty argument.'
+
+    RESULT=`$CMD --pdfdir= 2>&1`
+    assertEquals "test pdfdir error" "$EXPECT" "$RESULT"
+
+    RESULT=`$CMD --pdfdir 2>&1`
+    assertEquals "test pdfdir error" "$EXPECT" "$RESULT"
 }
 
 # source the shunit2


Mime
View raw message