Upgrade build system

This commit is contained in:
Laurence Withers 2009-04-06 15:00:13 +00:00
parent f18e14a104
commit 45bbf6bf1c
2 changed files with 11 additions and 16 deletions

10
make.sh
View File

@ -1,7 +1,7 @@
#!/bin/sh
#!/bin/bash
# daemonitor/make.sh
#
# (c)2006-2007, Laurence Withers, <l@lwithers.me.uk>.
# (c)2009, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
#
@ -15,19 +15,19 @@ then
echo "Configuration file not found???"
exit 1
fi
source "config" # don't fail on error, since last command in config might return false
source "./config" # don't fail on error, since last command in config might return false
# Get version information
source version || exit 1
source "./version" || exit 1
VERSION="${VERMAJOR}.${VERMINOR}.${VERMICRO}"
# Get standard functions
[ -z "${VERBOSE}" ] && VERBOSE="0"
source scripts/functions.sh || exit 1
source "./scripts/functions.sh" || exit 1
# List of directories which will be emptied by clean.

View File

@ -1,7 +1,7 @@
#!/bin/sh
#!/bin/bash
# daemonitor/test.sh
#
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
# (c)2009, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv3. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
#
@ -21,12 +21,7 @@ run_test() {
return 1
fi
if [ $# -eq 0 ]
then
LD_LIBRARY_PATH="obj" ${EXE} || return 1
else
LD_LIBRARY_PATH="obj" ${EXE} "$*" || return 1
fi
LD_LIBRARY_PATH="obj" "${EXE}" "$@" || return 1
return 0
}
@ -38,10 +33,10 @@ print_tests() {
echo "---------------------------------------------------------------------"
for EXE in obj/tests/*
do
[ -x ${EXE} ] || continue
NAME=$(echo ${EXE} | sed 's,obj/tests/,,')
[ -x "${EXE}" ] || continue
NAME="$(echo "${EXE}" | sed 's,obj/tests/,,')"
echo -ne "${NAME}\t"
LD_LIBRARY_PATH="obj" ${EXE} --print-summary
LD_LIBRARY_PATH="obj" "${EXE}" --print-summary
done
}