PDF_APP ?= zathura OUTPUT ?= output GEN_DIR ?= images/generated SVG_DIR ?= images/svg PIX_DIR ?= images/bitmap SVG_FILES = $(wildcard $(SVG_DIR)/*.svg) GEN_FILES = $(subst $(SVG_DIR), $(GEN_DIR),$(subst .svg,.pdf,$(SVG_FILES))) PIX_FILES = $(wildcard $(PIX_DIR)/*.*) default: build build: $(OUTPUT)/resume_fr.pdf images: $(GEN_FILES) $(OUTPUT)/%.pdf: %.tex $(GEN_FILES) $(PIX_FILES) @$(shell mkdir -p $(OUTPUT)) @lualatex --interaction=nonstopmode --output-directory $(OUTPUT) $< $(GEN_DIR)/%.pdf : $(SVG_DIR)/%.svg @echo export PDF from $@ @inkscape --export-type=pdf --export-pdf-version=1.4 -o $@ $< .PHONY: echo echo: @echo "bitmap images files: $(PIX_FILES)" @echo "svg files: $(SVG_FILES)" @echo "generated figures: $(GEN_FILES)" .PHONY: view view: $(PDF_APP) $(OUTPUT)/resume_fr.pdf .PHONY: clean clean: rm -rf $(GEN_DIR)/* $(OUTPUT)