bootstrap: add a verbose option
This commit is contained in:
parent
d6eec9ea72
commit
82520c687d
27
bootstrap.sh
27
bootstrap.sh
|
@ -5,6 +5,7 @@
|
||||||
echo "bootstrap: checking installation..."
|
echo "bootstrap: checking installation..."
|
||||||
|
|
||||||
BGJOB=false
|
BGJOB=false
|
||||||
|
VERBOSE=false
|
||||||
BASEDIR=`pwd`;
|
BASEDIR=`pwd`;
|
||||||
LIBDIR=${BASEDIR}/libs;
|
LIBDIR=${BASEDIR}/libs;
|
||||||
SUBDIRS="apr \
|
SUBDIRS="apr \
|
||||||
|
@ -12,10 +13,11 @@ SUBDIRS="apr \
|
||||||
speex sqlite srtp openzap freetdm spandsp libg722_1 portaudio unimrcp tiff-3.8.2 broadvoice silk libcodec2 \
|
speex sqlite srtp openzap freetdm spandsp libg722_1 portaudio unimrcp tiff-3.8.2 broadvoice silk libcodec2 \
|
||||||
fs";
|
fs";
|
||||||
|
|
||||||
while getopts 'jhd:' o; do
|
while getopts 'jhd:v' o; do
|
||||||
case "$o" in
|
case "$o" in
|
||||||
j) BGJOB=true;;
|
j) BGJOB=true;;
|
||||||
d) SUBDIRS="$OPTARG";;
|
d) SUBDIRS="$OPTARG";;
|
||||||
|
v) VERBOSE=true;;
|
||||||
h) echo "Usage: $0 <options>"
|
h) echo "Usage: $0 <options>"
|
||||||
echo " Options:"
|
echo " Options:"
|
||||||
echo " -d 'library1 library2'"
|
echo " -d 'library1 library2'"
|
||||||
|
@ -25,6 +27,11 @@ while getopts 'jhd:' o; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
ex() {
|
||||||
|
test $VERBOSE && echo "bootstrap: $@" >&2
|
||||||
|
$@
|
||||||
|
}
|
||||||
|
|
||||||
setup_modules() {
|
setup_modules() {
|
||||||
if [ ! -f modules.conf ]; then
|
if [ ! -f modules.conf ]; then
|
||||||
cp build/modules.conf.in modules.conf
|
cp build/modules.conf.in modules.conf
|
||||||
|
@ -316,8 +323,8 @@ libbootstrap() {
|
||||||
i=$1
|
i=$1
|
||||||
if [ -d ${LIBDIR}/${i} ]; then
|
if [ -d ${LIBDIR}/${i} ]; then
|
||||||
echo "Entering directory ${LIBDIR}/${i}"
|
echo "Entering directory ${LIBDIR}/${i}"
|
||||||
cd ${LIBDIR}/${i}
|
ex cd ${LIBDIR}/${i}
|
||||||
rm -f aclocal.m4
|
ex rm -f aclocal.m4
|
||||||
CFFILE=
|
CFFILE=
|
||||||
if [ -f ${LIBDIR}/${i}/configure.in ]; then
|
if [ -f ${LIBDIR}/${i}/configure.in ]; then
|
||||||
CFFILE="${LIBDIR}/${i}/configure.in"
|
CFFILE="${LIBDIR}/${i}/configure.in"
|
||||||
|
@ -336,33 +343,33 @@ libbootstrap() {
|
||||||
AXTEST=`grep "ACX_LIBTOOL_C_ONLY" ${CFFILE}`
|
AXTEST=`grep "ACX_LIBTOOL_C_ONLY" ${CFFILE}`
|
||||||
|
|
||||||
echo "Creating aclocal.m4"
|
echo "Creating aclocal.m4"
|
||||||
${ACLOCAL:-aclocal} ${ACLOCAL_OPTS} ${ACLOCAL_FLAGS}
|
ex ${ACLOCAL:-aclocal} ${ACLOCAL_OPTS} ${ACLOCAL_FLAGS}
|
||||||
|
|
||||||
# only run if AC_PROG_LIBTOOL is in configure.in/configure.ac
|
# only run if AC_PROG_LIBTOOL is in configure.in/configure.ac
|
||||||
if [ ! -z "${LTTEST}" -o "${LTTEST2}" -o "${AXTEST}" ]; then
|
if [ ! -z "${LTTEST}" -o "${LTTEST2}" -o "${AXTEST}" ]; then
|
||||||
echo "Running libtoolize..."
|
echo "Running libtoolize..."
|
||||||
if ${libtoolize} -n --install >/dev/null 2>&1; then
|
if ${libtoolize} -n --install >/dev/null 2>&1; then
|
||||||
$libtoolize --force --copy --install
|
ex $libtoolize --force --copy --install
|
||||||
else
|
else
|
||||||
$libtoolize --force --copy
|
ex $libtoolize --force --copy
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Creating configure"
|
echo "Creating configure"
|
||||||
${AUTOCONF:-autoconf}
|
ex ${AUTOCONF:-autoconf}
|
||||||
|
|
||||||
# only run if AC_CONFIG_HEADERS is found in configure.in/configure.ac
|
# only run if AC_CONFIG_HEADERS is found in configure.in/configure.ac
|
||||||
if [ ! -z "${AHTEST}" ]; then
|
if [ ! -z "${AHTEST}" ]; then
|
||||||
echo "Running autoheader..."
|
echo "Running autoheader..."
|
||||||
${AUTOHEADER:-autoheader};
|
ex ${AUTOHEADER:-autoheader};
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# run if AM_INIT_AUTOMAKE / AC_PROG_INSTALL is in configure.in/configure.ac
|
# run if AM_INIT_AUTOMAKE / AC_PROG_INSTALL is in configure.in/configure.ac
|
||||||
if [ ! -z "${AMTEST}" -o "${AMTEST2}" ]; then
|
if [ ! -z "${AMTEST}" -o "${AMTEST2}" ]; then
|
||||||
echo "Creating Makefile.in"
|
echo "Creating Makefile.in"
|
||||||
${AUTOMAKE:-automake} --no-force --add-missing --copy;
|
ex ${AUTOMAKE:-automake} --no-force --add-missing --copy;
|
||||||
fi
|
fi
|
||||||
rm -rf autom4te*.cache
|
ex rm -rf autom4te*.cache
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Skipping directory ${LIBDIR}/${i}"
|
echo "Skipping directory ${LIBDIR}/${i}"
|
||||||
|
|
Loading…
Reference in New Issue