|
|
|
@ -302,7 +302,91 @@ EOF |
|
|
|
|
shift; |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
echo -en "\e[1m-> checking:\e[0m for version control system ..." |
|
|
|
|
# check if stdout is a terminal... |
|
|
|
|
if test -t 1; then |
|
|
|
|
|
|
|
|
|
# see if it supports colors... |
|
|
|
|
ncolors=$(tput colors) |
|
|
|
|
|
|
|
|
|
if test -n "$ncolors" && test $ncolors -ge 8; then |
|
|
|
|
bold="$(tput bold)" |
|
|
|
|
underline="$(tput smul)" |
|
|
|
|
standout="$(tput smso)" |
|
|
|
|
normal="$(tput sgr0)" |
|
|
|
|
black="$(tput setaf 0)" |
|
|
|
|
red="$(tput setaf 1)" |
|
|
|
|
green="$(tput setaf 2)" |
|
|
|
|
yellow="$(tput setaf 3)" |
|
|
|
|
blue="$(tput setaf 4)" |
|
|
|
|
magenta="$(tput setaf 5)" |
|
|
|
|
cyan="$(tput setaf 6)" |
|
|
|
|
white="$(tput setaf 7)" |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
notice() { |
|
|
|
|
echo "${yellow}→ notice: ${bold}$*${normal}" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
running() { |
|
|
|
|
echo -n "${bold}${blue}→ running: ${bold}${white}$*${normal} … " |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
checking() { |
|
|
|
|
echo -n "${bold}${blue}→ checking: ${bold}${white}$*${normal} … " |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
generating() { |
|
|
|
|
echo -n "${bold}${blue}→ generating: ${bold}${white}$*${normal} … " |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
configuring() { |
|
|
|
|
echo -n "${bold}${blue}→ configuring ${bold}${white}$1${normal}:" |
|
|
|
|
shift |
|
|
|
|
echo -n "${white}$*${normal} … " |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ignored() { |
|
|
|
|
echo "${bold}${yellow}ignored $*${normal}" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
success() { |
|
|
|
|
echo "${bold}${green}success $*${normal}" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
error() { |
|
|
|
|
echo "${bold}${red}→ error: $1${normal}" |
|
|
|
|
shift |
|
|
|
|
if test -n "$*"; then |
|
|
|
|
echo "${bold}$*${normal}" |
|
|
|
|
fi |
|
|
|
|
exit 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
run() { |
|
|
|
|
check=1 |
|
|
|
|
while test $# -gt 0; do |
|
|
|
|
case "$1" in |
|
|
|
|
(--no-check) check=0;; |
|
|
|
|
(*) break;; |
|
|
|
|
esac |
|
|
|
|
shift; |
|
|
|
|
done |
|
|
|
|
running $* |
|
|
|
|
result=$($* 2>&1) |
|
|
|
|
res=$? |
|
|
|
|
if test $res -ne 0; then |
|
|
|
|
if test $check -eq 1; then |
|
|
|
|
error "Failed with return code: $res" "$result" |
|
|
|
|
else |
|
|
|
|
ignored |
|
|
|
|
fi |
|
|
|
|
else |
|
|
|
|
success |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
checking for version control system |
|
|
|
|
VCS="" |
|
|
|
|
VCSDEPENDS="" |
|
|
|
|
for path in . .. ../.. ../../..; do |
|
|
|
@ -310,18 +394,18 @@ for path in . .. ../.. ../../..; do |
|
|
|
|
VCS="svn" |
|
|
|
|
VCSDEPENDS_DEB="svn2cl, subversion, subversion-tools," |
|
|
|
|
VCSDEPENDS_RPM="subversion, " |
|
|
|
|
echo -e " \e[32msuccess\e[0m detected ${VCS}" |
|
|
|
|
success detected ${VCS} |
|
|
|
|
break |
|
|
|
|
elif test -d ${path}/.git; then |
|
|
|
|
VCS="git" |
|
|
|
|
VCSDEPENDS_DEB="git2cl, git," |
|
|
|
|
VCSDEPENDS_RPM="git, " |
|
|
|
|
echo -e " \e[32msuccess\e[0m detected ${VCS}" |
|
|
|
|
success detected ${VCS} |
|
|
|
|
break |
|
|
|
|
fi |
|
|
|
|
done |
|
|
|
|
if test -z "$VCS"; then |
|
|
|
|
echo -e " \e[33mignored\e[0m" |
|
|
|
|
ignored |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
HEADER='## @id '"\$Id\$"' |
|
|
|
@ -349,43 +433,6 @@ CHEADER='/** @id '"\$Id\$"' |
|
|
|
|
|
|
|
|
|
' |
|
|
|
|
|
|
|
|
|
notice() { |
|
|
|
|
echo -e "\e[1;33m$*\e[0m" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
error() { |
|
|
|
|
echo -e " \e[31merror\e[0m $*" |
|
|
|
|
exit 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
run() { |
|
|
|
|
check=1 |
|
|
|
|
while test $# -gt 0; do |
|
|
|
|
case "$1" in |
|
|
|
|
(--no-check) check=0;; |
|
|
|
|
(*) break;; |
|
|
|
|
esac |
|
|
|
|
shift; |
|
|
|
|
done |
|
|
|
|
echo -en "\e[1m-> running:\e[0m $* ..." |
|
|
|
|
result=$($* 2>&1) |
|
|
|
|
res=$? |
|
|
|
|
if test $res -ne 0; then |
|
|
|
|
if test $check -eq 1; then |
|
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
|
echo -e "\e[1m*** Failed with return code: $res\e[0m" |
|
|
|
|
if test -n "$result"; then |
|
|
|
|
echo "$result" |
|
|
|
|
fi |
|
|
|
|
exit 1 |
|
|
|
|
else |
|
|
|
|
echo -e " \e[33mignored\e[0m" |
|
|
|
|
fi |
|
|
|
|
else |
|
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
testtag() { |
|
|
|
|
local IFS="|" |
|
|
|
|
egrep -q '^ *'"($*)"' *(\(.*)? *$' configure.ac |
|
|
|
@ -438,18 +485,13 @@ to() { |
|
|
|
|
return 1 |
|
|
|
|
fi |
|
|
|
|
checkdir "$(dirname ${1})" |
|
|
|
|
echo -en "\e[1m-> generating:\e[0m $1 ..." |
|
|
|
|
generating $1 |
|
|
|
|
result=$(cat > "$1" 2>&1) |
|
|
|
|
res=$? |
|
|
|
|
if test $res -ne 0; then |
|
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
|
echo -e "\e[1m*** Failed with return code: $res\e[0m" |
|
|
|
|
if test -n "$result"; then |
|
|
|
|
echo "$result" |
|
|
|
|
fi |
|
|
|
|
exit 1 |
|
|
|
|
error "Failed with return code: $res" "$result" |
|
|
|
|
else |
|
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
|
success |
|
|
|
|
fi |
|
|
|
|
run chmod $mode $1 |
|
|
|
|
if test $exists -eq 0; then |
|
|
|
@ -491,24 +533,20 @@ copy() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
doxyreplace() { |
|
|
|
|
echo -en "\e[1m-> doxyfile:\e[0m configure $1 ..." |
|
|
|
|
configuring doxyfile $1 |
|
|
|
|
if sed -i 's|\(^'"$1"' *=\) *.*|\1'" $2"'|g' doc/doxyfile.in; then |
|
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
|
success |
|
|
|
|
else |
|
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
|
echo -e "\e[1m**** command: $0 $*\e[0m" |
|
|
|
|
exit 1 |
|
|
|
|
error $0 $* |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
doxyadd() { |
|
|
|
|
echo -en "\e[1m-> doxyfile:\e[0m configure $1 ..." |
|
|
|
|
configuring doxyfile $1 |
|
|
|
|
if sed -i '/^'"$1"' *=/a'"$1"' += '"$2" doc/doxyfile.in; then |
|
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
|
success |
|
|
|
|
else |
|
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
|
echo -e "\e[1m**** command: $0 $*\e[0m" |
|
|
|
|
exit 1 |
|
|
|
|
error $0 $* |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1801,9 +1839,9 @@ fi |
|
|
|
|
aclocal |
|
|
|
|
$(if testtag AX_USE_LIBTOOL; then |
|
|
|
|
cat <<EOF1 |
|
|
|
|
if which -s libtoolize; then |
|
|
|
|
if which libtoolize > /dev/null; then |
|
|
|
|
run libtoolize --force; |
|
|
|
|
elif which -s glibtoolize; then |
|
|
|
|
elif which glibtoolize > /dev/null; then |
|
|
|
|
run glibtoolize --force; |
|
|
|
|
else |
|
|
|
|
echo "error: libtoolize not found" 1>&2 |
|
|
|
@ -1879,9 +1917,9 @@ else |
|
|
|
|
run --no-check vcs2cl |
|
|
|
|
run aclocal |
|
|
|
|
if testtag AX_USE_LIBTOOL; then |
|
|
|
|
if which -s libtoolize; then |
|
|
|
|
if which libtoolize > /dev/null; then |
|
|
|
|
run libtoolize --force; |
|
|
|
|
elif which -s glibtoolize; then |
|
|
|
|
elif which glibtoolize > /dev/null; then |
|
|
|
|
run glibtoolize --force; |
|
|
|
|
else |
|
|
|
|
error libtoolize not found |
|
|
|
|