--- trunk/mage/usr/lib/mage/smage2.sh 2011/12/28 10:50:26 1576 +++ trunk/mage/usr/lib/mage/smage2.sh 2011/12/28 10:56:10 1579 @@ -329,16 +329,16 @@ } # dummy function, used if that does not exist in smage file -src_check() +src_compile() { - echo "no src_check defined" + echo "no src_compile defined" return 0 } # dummy function, used if that does not exist in smage file -src_compile() +src_check() { - echo "no src_compile defined" + echo "no src_check defined" return 0 } @@ -555,24 +555,27 @@ { local stripdir="$@" - [ -z "${stripdir}" ] && stripdir=${BINDIR} - find ${stripdir} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip ${STRIP_DYN_LIB} 2> /dev/null + [[ -z ${stripdir} ]] && stripdir="${BINDIR}" + [[ -z ${STRIP_DYN_LIB} ]] && STRIP_DYN_LIB="--strip-debug" + find ${stripdir} ! -type d | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_LIB} 2> /dev/null } mstripbins() { local stripdir="$@" - [ -z "${stripdir}" ] && stripdir=${BINDIR} - find ${stripdir} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip ${STRIP_DYN_BIN} 2> /dev/null + [[ -z ${stripdir} ]] && stripdir="${BINDIR}" + [[ -z ${STRIP_DYN_BIN} ]] && STRIP_DYN_BIN="--strip-debug" + find ${stripdir} ! -type d | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_BIN} 2> /dev/null } mstripstatic() { local stripdir="$@" - [ -z "${stripdir}" ] && stripdir=${BINDIR} - find ${stripdir} | xargs file | grep "ar archive" | cut -f 1 -d : | xargs strip ${STRIP_STATIC_LIB} 2> /dev/null + [[ -z ${stripdir} ]] && stripdir="${BINDIR}" + [[ -z ${STRIP_STATIC_LIB} ]] && STRIP_STATIC_LIB="--strip-debug" + find ${stripdir} ! -type d | xargs file | grep "ar archive" | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_STATIC_LIB} 2> /dev/null } mcompressdocs() @@ -1489,7 +1492,7 @@ fi install -d ${BINDIR} || die "couldn't create \$BINDIR." -# cleans up package temp dir if a previous build exists +# clean up package temp dir if a previous build exist if [ -d ${BUILDDIR}/${PKGNAME} ] then rm -rf ${BUILDDIR}/${PKGNAME}