diff --git a/lib/build.mk b/lib/build.mk index cd618b61..c2272ac5 100644 --- a/lib/build.mk +++ b/lib/build.mk @@ -2,6 +2,8 @@ ANSI_OK ?= 1;32 ANSI_FAIL ?= 1;31 +GOTCHA := ^(((\*\* )?(E:|[Ee]rror|[Ww]arning).*)|(.* (Stop|failed)\.))$$ + ifndef MKIMAGE_PROFILES $(error this makefile is designed to be included in toplevel one) endif @@ -48,7 +50,7 @@ build-image: profile/populate echo "$(TIME) done (`tail -1 $(BUILDLOG) | cut -f1 -d.`)"; \ tail -200 "$(BUILDLOG)" $(SHORTEN) \ | GREP_COLOR="$(ANSI_OK)" GREP_OPTIONS="--color=auto" \ - grep '^\*\* image: .*' ||:; \ + grep '^\*\* image: .*$$' ||:; \ else \ echo -n "$(TIME) failed, see log"; \ if [ -z "$(DEBUG)" ]; then \ @@ -59,7 +61,7 @@ build-image: profile/populate fi; \ tail -200 "$(BUILDLOG)" \ | GREP_COLOR="$(ANSI_FAIL)" GREP_OPTIONS="--color=auto" \ - egrep "^((E:|[Ee]rror|[Ww]arning).*)|(.* Stop\.)$$"; \ + egrep "$(GOTCHA)"; \ df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \ { print "NB: low space on "$$6" ("$$5" used)"}}'; \ fi; \