[asterisk-commits] Build System: Add support for checking alembic branches. (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jan 21 20:56:58 CST 2016
Matt Jordan has submitted this change and it was merged.
Change subject: Build System: Add support for checking alembic branches.
......................................................................
Build System: Add support for checking alembic branches.
* Add 'check-alembic' target to root Makefile.
* Create build_tools/make_check_alembic to do the actual checks.
ASTERISK-25685
Change-Id: Ibb3cae7d1202ac23dc70b0f3b5801571ad46b004
---
M Makefile
A build_tools/make_check_alembic
M configure
M configure.ac
M makeopts.in
5 files changed, 83 insertions(+), 5 deletions(-)
Approvals:
Anonymous Coward #1000019: Verified
Matt Jordan: Looks good to me, approved
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/Makefile b/Makefile
index d4ae9fd..5a729ed 100644
--- a/Makefile
+++ b/Makefile
@@ -1010,6 +1010,10 @@
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 @@
.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 0000000..ecc5fc1
--- /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 a0468b9..44435a6 100755
--- a/configure
+++ b/configure
@@ -1162,6 +1162,7 @@
LDCONFIG
DOWNLOAD
FETCH
+ALEMBIC
GIT
XMLSTARLET
XMLLINT
@@ -7465,6 +7466,47 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 3292809..54cbab2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -283,6 +283,7 @@
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 4922c2f..943bc3a 100644
--- a/makeopts.in
+++ b/makeopts.in
@@ -38,6 +38,7 @@
OPENSSL=@OPENSSL@
LDCONFIG=@LDCONFIG@
GIT=@GIT@
+ALEMBIC=@ALEMBIC@
BUILD_PLATFORM=@BUILD_PLATFORM@
BUILD_CPU=@BUILD_CPU@
--
To view, visit https://gerrit.asterisk.org/2064
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb3cae7d1202ac23dc70b0f3b5801571ad46b004
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-commits
mailing list