summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAgathe Porte <microjoe@microjoe.org>2018-02-09 13:32:31 +0100
committerAgathe Porte <microjoe@microjoe.org>2018-02-09 13:32:31 +0100
commit2774d9fc67cd5d18fbc9b892fda9c05118272a7a (patch)
tree16e052282c03f3998a88e1e1424aac7a4db8b704 /Makefile
parent9db9b7f386e60d72db47fa60d6458626f16b198d (diff)
downloadlatex-makefile-2774d9fc67cd5d18fbc9b892fda9c05118272a7a.tar.gz
latex-makefile-2774d9fc67cd5d18fbc9b892fda9c05118272a7a.zip
Live compilation support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 24dfd2d..48593ca 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# LaTeX basic Makefile
#
-# WTFPL, 2016 Agathe Porte (MicroJoe) <microjoe@microjoe.org>
+# WTFPL, 2016 - 2018 Agathe Porte (MicroJoe) <microjoe@microjoe.org>
#
# Inspirated from
# http://tex.stackexchange.com/questions/40738/how-to-properly-make-a-latex-project
@@ -17,6 +17,10 @@ PRINC=src/main.tex
# Main rule: Construct the PDF
all: $(PDF)
+#
+# Live: automatic watch and build of the PDF file
+live: $(PRINC) $(SOURCES)
+ source ~/.bashrc && latexmk -pvc -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make $(PRINC)
# Construct the PDF file from sources
$(PDF): $(PRINC) $(SOURCES)
@@ -45,4 +49,6 @@ clean:
mrproper: clean
@echo Removing all PDF files...
@rm -f *.pdf
+ @echo Removing all DVI files...
+ @rm -f *.dvi
@echo Done