From 01cbec2d67399b7e8d18d409d1b1eccf00aba733 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 22 Dec 2025 14:23:04 -0500 Subject: Fix makefile progress indicator --- Makefile | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 7f247b49..965ccbe3 100644 --- a/Makefile +++ b/Makefile @@ -18,24 +18,14 @@ else include config.mk # Modified progress counter based on: https://stackoverflow.com/a/35320895 -# Only run counter if we're actually building (not for phony targets or no-ops) ifndef NO_PROGRESS ifndef ECHO -# Only count if building actual files, not just checking -ifneq ($(filter build all,$(MAKECMDGOALS)),) -T := $(shell $(MAKE) ECHO="COUNTTHIS" $(filter-out check-c-compiler check-libs,$(MAKECMDGOALS)) --no-print-directory \ - -nq 2>/dev/null | grep -c "COUNTTHIS") -ifeq ($(T),0) -ECHO = echo -else +T := $(shell $(MAKE) ECHO="COUNTTHIS" $(MAKECMDGOALS) --no-print-directory \ + -n | grep -c "COUNTTHIS") N := x C = $(words $N)$(eval N := x $N) ECHO = echo -e "[`expr $C '*' 100 / $T`%]" endif -else -ECHO = echo -endif -endif endif ifndef ECHO ECHO = echo -- cgit v1.2.3