# Copyright 2019 Joel Dueck
# This file is part of The Local Yarn
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
#
spritz: ## Clear Pollen and Scribble cache
rm -rf compiled code-docs/compiled articles/compiled series/compiled
fossil clean code-docs/
scribble: ## Rebuild code documentation and update Fossil repo
scribble --htmls +m --redirect https://docs.racket-lang.org/local-redirect/ code-docs/main.scrbl
fossil uv rm scribbled/*
rm -rf scribbled/*
mv main/* scribbled/
cp code-docs/scribble-iframe.html scribbled/scribble.html
rm -rf main
fossil uv add scribbled/*
fossil uv sync
# Self-documenting makefile (http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html)
help: ## Displays this help screen
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
.PHONY: scribble help spritz
.DEFAULT_GOAL := help