|
|
@ -302,7 +302,91 @@ EOF |
|
|
|
shift; |
|
|
|
shift; |
|
|
|
done |
|
|
|
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="" |
|
|
|
VCS="" |
|
|
|
VCSDEPENDS="" |
|
|
|
VCSDEPENDS="" |
|
|
|
for path in . .. ../.. ../../..; do |
|
|
|
for path in . .. ../.. ../../..; do |
|
|
@ -310,18 +394,18 @@ for path in . .. ../.. ../../..; do |
|
|
|
VCS="svn" |
|
|
|
VCS="svn" |
|
|
|
VCSDEPENDS_DEB="svn2cl, subversion, subversion-tools," |
|
|
|
VCSDEPENDS_DEB="svn2cl, subversion, subversion-tools," |
|
|
|
VCSDEPENDS_RPM="subversion, " |
|
|
|
VCSDEPENDS_RPM="subversion, " |
|
|
|
echo -e " \e[32msuccess\e[0m detected ${VCS}" |
|
|
|
success detected ${VCS} |
|
|
|
break |
|
|
|
break |
|
|
|
elif test -d ${path}/.git; then |
|
|
|
elif test -d ${path}/.git; then |
|
|
|
VCS="git" |
|
|
|
VCS="git" |
|
|
|
VCSDEPENDS_DEB="git2cl, git," |
|
|
|
VCSDEPENDS_DEB="git2cl, git," |
|
|
|
VCSDEPENDS_RPM="git, " |
|
|
|
VCSDEPENDS_RPM="git, " |
|
|
|
echo -e " \e[32msuccess\e[0m detected ${VCS}" |
|
|
|
success detected ${VCS} |
|
|
|
break |
|
|
|
break |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
|
if test -z "$VCS"; then |
|
|
|
if test -z "$VCS"; then |
|
|
|
echo -e " \e[33mignored\e[0m" |
|
|
|
ignored |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
HEADER='## @id '"\$Id\$"' |
|
|
|
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() { |
|
|
|
testtag() { |
|
|
|
local IFS="|" |
|
|
|
local IFS="|" |
|
|
|
egrep -q '^ *'"($*)"' *(\(.*)? *$' configure.ac |
|
|
|
egrep -q '^ *'"($*)"' *(\(.*)? *$' configure.ac |
|
|
@ -438,18 +485,13 @@ to() { |
|
|
|
return 1 |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
checkdir "$(dirname ${1})" |
|
|
|
checkdir "$(dirname ${1})" |
|
|
|
echo -en "\e[1m-> generating:\e[0m $1 ..." |
|
|
|
generating $1 |
|
|
|
result=$(cat > "$1" 2>&1) |
|
|
|
result=$(cat > "$1" 2>&1) |
|
|
|
res=$? |
|
|
|
res=$? |
|
|
|
if test $res -ne 0; then |
|
|
|
if test $res -ne 0; then |
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
error "Failed with return code: $res" "$result" |
|
|
|
echo -e "\e[1m*** Failed with return code: $res\e[0m" |
|
|
|
|
|
|
|
if test -n "$result"; then |
|
|
|
|
|
|
|
echo "$result" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
success |
|
|
|
fi |
|
|
|
fi |
|
|
|
run chmod $mode $1 |
|
|
|
run chmod $mode $1 |
|
|
|
if test $exists -eq 0; then |
|
|
|
if test $exists -eq 0; then |
|
|
@ -491,24 +533,20 @@ copy() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
doxyreplace() { |
|
|
|
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 |
|
|
|
if sed -i 's|\(^'"$1"' *=\) *.*|\1'" $2"'|g' doc/doxyfile.in; then |
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
success |
|
|
|
else |
|
|
|
else |
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
error $0 $* |
|
|
|
echo -e "\e[1m**** command: $0 $*\e[0m" |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
doxyadd() { |
|
|
|
doxyadd() { |
|
|
|
echo -en "\e[1m-> doxyfile:\e[0m configure $1 ..." |
|
|
|
configuring doxyfile $1 |
|
|
|
if sed -i '/^'"$1"' *=/a'"$1"' += '"$2" doc/doxyfile.in; then |
|
|
|
if sed -i '/^'"$1"' *=/a'"$1"' += '"$2" doc/doxyfile.in; then |
|
|
|
echo -e " \e[32msuccess\e[0m" |
|
|
|
success |
|
|
|
else |
|
|
|
else |
|
|
|
echo -e " \e[31merror\e[0m" |
|
|
|
error $0 $* |
|
|
|
echo -e "\e[1m**** command: $0 $*\e[0m" |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1801,9 +1839,9 @@ fi |
|
|
|
aclocal |
|
|
|
aclocal |
|
|
|
$(if testtag AX_USE_LIBTOOL; then |
|
|
|
$(if testtag AX_USE_LIBTOOL; then |
|
|
|
cat <<EOF1 |
|
|
|
cat <<EOF1 |
|
|
|
if which -s libtoolize; then |
|
|
|
if which libtoolize > /dev/null; then |
|
|
|
run libtoolize --force; |
|
|
|
run libtoolize --force; |
|
|
|
elif which -s glibtoolize; then |
|
|
|
elif which glibtoolize > /dev/null; then |
|
|
|
run glibtoolize --force; |
|
|
|
run glibtoolize --force; |
|
|
|
else |
|
|
|
else |
|
|
|
echo "error: libtoolize not found" 1>&2 |
|
|
|
echo "error: libtoolize not found" 1>&2 |
|
|
@ -1879,9 +1917,9 @@ else |
|
|
|
run --no-check vcs2cl |
|
|
|
run --no-check vcs2cl |
|
|
|
run aclocal |
|
|
|
run aclocal |
|
|
|
if testtag AX_USE_LIBTOOL; then |
|
|
|
if testtag AX_USE_LIBTOOL; then |
|
|
|
if which -s libtoolize; then |
|
|
|
if which libtoolize > /dev/null; then |
|
|
|
run libtoolize --force; |
|
|
|
run libtoolize --force; |
|
|
|
elif which -s glibtoolize; then |
|
|
|
elif which glibtoolize > /dev/null; then |
|
|
|
run glibtoolize --force; |
|
|
|
run glibtoolize --force; |
|
|
|
else |
|
|
|
else |
|
|
|
error libtoolize not found |
|
|
|
error libtoolize not found |
|
|
|