Mercurial > hg > toybox
changeset 472:f59b4b6bde5e
Add V=1 support to make.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 17 Feb 2012 12:06:12 -0600 |
parents | 35f6a1bd1417 |
children | 716344d1eacd |
files | scripts/make.sh |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/make.sh Fri Feb 17 12:05:26 2012 -0600 +++ b/scripts/make.sh Fri Feb 17 12:06:12 2012 -0600 @@ -96,9 +96,15 @@ echo "Compile toybox..." -$DEBUG $CC $CFLAGS -I . -o toybox_unstripped $OPTIMIZE main.c lib/*.c \ +do_loudly() +{ + [ ! -z "$V" ] && echo "$@" + "$@" +} + +do_loudly $CC $CFLAGS -I . -o toybox_unstripped $OPTIMIZE main.c lib/*.c \ $TOYFILES -Wl,--as-needed,-lutil,--no-as-needed || exit 1 -$DEBUG $STRIP toybox_unstripped -o toybox || exit 1 +do_loudly $STRIP toybox_unstripped -o toybox || exit 1 # gcc 4.4's strip command is buggy, and doesn't set the executable bit on # its output the way SUSv4 suggests it do so. -$DEBUG chmod +x toybox || exit 1 +do_loudly chmod +x toybox || exit 1