diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-12-22 14:23:04 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-12-22 14:23:04 -0500 |
| commit | 01cbec2d67399b7e8d18d409d1b1eccf00aba733 (patch) | |
| tree | a9966013969a19b3307ae0aa0d86157b7cb0d6f2 /Makefile | |
| parent | 123e84696354be18bfd881b939d642b0a94f756f (diff) | |
Fix makefile progress indicator
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -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 |
