Skip to contentSkip to conversation

MAKEALL: Allow empty ERR directory

PATCH New Andy Fleming 3 participants 3 messages Aug 9, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MAKEALL: Allow empty ERR directory

If we build everything correctly with multiple builds, and an ERR directory had been previously created, we failed to report that everything was fine because grep failed to find anything in the ERR directory. Use grep -r, which doesn't complain if there are no input files.

---
 MAKEALL |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
MAKEALL +2 -2
index 2e8b997..6b9ff30 100755
@@ -754,10 +754,10 @@ print_stats() {
 	rm -f ${donep}* ${skipp}*
 
 	if [ $BUILD_MANY == 1 ] && [ -e "${OUTPUT_PREFIX}/ERR" ] ; then
-		ERR_LIST=`grep -iwl error ${OUTPUT_PREFIX}/ERR/*`
+		ERR_LIST=`grep -riwl error ${OUTPUT_PREFIX}/ERR/`
 		ERR_LIST=`for f in $ERR_LIST ; do echo -n " $(basename $f)" ; done`
 		ERR_CNT=`echo $ERR_LIST | wc -w | awk '{print $1}'`
-		WRN_LIST=`grep -iwL error ${OUTPUT_PREFIX}/ERR/*`
+		WRN_LIST=`grep -riwL error ${OUTPUT_PREFIX}/ERR/`
 		WRN_LIST=`for f in $WRN_LIST ; do echo -n " $(basename $f)" ; done`
 		WRN_CNT=`echo $WRN_LIST | wc -w | awk '{print $1}'`
 	fi
Signature · 1 line
1.7.9.7
#1 lore raw

PATCH 1/1 MAKEALL: Allow empty ERR directory

Quoted 7 lines · Andy Fleming

If we build everything correctly with multiple builds, and an ERR directory had been previously created, we failed to report that everything was fine because grep failed to find anything in the ERR directory. Use grep -r, which doesn't complain if there are no input files.

Signature · 1 line
Tom
#2 lore raw

PATCH 1/1 MAKEALL: Allow empty ERR directory

In reply to Andy Fleming

Dear Andy Fleming,

Quoted 10 lines · In message <[email protected]> you wrote:

If we build everything correctly with multiple builds, and an ERR directory had been previously created, we failed to report that everything was fine because grep failed to find anything in the ERR directory. Use grep -r, which doesn't complain if there are no input files.

---
 MAKEALL |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Der Dativ ist dem Genitiv sein Tod.