aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: f05776c4b38e1dd7e6d9f9c5457f195dce8e5e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
all: clean

pdf: clean
	find ./* -type f | grep -v '_.*.tex' | grep 'tex$$' > texfiles
	while read l ; do \
		latexmk -cd -lualatex $$l ; \
		done < texfiles
	while read l ; do \
		latexmk -c -cd -lualatex $$l ; \
		done < texfiles
clean:
	rm -rf .backup
	find -iname "*~" | xargs rm -rf
	find ./* -type f | grep 'makefile\|md$$\|tex$$' > ls-R
	rsync -avPr --files-from=ls-R . .backup
	cp ls-R .backup
	rm -rf *
	cp -p -r .backup/* .
	rm -rf .backup
	pandoc -s README.tex -o README.md && sed -i 's/{#.*}//g' README.md