Index: makefile ================================================================== --- makefile +++ makefile @@ -18,30 +18,29 @@ # ~~~ Rules ~~ # # The order of these dependencies is important. They will be processed left to right. -web: _article_htmls.mark $(articles-html) $(series-html) +web: vitreous.sqlite $(articles-html) $(series-html) web: index.html blog-pg1.html keyword-index.html web-extra/martin.css web: ## Rebuild all web content (not PDFs) -# The file article_htmls.mark is a zero-byte file that serves only as a marker. If it is older than -# any of its dependencies (or missing) all of the articles will be rebuilt. Its dependencies are -# also on the Pollen cache watchlist (see pollen.rkt) -_article_htmls.mark: $(core-files) $(html-deps) template.html.p +# The file vitreous.sqlite is a cache of the rendered HTML and metadata. If it is older than any of +# its dependencies (or missing) all of the articles will be rebuilt. Its dependencies are also on +# the Pollen cache watchlist (see pollen.rkt) +vitreous.sqlite: $(core-files) $(html-deps) template.html.p raco pollen setup -p articles/ raco pollen render -p -t html articles/*.poly.pm raco pollen setup -p series/ raco pollen render -p -t html series/*.poly.pm rm -f template.html series/template.html # tidy -quiet -modify -indent --wrap 100 --wrap-attributes no --tidy-mark no articles/*.html || true # tidy -quiet -modify -indent --wrap 100 --wrap-attributes no --tidy-mark no series/*.html || true - touch _article_htmls.mark -# If the rule for article_htmls.mark was triggered, all the article HTML files will already have -# been re-rendered. (That rule comes before this one in the list of dependencies for "all") But if -# not, any individual files that have been edited will get re-rendered. +# If the rule for vitreous.sqlite was triggered, all the article HTML files will already have been +# re-rendered. (That rule comes before this one in the list of dependencies for "all") But if not, +# any individual files that have been edited will get re-rendered. $(articles-html): %.html: %.poly.pm raco pollen render $@ # tidy -quiet -modify -indent --wrap 100 --wrap-attributes no --tidy-mark no $@ || true # Note that if any article is part of a series, it will touch its series .poly.pm file during its @@ -64,13 +63,13 @@ # tidy -quiet -modify -indent --wrap 100 --wrap-attributes no --tidy-mark no $@ || true web-extra/martin.css: web-extra/martin.css.pp raco pollen render $@ -spritz: ## Clear Pollen and Scribble cache, and remove all HTML output +zap: ## Clear Pollen and Scribble cache, and remove all HTML output raco pollen reset - rm -f *.html articles/*.html series/*.html _article_htmls.mark + rm -f *.html articles/*.html series/*.html vitreous.sqlite publish: check-env publish: ## Sync all HTML and PDF stuff to the public web server (does not rebuild any files) raco pollen publish ./util/relativize ~/Desktop/publish/ @@ -86,11 +85,10 @@ --exclude='*.fossil' \ --exclude=.fossil-settings \ --exclude=.fslckout \ --exclude='*.ltx' \ --exclude='*.swp' \ - --exclude='*.mark' \ --exclude=.DS_Store \ --exclude='template*.*' \ --exclude=makefile rm -rf ~/Desktop/publish @@ -109,11 +107,11 @@ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' article: ## Start a new article from a template racket -tm util/newpost.rkt -.PHONY: all scribble help spritz article publish check-env +.PHONY: all scribble help zap article publish check-env .DEFAULT_GOAL := help check-env: ifndef LOCALYARN_SRV