aboutsummaryrefslogtreecommitdiffstats
path: root/doc/thesis/Makefile
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2021-09-21 17:03:34 +0200
committerNao Pross <np@0hm.ch>2021-09-21 17:03:34 +0200
commit68339702fcf94b21ba37cc0a8e745c07aabb6ef0 (patch)
treeb523ab0a45c02e0e561fc038228c528692b6c312 /doc/thesis/Makefile
parentFix typo (diff)
downloadFading-68339702fcf94b21ba37cc0a8e745c07aabb6ef0.tar.gz
Fading-68339702fcf94b21ba37cc0a8e745c07aabb6ef0.zip
Create thesis with latex template
Diffstat (limited to '')
-rw-r--r--doc/thesis/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/thesis/Makefile b/doc/thesis/Makefile
new file mode 100644
index 0000000..3875fcc
--- /dev/null
+++ b/doc/thesis/Makefile
@@ -0,0 +1,23 @@
+TEX := pdflatex
+TEXARGS := -halt-on-error -interaction=nonstopmode
+
+SOURCES := Fading.tex
+
+# Get the main file from the file
+MAIN := $(shell sed -ne 's/^.*\!TeX root =\(.*\)$$/\1/ p' $(SOURCES))
+PDF := $(patsubst %.tex, %.pdf, $(MAIN))
+
+ifeq ($(strip $(MAIN)),)
+MAIN := $(error Failed to identify TeX root, try adding \
+ `% !TeX root = <filename>` to your main tex file)
+endif
+
+.PHONY: all
+all: $(PDF)
+
+%.pdf: %.tex $(SOURCES)
+ $(TEX) $(TEXARGS) $<
+
+.PHONY: clean
+clean:
+ @rm -vf *.aux *.aue *.lof *.log *.lot *.fls *.out *.toc *.fmt *.fot *.cb *.cb2 .*.lb *.dvi *.xdv *-converted-to.* *.bbl *.bcf *.blg *-blx.aux *-blx.bib *.run.xml *.fdb_latexmk *.synctex *.synctex\(busy\) *.synctex.gz *.synctex.gz\(busy\) *.pdfsync *.alg *.loa acs-*.bib *.thm *.nav *.pre *.snm *.vrb *.soc *.cut *.cpt *.spl *.ent *.lox *.mf *.acn *.acr *.glg *.glo *.gls *.glsdefs *.lzo *.lzs