MODE ?= main REBUILD_DEPS ?= yes DEPS := ifeq ($(REBUILD_DEPS), yes) DEPS += figures/timing-1.pdf figures/timing-2.pdf figures/timing-3.pdf endif .PHONY: all clean all: main.pdf main.pdf: $(DEPS) figures/%.pdf: figures/%.tex latexmk -pdf -shell-escape $< cp $(notdir $@) $@ || true chapters/scheduling.pdf: figures/timing-3.pdf # silent structure,structures,pages,resolvers,open source,close source,loading,modules %.pdf: %.tex context --mode=$(MODE) --nonstopmode --silent='*' $< cp $(notdir $@) $@ || true