diff options
author | Noah Slater <nslater@apache.org> | 2012-12-03 10:06:06 +0100 |
---|---|---|
committer | Dave Cottlehuber <dch@apache.org> | 2012-12-11 14:10:52 +0100 |
commit | 719d2b6e43328de1eacf4f94accfdb478375d95d (patch) | |
tree | 0be0d70dc4aa8d15661858997a966756b88ad41d /bootstrap | |
parent | 84226656ab3fad6f95029aad993be9f5ec4f1794 (diff) | |
download | couchdb-719d2b6e43328de1eacf4f94accfdb478375d95d.tar.gz |
Integrate Sphinx into autotools
Integrate Sphinx into autotools
- Remove M4 macros and require as external dependencies instead
- Skip help2man generation if help2man is not installed
- ensure THANKS file is only updated during make distcheck
- Add TexInfo, PDF, HTML doc targets via Sphinx
- Add licenses and header compliance checking
- support optional builds of PDF, HTML, texinfo via Sphinx and pdflatex
- support skipping docs or compiler tests for happy developers
Travis: clean up package dependencies
- include sphinx via aptitude
- use spidermonkey 1.8.5 instead of default libmozjs
- include latex components for building PDFs
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 84 |
1 files changed, 64 insertions, 20 deletions
@@ -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 |