call viewer after building a pdf
authorMichael Adam <obnox@samba.org>
Sat, 16 May 2015 23:15:11 +0000 (01:15 +0200)
committerMichael Adam <obnox@samba.org>
Sat, 16 May 2015 23:15:11 +0000 (01:15 +0200)
Makefile

index f84899a..f054ed6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,9 @@ CMN_DEPS_TEX = $(CMD_DEPS) beamercolorthemeobnoxsamba.sty beamerouterthemeobnoxi
 
 COMMON_DEPS = $(CMN_DEPS) content.tex base.tex
 
+VIEWER = evince
+SHOW = yes
+
 .SUFFIXES: .tex .pdf .dia .png .fig .svg .wiki
 
 .PHONY: all
@@ -154,6 +157,7 @@ content.tex: content.wiki
 .tex.pdf:
        pdflatex $<
        pdflatex $<
+       if [ "$(SHOW)" = "yes" ]; then $(VIEWER) $@ ; fi &
 
 .dia.png:
        @dia -e $@ $<