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
This commit is contained in:
parent
53570e2c6f
commit
5dde111719
5
Makefile
5
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)
|
||||
|
|
|
@ -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
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -38,6 +38,7 @@ SHA1SUM=@SHA1SUM@
|
|||
OPENSSL=@OPENSSL@
|
||||
LDCONFIG=@LDCONFIG@
|
||||
GIT=@GIT@
|
||||
ALEMBIC=@ALEMBIC@
|
||||
|
||||
BUILD_PLATFORM=@BUILD_PLATFORM@
|
||||
BUILD_CPU=@BUILD_CPU@
|
||||
|
|
Loading…
Reference in New Issue