summaryrefslogtreecommitdiff
path: root/coaching/in-
  1. markdown-snippets := topbar.mdwn footer.mdwn
  2. hypertext-snippets = $(markdown-snippets:%.mdwn=%.html)
  3. markdown := $(filter-out $(markdown-snippets),$(wildcard *.mdwn */*.mdwn */*/*.mdwn))
  4. hypertext = $(subst index/index,index,$(markdown:%.mdwn=%/index.html))
  5. graph := $(wildcard *.dot */*.dot */*/*.dot)
  6. <
>shell head --lines=1 index.mdwn | grep --perl-regexp --only-matching '^\#\s*\K(\S+(\s\S+)*)+')
  • compass_plugins = h5bp
  • all: $(hypertext) $(vectorimage-graph) style.css
  • update: .git
  • git pull
  • $(MAKE) all
  • $(hypertext-snippets): %.html: %.mdwn Makefile
  • pandoc -f markdown -t html -o $@ $<
  • sed -i -e '1i <div class=\"$*\">' -e '$$ a </div>' $@
  • $(vectorimage-graph): %.svg: %.dot Makefile
  • dot -Tsvg -o$@ $<
  • %.html %/index.html: %.mdwn $(hypertext-snippets) Makefile
  • $(eval title = $(shell head --lines=1 $< | grep --perl-regexp --only-matching '^\#\s*\K(\S+(\s\S+)*)+'))
  • $(if $(filter-out ./,$(dir $@)),mkdir -p $(dir $@))
  • pandoc -s $(if $(title),--metadata pagetitle='$(if $(filter-out $(sitetitle),$(title)),$(sitetitle) -- )$(title)') -c $(shell realpath --relative-to=$(dir $@) style.css) -B topbar.html -A footer.html -f markdown -t html -o $@ $<
  • %.css : %.scss Makefile
  • sassc --load-path /usr/share/sass/stylesheets $(compass_plugins:%=--load-path /usr/share/compass/frameworks/%/stylesheets) --style compressed $< $@
  • clean:
  • rm -f $(vectorimage-graph)
  • find -type f -name '*.html' -delete
  • find -type d -empty -delete
  • rm -f style.css style.css.map
  • rm -rf .sass-cache
  • MAKEFLAGS += --jobs
  • .NOTPARALLEL: source
  • .PHONY: all update clean