boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

commit a8c2dc08392a373708f1b305b93c938cfad696fc
parent 0a6f7475a550b18006da931f6b098b6f785bbf2b
Author: Ryan Sepassi <rsepassi@gmail.com>
Date:   Sat, 25 Apr 2026 17:15:22 -0700

make: cloc covers P1 tables + vendor seeds, ARCH= narrows scope

Add the per-arch P1-<arch>.M1 tables and vendor/seed/<arch>/* sources
(minus hex0-seed) to cloc. `make cloc ARCH=<a>` narrows the per-arch
files to one arch; the bare form keeps covering all three. Filter also
strips `;`-prefixed comment lines.

Diffstat:
MMakefile | 19++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -69,14 +69,27 @@ all: m1pp pokem help: @sed -n '/^# Common entrypoints:/,/^$$/p' Makefile | sed 's/^# *//' +CLOC_SEED_BASES := hex0.hex0 hex1.hex0 hex2.hex1 catm.hex2 M0.hex2 ELF.hex2 + +# `make cloc` covers every arch by default; `make cloc ARCH=<a>` narrows +# the per-arch sources (P1-<a>.M1pp/.M1 + vendor/seed/<a>/*) to one arch. +ifeq ($(origin ARCH),file) + CLOC_ARCHES := $(ALL_ARCHES) +else + CLOC_ARCHES := $(ARCH) +endif + CLOC_FILES := M1pp/M1pp.P1 \ - $(foreach a,$(ALL_ARCHES),P1/P1-$(a).M1pp) \ + $(foreach a,$(CLOC_ARCHES),P1/P1-$(a).M1pp) \ P1/P1.M1pp \ - scheme1/scheme1.P1pp + $(foreach a,$(CLOC_ARCHES),P1/P1-$(a).M1) \ + scheme1/scheme1.P1pp \ + $(foreach a,$(CLOC_ARCHES), \ + $(foreach f,$(CLOC_SEED_BASES),vendor/seed/$(a)/$(f))) cloc: @total=0; for f in $(CLOC_FILES); do \ - n=$$(grep -v "^ZERO.*" $$f | grep -v "^\s*#.*" | grep -v "^$$" | wc -l); \ + n=$$(grep -v "^ZERO.*" $$f | grep -v "^\s*#.*" | grep -v "^\s*;.*" | grep -v "^$$" | wc -l); \ printf '%6d %s\n' $$n $$f; \ total=$$((total + n)); \ done; \