latex-course/lectures/Makefile
Daniel Borchmann 91bb596ee3
Versuch, Makefile zu reparieren
Signed-off-by: Daniel Borchmann <daniel@algebra20.de>
2016-12-02 15:46:04 +01:00

10 lines
564 B
Makefile

# This is buggy: it replaces *all* occurrences of documentclass
# maybe this helps: https://stackoverflow.com/questions/6278057/replace-only-first-match-in-multiple-files-with-perl
%-handout.pdf: %.tex
cat $< | perl -0777 -p -e 's/^\\documentclass\[/\\documentclass\[handout,/' -e 's/^\\documentclass{/\\documentclass\[handout\]{/' | lualatex -jobname=$(basename $@)
cat $< | perl -0777 -p -e 's/^\\documentclass\[/\\documentclass\[handout,/' -e 's/^\\documentclass{/\\documentclass\[handout\]{/' | lualatex -jobname=$(basename $@)
clean:
rm -f *-handout.pdf