2025-09-11 20:50:00 +02:00
|
|
|
SOURCES = $(shell find . -name "*.go" | grep -v [.]gen[.]go)
|
|
|
|
|
|
|
|
|
|
default: build
|
|
|
|
|
|
|
|
|
|
all: clean fmt build cover
|
|
|
|
|
|
|
|
|
|
build: $(SOURCES) tags promote-to-tags
|
|
|
|
|
go build
|
|
|
|
|
|
2025-10-05 14:27:48 +02:00
|
|
|
tags: tags/block.gen.go tags/inline.gen.go tags/void.block.gen.go tags/void.inline.gen.go tags/inlinechildren.gen.go tags/script.gen.go
|
2025-09-11 20:50:00 +02:00
|
|
|
|
|
|
|
|
promote-to-tags: tags/promote.gen.go
|
|
|
|
|
|
|
|
|
|
tags/block.gen.go: $(SOURCES) tags.block.txt
|
|
|
|
|
go run script/generate-tags.go < tags.block.txt > tags/block.gen.go
|
|
|
|
|
|
|
|
|
|
tags/inline.gen.go: $(SOURCES) tags.inline.txt
|
|
|
|
|
go run script/generate-tags.go Inline < tags.inline.txt > tags/inline.gen.go
|
|
|
|
|
|
2025-10-05 14:27:48 +02:00
|
|
|
tags/inlinechildren.gen.go: $(SOURCES) tags.inlinechildren.txt
|
|
|
|
|
go run script/generate-tags.go InlineChildren < tags.inlinechildren.txt > tags/inlinechildren.gen.go
|
|
|
|
|
|
2025-09-11 20:50:00 +02:00
|
|
|
tags/void.block.gen.go: $(SOURCES) tags.void.block.txt
|
|
|
|
|
go run script/generate-tags.go Void < tags.void.block.txt > tags/void.block.gen.go
|
|
|
|
|
|
|
|
|
|
tags/void.inline.gen.go: $(SOURCES) tags.void.inline.txt
|
|
|
|
|
go run script/generate-tags.go Void Inline < tags.void.inline.txt > tags/void.inline.gen.go
|
|
|
|
|
|
|
|
|
|
tags/script.gen.go: $(SOURCES) tags.script.txt
|
|
|
|
|
go run script/generate-tags.go ScriptContent < tags.script.txt > tags/script.gen.go
|
|
|
|
|
|
|
|
|
|
tags/promote.gen.go: $(SOURCES) promote-to-tags.txt
|
|
|
|
|
go run script/promote-to-tags.go < promote-to-tags.txt > tags/promote.gen.go
|
|
|
|
|
|
|
|
|
|
fmt: $(SOURCES) tags
|
|
|
|
|
go fmt ./...
|
|
|
|
|
|
|
|
|
|
check: $(SOURCES) tags promote-to-tags
|
|
|
|
|
go test -count 1
|
|
|
|
|
|
|
|
|
|
.cover: $(SOURCES) tags promote-to-tags
|
|
|
|
|
go test -count 1 -coverprofile .cover
|
|
|
|
|
|
|
|
|
|
cover: .cover
|
|
|
|
|
go tool cover -func .cover
|
|
|
|
|
|
|
|
|
|
showcover: .cover
|
|
|
|
|
go tool cover -html .cover
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
go clean
|
|
|
|
|
rm -f tags/*.gen.go
|