From 49b300fbb4fc8cabb1afd0894503fba2d612966c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 9 Jul 2020 18:14:31 +0200 Subject: [PATCH] build: makefile: more modular rules --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 03c4524..72e3d47 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,15 @@ +BUILD_DIR := build +FILES := \ + cv_en.pdf \ + .PHONY: all -all: cv_en.pdf +all: $(FILES) -cv_en.pdf: build/cv_en.pdf - cp build/cv_en.pdf . +%.pdf: $(BUILD_DIR)/%.pdf + cp $< $@ -.PHONY: build/cv_en.pdf -build/cv_en.pdf: - @latexmk # Let the tool do its job +$(BUILD_DIR)/%.pdf: %.tex + @latexmk $< # Let the tool do its job .PHONY: clean clean: