From 1b29fb687f12e195a4e3ce921746ed3e33153f1a Mon Sep 17 00:00:00 2001 From: d00f <8052722+DrDoof@users.noreply.github.com> Date: Sun, 25 Oct 2026 21:23:32 +0100 Subject: [PATCH] build: count the sdcc patches in the toolchain line The checksum changes with every patch but does not say how many there are. Print the number of patches in sdcc/ next to it. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 98d9cd0e..ec4de1a2 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,9 @@ ifeq ($(origin CC),default) SDCC = $(SDCC_PREFIX)/bin/sdcc CC = $(SDCC) ASM = $(SDCC_PREFIX)/bin/sdas8051 +SDCC_BANNER = $(SDCC_TOOLCHAIN) ($(words $(wildcard sdcc/*.patch)) patches) else -SDCC_TOOLCHAIN = system +SDCC_BANNER = system endif CC_FLAGS = -mmcs51 -I. -Imachine -Ihttpd -Iuip ASM ?= sdas8051 @@ -175,7 +176,7 @@ $(VERSION_HEADER): FORCE @printf '%s\n' "#ifndef VERSION_H" "#define VERSION_H" \ "#define VERSION_SW \"$(VERSION_EXTENSION)\"" \ "#define BUILD_DATE \"$(BUILD_DATE)\"" \ - "#define SDCC_TOOLCHAIN \"$(SDCC_TOOLCHAIN)\"" \ + "#define SDCC_TOOLCHAIN \"$(SDCC_BANNER)\"" \ "#endif" > $(VERSION_HEADER).tmp @cmp -s $(VERSION_HEADER).tmp $(VERSION_HEADER) \ && rm -f $(VERSION_HEADER).tmp \