diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-04-19 08:49:17 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-04-19 08:49:17 +0200 |
commit | eb0cfce8013d4bfcd45cc1162cce865e655ac459 (patch) | |
tree | e3670a57713dd4d47da408d6e460ebbbbfe95b92 /Makefile | |
parent | 7496179380cc1012c44257336d9871a5864bfcc0 (diff) | |
download | iot-workshop-ndc-2018-eb0cfce8013d4bfcd45cc1162cce865e655ac459.tar.gz iot-workshop-ndc-2018-eb0cfce8013d4bfcd45cc1162cce865e655ac459.tar.bz2 iot-workshop-ndc-2018-eb0cfce8013d4bfcd45cc1162cce865e655ac459.tar.xz iot-workshop-ndc-2018-eb0cfce8013d4bfcd45cc1162cce865e655ac459.zip |
wip
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 28 insertions, 12 deletions
@@ -4,21 +4,34 @@ SLIDE_THEME=boxes PDFS=$(P)-text.pdf $(P)-slides.pdf HTMLS=$(P)-reveal.html -RUN_PP_BEAMER=pp -DBEAMER -RUN_PANDOC_BEAMER=pandoc -f markdown -t beamer --highlight-style=pygments -V theme:$(SLIDE_THEME) \ - --pdf-engine=xelatex +ifeq (1,$(QUICK)) +PP_DEFS+=QUICK +PDF_ENGINE = pdflatex +PANDOC_ARGS += --no-highlight +else +PDF_ENGINE = xelatex +PANDOC_ARGS += --highlight-style=pygments +endif + +RUN_PP_BEAMER=pp -DBEAMER $(patsubst %,-D%,$(PP_DEFS)) +RUN_PP_REVEALJS=pp -DREVEALJS $(patsubst %,-D%,$(PP_DEFS)) +RUN_PANDOC_BEAMER=pandoc -f markdown -t beamer $(PANDOC_ARGS) -V theme:$(SLIDE_THEME) \ + --pdf-engine=$(PDF_ENGINE) RUN_PANDOC_REVEALJS=pandoc -f markdown -t revealjs -s -V revealjs-url=./bower_components/reveal.js -RUN_PANDOC_TEXT=pandoc -f markdown --pdf-engine=xelatex +RUN_PANDOC_TEXT=pandoc -f markdown --pdf-engine=$(PDF_ENGINE) -all: $(PDFS) $(HTMLS) +all: toc.md $(PDFS) $(HTMLS) -slides: $(P)-slides.pdf $(P)-slides.tex +slides: $(P)-slides.tex $(P)-slides.pdf html: $(P)-reveal.html .PHONY: html slides clean: rm -f $(PDFS) $(HTMLS) +toc.md: $(P).md + grep '^#' $< | sed -e 's,^# ,* ,' -e 's,^## , * ,' > $@ + spell: .$(P).md.spell .$(P).md.spell: $(P).md @@ -42,15 +55,18 @@ $(P).md: Makefile %-slides.tex: %.beamer.md $(RUN_PANDOC_BEAMER) -o $@ $< -%-reveal.html: %.md +%.revealjs.md: %.md + $(RUN_PP_REVEALJS) < $< > $@ + +%-reveal.html: %.revealjs.md $(RUN_PANDOC_REVEALJS) -o $@ $< -images/%.pdf: images/%.tex | Makefile - xelatex -output-directory=images $< -# pdfcrop $@ -# mv $(patsubst %.pdf,%-crop.pdf,$@) $@ +images/%.pdf: images/%.tex | images/pp-template Makefile + images/pp-template < $< > $(patsubst %.tex,%-full.tex,$<) + xelatex -output-directory=images $(patsubst %.tex,%-full.tex,$<) + mv $(patsubst %.pdf,%-full.pdf,$@) $@ # Dependencies -$(P).md: images/IP-Header_eng.pdf +$(P).md: images/IP-Header_eng.tex $(P).md: images/ip-header.pdf $(P).md: images/ip-header.svg |