# Keep the .tex file around when generating the PDF .SECONDARY: # For recipe-whatever.pdf, first make recipe-whatever.tex. # Within the recipe, $* is the pattern bit, e.g. 'whatever' above. recipe-%.pdf: recipe-%.tex pdflatex -interaction=nonstopmode recipe-$*.tex # Here, we also use a pattern rule, and we pass the pattern in to emacs # as our expected SKEW env var. recipe-%.tex: recipe.org SKEW=$* emacs --script recipe.el # Make the watch command also match on pattern watch-%: watchexec --watch recipe.org make recipe-$*.pdf .PHONY: watch