Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/774
-gerrit
commit 16f2f68f1a54a9fa0551bc565edc52fedf5fdd60 Author: Stefan Reinauer stefan.reinauer@coreboot.org Date: Thu Mar 8 11:06:25 2012 -0800
Fix lint-stable checkin hooks on MacOS X
- wc adds a number of leading spaces which broke cut - sed can't replace spaces with new lines, so use tr for that. - make sure directories are created if they're not there.
Change-Id: Ia0db059683abe3d97b0ab6feaece660a1f4e5079 Signed-off-by: Stefan Reinauer reinauer@google.com --- Makefile.inc | 2 +- util/lint/lint-stable-002-build-dir-handling | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc index e495f45..d36d15f 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -225,7 +225,7 @@ lint lint-stable: grep "^# DESCR:" $$script | sed "s,.*DESCR: *,," ; \ echo ========; \ $$script > $$LINTLOG; \ - if [ `wc -l $$LINTLOG | cut -d' ' -f1` -eq 0 ]; then \ + if [ `echo $$( wc -l $$LINTLOG ) | cut -d' ' -f1` -eq 0 ]; then \ printf "success\n\n"; \ else \ echo test failed: ; \ diff --git a/util/lint/lint-stable-002-build-dir-handling b/util/lint/lint-stable-002-build-dir-handling index c4f57d6..6b902d8 100755 --- a/util/lint/lint-stable-002-build-dir-handling +++ b/util/lint/lint-stable-002-build-dir-handling @@ -33,7 +33,7 @@ fi
# $1: object directory run_printall() { -$MAKE CONFIG_CCACHE=n CONFIG_SCANBUILD_ENABLE=n NOMKDIR=1 DOTCONFIG=$TMPCONFIG obj=$1 printall |sed -e "s,^ *,," -e "s, ,\n,g" -e "s,^ramstage-objs:=,," -e "s,mainboard/[^/]*/[^/]*/,.../," |grep "/static.*.[co]" |sort |tr '\012\015' ' ' |sed -e "s, *, ,g" -e "s, *$,," +$MAKE CONFIG_CCACHE=n CONFIG_SCANBUILD_ENABLE=n NOMKDIR=1 DOTCONFIG=$TMPCONFIG obj=$1 printall |sed -e "s,^ *,," -e "s,^ramstage-objs:=,," -e "s,mainboard/[^/]*/[^/]*/,.../," |tr " " "\n"|grep "/static.*.[co]" |sort |tr '\012\015' ' ' |sed -e "s, *, ,g" -e "s, *$,," }
# find GNU make @@ -49,7 +49,7 @@ fi # prepare a config to use TMPCONFIG=`mktemp .tmpconfig.XXXXXX` rm -f $TMPCONFIG -$MAKE NOMKDIR=1 DOTCONFIG=$TMPCONFIG allyesconfig >/dev/null +$MAKE DOTCONFIG=$TMPCONFIG allyesconfig >/dev/null
# look up parent directory PARENTDIR=`dirname $PWD`