Patchwork [U-Boot] MAKEALL: Allow empty ERR directory

login
register
mail settings
Submitter Andy Fleming
Date Aug. 9, 2012, 12:12 a.m.
Message ID <1344471150-17020-1-git-send-email-afleming@freescale.com>
Download mbox | patch
Permalink /patch/175973/
State Accepted
Commit 033220e7a43ff626a5e65b194ac50358b0dba22e
Headers show

Comments

Andy Fleming - Aug. 9, 2012, 12:12 a.m.
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.

Signed-off-by: Andy Fleming <afleming@freescale.com>
---
 MAKEALL |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Tom Rini - Aug. 9, 2012, 6:32 p.m.
On Wed, Aug 08, 2012 at 07:12:30PM -0500, Andy Fleming 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.
> 
> Signed-off-by: Andy Fleming <afleming@freescale.com>

Tested-by: Tom Rini <trini@ti.com>
Wolfgang Denk - Aug. 9, 2012, 7:22 p.m.
Dear Andy Fleming,

In message <1344471150-17020-1-git-send-email-afleming@freescale.com> 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.
> 
> Signed-off-by: Andy Fleming <afleming@freescale.com>
> ---
>  MAKEALL |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/MAKEALL b/MAKEALL
index 2e8b997..6b9ff30 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -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