all: reading-log.pdf watch: ifdef TARGET while true; do \ $(MAKE) $(TARGET); \ inotifywait -qre close_write .; \ done else while true; do \ $(MAKE) all; \ inotifywait -qre close_write .; \ done endif reading-log.pdf: reading-log.md bibliography.bib pandoc \ --standalone \ --from markdown \ --to pdf \ --pdf-engine pdflatex \ --citeproc \ --output reading-log.pdf \ reading-log.md clean: rm reading-log.pdf