couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [29/50] git commit: More tweaks
Date Sun, 18 Nov 2012 16:49:46 GMT
More tweaks


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

Branch: refs/heads/docs_tmp
Commit: e03f1a84facd4eb1d6c3919a048bcd2938a4289a
Parents: 9629253
Author: Noah Slater <nslater@apache.org>
Authored: Sun Oct 14 03:15:08 2012 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Sun Nov 18 00:15:31 2012 +0000

----------------------------------------------------------------------
 bootstrap                   |   95 +++++++++++++++++++++++++++++++------
 share/doc/build/Makefile.am |   28 +++++------
 2 files changed, 91 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e03f1a84/bootstrap
----------------------------------------------------------------------
diff --git a/bootstrap b/bootstrap
index 6536aaa..ab3b9f4 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,37 +31,98 @@ get () {
     rm -f acinclude.m4.tmp
 }
 
-# mkdir -p build-aux
-mkdir -p m4
-
 if test -z "$REVISION"; then
-	REVISION=`git describe --always`-git
+    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
 
-texi_file="share/doc/build/texinfo/CouchDB.texi"
+find_program() {
+  set +e
+  for f in "$@"
+  do
+    file=`which ${f} 2>/dev/null | grep -v '^no '`
+    if test -n "x${file}" -a -x "${file}"
+    then
+      echo ${file}
+      set -e
+      exit 0
+    fi
+  done
+
+  echo "Failed to locate required program:" 1>&2
+  echo "\t$@" 1>&2
+  set -e
+  exit 1
+}
+
+# @@ add dep on pkg-config and autoconf-archive
+
+LIBTOOLIZE=`find_program glibtoolize libtoolize`
+ACLOCAL=`find_program aclocal-1.11 aclocal-1.10 aclocal-1.9 aclocal`
+AUTOHEADER=`find_program autoheader`
+AUTOMAKE=`find_program automake-1.11 automake-1.10 automake-1.9 automake`
+AUTOCONF=`find_program autoconf`
 
-if test ! -e $texi_file; then
-	mkdir -p `dirname $texi_file`
-	cat > $texi_file <<EOF
-@setfilename CouchDB
-EOF
+get_aclocal_dir_list () {
+    aclocal_dir=`$ACLOCAL --print-ac-dir`
+    echo $aclocal_dir
+    aclocal_dirlist="$aclocal_dir/dirlist"
+    if test -e $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
 
-# @@ then convert this to use autoreconf -i -Wall
+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
 
-# @@ add dep on pkg-config and autoconf-archive
+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 -Wall
+${AUTOHEADER} -f
+${AUTOMAKE} -f -a -Wall
+${AUTOCONF} -f -Wall
 
-autoreconf -vi -Wall
+rm -f INSTALL
 
 ln -f -s "`dirname \`readlink build-aux/missing\``/INSTALL"
 
-if test -e INSTALL; then
+if test ! -s INSTALL; then
 	echo "Broken INSTALL file."
 	exit 1
 fi
@@ -68,4 +131,4 @@ 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/e03f1a84/share/doc/build/Makefile.am
----------------------------------------------------------------------
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index 92449ea..94832e3 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -34,17 +34,13 @@
 
 # -----------------------------------------------------------------------------
 
-# You can set these variables from the command line.
-SPHINXOPTS    = -n -c $(srcdir)/..
-SPHINXBUILD   = sphinx-build
-PAPER         =
-
-# Internal variables.
-PAPEROPT_a4     = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(srcdir)/../src
-# the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+SPHINX_BUILD = sphinx-build
+
+SPHINXOPTS = \
+    -d doctrees \
+    -D latex_paper_size=a4 \
+    -n -c $(srcdir)/.. \
+    $(srcdir)/../src
 
 # -----------------------------------------------------------------------------
 
@@ -196,7 +192,7 @@ $(texinfo_files): texinfo.stamp
 texinfo.stamp: $(image_files) $(src_files)
 	@rm -f texinfo.tmp
 	@touch texinfo.tmp
-	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(builddir)/texinfo
+	$(SPHINX_UILD) -b texinfo $(SPHINXOPTS) $(builddir)/texinfo
 	@mv -f texinfo.tmp $@
 
 $(pdf_files): pdf.stamp
@@ -208,7 +204,7 @@ $(pdf_files): pdf.stamp
 pdf.stamp: $(image_files) $(src_files)
 	@rm -f pdf.tmp
 	@touch pdf.tmp
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(builddir)/latex
+	$(SPHINX_BUILD) -b latex $(SPHINXOPTS) $(builddir)/latex
 	$(MAKE) -C latex all-pdf
 	-gzip -9 < latex/CouchDB.pdf > latex/CouchDB.pdf.gz
 	@mv -f pdf.tmp $@
@@ -222,7 +218,7 @@ $(html_files): html.stamp
 html.stamp: $(image_files) $(src_files)
 	@rm -f html.tmp
 	@touch html.tmp
-	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(builddir)/html
+	$(SPHINX_BUILD) -b html $(SPHINXOPTS) $(builddir)/html
 	@mv -f html.tmp $@
 
 dvi:
@@ -231,10 +227,10 @@ dvi:
 ps:
 	@echo "This target is not supported."
 
-pdf:
+pdf-local:
 	$(MAKE) $(AM_MAKEFLAGS) pdf.stamp
 
-html:
+html-local:
 	$(MAKE) $(AM_MAKEFLAGS) html.stamp
 
 install-dvi:


Mime
View raw message