1
0
html/Makefile

66 lines
1.8 KiB
Makefile
Raw Normal View History

2025-10-31 20:28:34 +01:00
sources = $(shell find . -name "*.go" | grep -v [.]gen[.]go)
2025-09-11 20:50:00 +02:00
default: build
all: clean fmt build cover
2025-10-31 20:28:34 +01:00
build: $(sources) tags promote-to-tags
2025-09-11 20:50:00 +02:00
go build
2025-10-06 00:37:10 +02:00
tags: \
tag/block.gen.go \
tag/inline.gen.go \
tag/void.block.gen.go \
tag/void.inline.gen.go \
tag/inlinechildren.gen.go \
2025-10-29 21:04:07 +01:00
tag/preformatted.gen.go \
2025-10-06 00:37:10 +02:00
tag/script.gen.go
go fmt tag/*
2025-09-11 20:50:00 +02:00
2025-10-06 00:37:10 +02:00
promote-to-tags: tag/promote.gen.go
go fmt tag/*
2025-09-11 20:50:00 +02:00
2025-10-31 20:28:34 +01:00
tag/block.gen.go: $(sources) tag.block.txt
2025-10-07 13:25:53 +02:00
go run script/generate-tags.go < tag.block.txt > tag/block.gen.go
2025-09-11 20:50:00 +02:00
2025-10-31 20:28:34 +01:00
tag/inline.gen.go: $(sources) tag.inline.txt
2025-10-07 13:25:53 +02:00
go run script/generate-tags.go Inline < tag.inline.txt > tag/inline.gen.go
2025-09-11 20:50:00 +02:00
2025-10-31 20:28:34 +01:00
tag/inlinechildren.gen.go: $(sources) tag.inlinechildren.txt
2025-10-07 13:25:53 +02:00
go run script/generate-tags.go InlineChildren < tag.inlinechildren.txt > tag/inlinechildren.gen.go
2025-10-31 20:28:34 +01:00
tag/void.block.gen.go: $(sources) tag.void.block.txt
2025-10-07 13:25:53 +02:00
go run script/generate-tags.go Void < tag.void.block.txt > tag/void.block.gen.go
2025-09-11 20:50:00 +02:00
2025-10-31 20:28:34 +01:00
tag/void.inline.gen.go: $(sources) tag.void.inline.txt
2025-10-07 13:25:53 +02:00
go run script/generate-tags.go Void Inline < tag.void.inline.txt > tag/void.inline.gen.go
2025-09-11 20:50:00 +02:00
2025-10-31 20:28:34 +01:00
tag/preformatted.gen.go: $(sources) tag.preformatted.txt
2025-10-29 21:04:07 +01:00
go run script/generate-tags.go Preformatted < tag.preformatted.txt > tag/preformatted.gen.go
2025-10-31 20:28:34 +01:00
tag/script.gen.go: $(sources) tag.script.txt
2025-10-07 13:25:53 +02:00
go run script/generate-tags.go ScriptContent < tag.script.txt > tag/script.gen.go
2025-09-11 20:50:00 +02:00
2025-10-31 20:28:34 +01:00
tag/promote.gen.go: $(sources) promote-to-tags.txt
2025-10-07 13:25:53 +02:00
go run script/promote-to-tags.go < promote-to-tags.txt > tag/promote.gen.go
2025-09-11 20:50:00 +02:00
2025-10-31 20:28:34 +01:00
fmt: $(sources) tags
2025-09-11 20:50:00 +02:00
go fmt ./...
2025-10-31 20:28:34 +01:00
check: $(sources) tags promote-to-tags
2025-09-11 20:50:00 +02:00
go test -count 1
2025-10-31 20:28:34 +01:00
.cover: $(sources) tags promote-to-tags
2025-09-11 20:50:00 +02:00
go test -count 1 -coverprofile .cover
cover: .cover
go tool cover -func .cover
showcover: .cover
go tool cover -html .cover
clean:
go clean
2025-10-06 00:37:10 +02:00
rm -f tag/*.gen.go
2025-10-08 19:04:01 +02:00
rm .cover