Commit e89a0f1c authored by Michael Shigorin's avatar Michael Shigorin

lib/build.mk: tweak the optimizer

$(SHORTEN) is better in the midst of the pipe so that greps are terminal and can sense the tty (or the lack thereof in case we're logging further).
parent c400ba59
...@@ -45,9 +45,9 @@ build: profile/populate ...@@ -45,9 +45,9 @@ build: profile/populate
fi; \ fi; \
if $(START) $(MAKE) -C $(BUILDDIR)/ $(LOG); then \ if $(START) $(MAKE) -C $(BUILDDIR)/ $(LOG); then \
echo "$(TIME) done (`tail -1 $(BUILDLOG) | cut -f1 -d.`)"; \ echo "$(TIME) done (`tail -1 $(BUILDLOG) | cut -f1 -d.`)"; \
tail -200 "$(BUILDLOG)" \ tail -200 "$(BUILDLOG)" $(SHORTEN) \
| GREP_COLOR="$(ANSI_OK)" \ | GREP_COLOR="$(ANSI_OK)" \
grep --color=always '^\*\* image: .*' $(SHORTEN) ||:; \ grep --color=auto '^\*\* image: .*' ||:; \
else \ else \
echo "$(TIME) failed, see log: $(BUILDLOG)" $(SHORTEN); \ echo "$(TIME) failed, see log: $(BUILDLOG)" $(SHORTEN); \
if [ -z "$(DEBUG)" ]; then \ if [ -z "$(DEBUG)" ]; then \
...@@ -55,7 +55,7 @@ build: profile/populate ...@@ -55,7 +55,7 @@ build: profile/populate
fi; \ fi; \
tail -200 "$(BUILDLOG)" \ tail -200 "$(BUILDLOG)" \
| GREP_COLOR="$(ANSI_FAIL)" \ | GREP_COLOR="$(ANSI_FAIL)" \
egrep --color=always "^(E:|[Ee]rror|[Ww]arning).*"; \ egrep --color=auto "^(E:|[Ee]rror|[Ww]arning).*"; \
df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \ df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \ { print "NB: low space on "$$6" ("$$5" used)"}}'; \
fi; \ fi; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment