use nm(1) to output decimal values immediately, instead of relying on a

(non-working) sh(1) construct.

Reviewed by simonb & bjh21.
This commit is contained in:
hubertf 2003-05-05 13:38:23 +00:00
parent 4e26b71f48
commit 76a6e18152
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.mbr,v 1.2 2003/05/05 02:47:42 dbj Exp $ # $NetBSD: Makefile.mbr,v 1.3 2003/05/05 13:38:23 hubertf Exp $
S= ${.CURDIR}/../../../../../ S= ${.CURDIR}/../../../../../
@ -26,8 +26,8 @@ CLEANFILES+= ${PROG}.tmp
${PROG}: ${OBJS} ${PROG}: ${OBJS}
${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x600 ${OBJS} ${LD} -o ${PROG}.tmp ${LDFLAGS} -Ttext 0x600 ${OBJS}
@ set -- $$( ${NM} -t x ${PROG}.tmp | grep '\<mbr_space\>' ); \ @ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\<mbr_space\>' | sed 's/^0*//' ); \
echo "#### There are $$((0x$$1)) free bytes in ${PROG}" echo "#### There are $$1 free bytes in ${PROG}"
${OBJCOPY} -O binary ${PROG}.tmp ${PROG} ${OBJCOPY} -O binary ${PROG}.tmp ${PROG}
rm -f ${PROG}.tmp rm -f ${PROG}.tmp