summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rwxr-xr-xbuild_tools/make_check_alembic29
-rwxr-xr-xconfigure52
-rw-r--r--configure.ac1
-rw-r--r--makeopts.in1
5 files changed, 83 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 4b1c57b8b..b1de3d244 100644
--- a/Makefile
+++ b/Makefile
@@ -1009,6 +1009,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
@@ -1030,6 +1034,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
diff --git a/configure b/configure
index bc51839c8..fc7613120 100755
--- a/configure
+++ b/configure
@@ -1174,6 +1174,7 @@ SHA1SUM
LDCONFIG
DOWNLOAD
FETCH
+ALEMBIC
GIT
XMLSTARLET
XMLLINT
@@ -7479,6 +7480,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
@@ -13653,7 +13695,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];
@@ -13699,7 +13741,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];
@@ -13723,7 +13765,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];
@@ -13768,7 +13810,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];
@@ -13792,7 +13834,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 021d0d167..e7b7e5781 100644
--- a/configure.ac
+++ b/configure.ac
@@ -279,6 +279,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 d91dc9ba4..f606acee0 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@