commit 5df9b4e8688e9cc721220bea9b14d0aa7339fc64 parent cf343f9c20bfc3eaad55bc4b4ae3ef788e899c28 Author: Chris Kiriakou <chris@kiriakou.net> Date: Wed, 23 Sep 2026 20:41:06 +0200 Remove injected variables, instead use config.tex file Diffstat:
| M | Makefile | | | 17 | ++++++++++------- |
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,23 +1,26 @@ --include config.mk +doc ?= template +output_dir ?= $$(xdg-user-dir DOCUMENTS)/bewerbungen/$(doc) +filename ?= cv ENGINE = pdflatex -FILE_NAME = Lebenslauf_$(author_forename)_$(author_surname) -BUILD_DIR = $$(xdg-user-dir DOCUMENTS)/bewerbungen/$(doc) +BUILD_DIR = ./build/ MAIN = main.tex CONTENT_DIR = ./content/ -.PHONY: all ats clean build_dir +.PHONY: all ats clean dirs all: pdf -build_dir: +dirs: @mkdir -p $(BUILD_DIR) + @mkdir -p $(output_dir) ats: $(MAKE) pdf doc=$(doc) ATS_FLAG="\def\ats{1}" -pdf: $(MAIN) $(CONTENT_DIR) build_dir - $(ENGINE) -output-directory=$(BUILD_DIR) -jobname=$(FILE_NAME) "\def\doc{$(doc)} \def\authorname{$(author_forename) $(author_surname)} \def\authorplace{$(author_place)} \def\authoraddress{$(author_address)} \def\authorjobtitle{$(author_job_title)} \def\authorphone{$(author_phone_number)} \def\authoremail{$(author_email)} \def\authorwebsite{$(author_website)} \def\authorbirth{$(author_birth)} $(ATS_FLAG) \input{$(MAIN)}" +pdf: $(MAIN) $(CONTENT_DIR) dirs + $(ENGINE) -output-directory=$(BUILD_DIR) -jobname=$(filename) "$(ATS_FLAG)\def\doc{$(doc)}\input{config}\input{$(MAIN)}" + @cp $(BUILD_DIR)/$(filename).pdf $(output_dir) flatten: $(PDF).pdf gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=$(PDF)-flat.pdf $(PDF).pdf