bsc-leon-vatthauer/agda/Makefile

34 lines
1,007 B
Makefile

.PHONY: all clean pandoc Everything.agda
all: agda
make pandoc
pandoc: public/*.md
@$(foreach file,$^, \
pandoc $(file) -s --to=html+TEX_MATH_DOLLARS --mathjax -c Agda.css -o $(file:.md=.html) ; \
)
agda: Everything.agda
agda --html --html-dir=public src/index.lagda.md --html-highlight=auto -i.
rm -f public/Agda.css
cp Agda.css public/Agda.css
clean:
rm -f Everything.agda
rm -rf public/*
find . -name '*.agdai' -exec rm \{\} \;
# push compiled html to my cip directory
push: all
chmod +w public/Agda.css
rm -rf bsc-thesis
mv -T public bsc-thesis
scp -r bsc-thesis hy84coky@cip1d1.cip.cs.fau.de:.www/
mv -T bsc-thesis public
Everything.agda:
echo "{-# OPTIONS --guardedness #-}" > src/Everything.agda
git ls-files | egrep '^src/[^\.]*.l?agda(\.md)?' | grep -v 'index.lagda.md' | grep -v 'bsc.agda-lib' | sed -e 's|^src/[/]*|import |' -e 's|/|.|g' -e 's/.agda//' -e '/import Everything/d' -e 's/..md//' | LC_COLLATE='C' sort >> src/Everything.agda
open:
firefox public/index.html