diff options
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | build_tools/make_check_alembic | 29 | ||||
-rwxr-xr-x | configure | 52 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | makeopts.in | 1 |
5 files changed, 83 insertions, 5 deletions
@@ -1010,6 +1010,10 @@ else rest-api/resources.json . endif +check-alembic: makeopts + @find contrib/ast-db-manage/ -name '*.pyc' -delete + @ALEMBIC=$(ALEMBIC) build_tools/make_check_alembic config cdr voicemail >&2 + .PHONY: menuselect .PHONY: main .PHONY: sounds @@ -1031,6 +1035,7 @@ endif .PHONY: _clean .PHONY: ari-stubs .PHONY: basic-pbx +.PHONY: check-alembic .PHONY: $(SUBDIRS_INSTALL) .PHONY: $(SUBDIRS_DIST_CLEAN) .PHONY: $(SUBDIRS_CLEAN) diff --git a/build_tools/make_check_alembic b/build_tools/make_check_alembic new file mode 100755 index 000000000..ecc5fc1c9 --- /dev/null +++ b/build_tools/make_check_alembic @@ -0,0 +1,29 @@ +#!/bin/sh +if [ -z "$ALEMBIC" -o ! -d contrib/ast-db-manage ]; then + echo "Run 'make check-alembic' to use this script" >&2 + exit 1 +fi + +if [ "$ALEMBIC" = ":" ]; then + echo "Install alembic and re-run configure before using this target." + exit 1 +fi + +cd contrib/ast-db-manage + +FOUNDERROR= +for id in "$@"; do + if [ -n "$($ALEMBIC -c ${id}.ini.sample branches)" ]; then + echo "Alembic branches exist for $id - details follow:" + # This second run is needed to display the errors because + # formatting was lost in the first execution. + $ALEMBIC -c ${id}.ini.sample branches + # Display all errors before reporting failure to Make. + FOUNDERROR=yes + fi +done + +if [ -n "$FOUNDERROR" ]; then + # One or more failures. + exit 1 +fi @@ -1162,6 +1162,7 @@ SHA1SUM LDCONFIG DOWNLOAD FETCH +ALEMBIC GIT XMLSTARLET XMLLINT @@ -7465,6 +7466,47 @@ $as_echo "no" >&6; } fi +# Extract the first word of "alembic", so it can be a program name with args. +set dummy alembic; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ALEMBIC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ALEMBIC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ALEMBIC="$ALEMBIC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ALEMBIC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_ALEMBIC" && ac_cv_path_ALEMBIC=":" + ;; +esac +fi +ALEMBIC=$ac_cv_path_ALEMBIC +if test -n "$ALEMBIC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALEMBIC" >&5 +$as_echo "$ALEMBIC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "${WGET}" != ":" ; then DOWNLOAD=${WGET} else if test "${CURL}" != ":" ; then @@ -13477,7 +13519,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -13523,7 +13565,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -13547,7 +13589,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -13592,7 +13634,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -13616,7 +13658,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; diff --git a/configure.ac b/configure.ac index 329280924..54cbab211 100644 --- a/configure.ac +++ b/configure.ac @@ -283,6 +283,7 @@ AC_PATH_PROG([KPATHSEA], [kpsewhich], :) AC_PATH_PROG([XMLLINT], [xmllint], :) AC_PATH_PROG([XMLSTARLET], [xmlstarlet], :) AC_PATH_PROG([GIT], [git], :) +AC_PATH_PROG([ALEMBIC], [alembic], :) if test "${WGET}" != ":" ; then DOWNLOAD=${WGET} else if test "${CURL}" != ":" ; then diff --git a/makeopts.in b/makeopts.in index 4922c2fca..943bc3a51 100644 --- a/makeopts.in +++ b/makeopts.in @@ -38,6 +38,7 @@ SHA1SUM=@SHA1SUM@ OPENSSL=@OPENSSL@ LDCONFIG=@LDCONFIG@ GIT=@GIT@ +ALEMBIC=@ALEMBIC@ BUILD_PLATFORM=@BUILD_PLATFORM@ BUILD_CPU=@BUILD_CPU@ |