# Sander van Veen - 6167969 - University of Amsterdam - <sandervv@gmail.com>
#
# Basic Makefile used to simplify the compilation. Running "make" (without any
# arguments) from the command line will build the report for this assignment.
#

.PHONY: all clean compile highlight

SHELL := /bin/bash

all: highlight compile

clean:
	rm -vf *.{out,aux,toc,nav,snm} foo.tex presentation.pdf

compile: presentation.pdf

highlight: basic-example.tex
	$(MAKE) -C code

%.pdf: %.tex
	pdflatex -interaction=nonstopmode -halt-on-error $^
	pdflatex -interaction=nonstopmode -halt-on-error $^
	rm -vf *.log

basic-example.tex: code/basic-example.js
	pygmentize -O style=colorful -o $@ $^

#graph.tex: graph.dot
#	dot2tex -t math $^ | \
#		sed 's/\\\(use\|enl\|doc\|page\|\(end\|begin\){doc\).*//' > $@

