Initial import of build system.

This commit is contained in:
Laurence Withers 2006-07-31 15:21:56 +01:00
commit f9c0e57470
10 changed files with 906 additions and 0 deletions

11
scripts/.gitignore vendored Normal file
View file

@ -0,0 +1,11 @@
build.c++.app
build.c++.lib
build.c++.tests
build.c.app
build.c.lib
build.c.tests
build.doxygen.docs
build.none.files
build.sdcc.firmware
module-create.sh
release.sh

68
scripts/functions.sh Executable file
View file

@ -0,0 +1,68 @@
#!/bin/bash
# libutf8/scripts/functions.sh
#
# (c)2006, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv2. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
#
# Common functions
# Print a success message
print_success() {
if [ -z "${TERM}" -o "${TERM}" == "dumb" ]
then
echo -n " - "
else
(echo -n -e " \E[32m* "; tput sgr0)
fi
echo $*
}
# Print a failure message
print_failure() {
if [ -z "${TERM}" -o "${TERM}" == "dumb" ]
then
echo -n " *** "
else
(echo -n -e " \E[31m*** "; tput sgr0)
fi
echo $*
}
# This function carries out a command, but reports its failure if
# necessary.
do_cmd() {
[ "${VERBOSE}" != "0" ] && echo "$@"
"$@"
if [ $? -ne 0 ]
then
print_failure "'$@' failed."
return 1
fi
}
# This function carries out a command, but reports its failure if
# necessary.
do_cmd_redir() {
DEST=$1
shift
[ "${VERBOSE}" != "0" ] && echo "$@ >> ${DEST}"
"$@" >> ${DEST}
if [ $? -ne 0 ]
then
print_failure "'$@' failed."
return 1
fi
}
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4