config/functions: use BUILD_WITH_DEBUG variable, add sanity check

This commit is contained in:
MilhouseVH 2018-02-19 07:08:48 +00:00
parent a3af8427f3
commit c2259b779d

View File

@ -787,7 +787,12 @@ check_config() {
# strip
debug_strip() {
if [ ! "$DEBUG" = yes ]; then
if [ -z "${BUILD_WITH_DEBUG}" ]; then
echo "ERROR: debug_strip() must not be called without configuring BUILD_WITH_DEBUG" >&2
exit 1
fi
if [ "${BUILD_WITH_DEBUG}" != "yes" ]; then
find $* -type f -executable | xargs $STRIP 2>/dev/null || :
fi
}