# Makefile for lualatex # Paths and filenames SRC_DIR = src OUT_DIR = out MAIN_TEX = main.tex # in SRC_DIR MAIN_PDF = main.pdf # in OUT_DIR # LaTeX and Biber commands LATEX = lualatex BIBER = biber LATEX_OPTS := -output-directory=$(OUT_DIR) -interaction=nonstopmode -shell-escape .PHONY: default release clean default: english release: german english # Default target english: sed -r -i 's/usepackage\[[^]]+\]\{babel\}/usepackage[english]{babel}/' $(SRC_DIR)/$(MAIN_TEX) -cd $(SRC_DIR) && latexmk -lualatex -g main.tex mv $(OUT_DIR)/$(MAIN_PDF) $(OUT_DIR)/$(shell date -I)_en_Formulary.pdf german: sed -r -i 's/usepackage\[[^]]+\]\{babel\}/usepackage[german]{babel}/' $(SRC_DIR)/$(MAIN_TEX) -cd $(SRC_DIR) && latexmk -lualatex -g main.tex mv $(OUT_DIR)/$(MAIN_PDF) $(OUT_DIR)/$(shell date -I)_de_Formelsammlung.pdf # Clean auxiliary and output files clean: rm -r $(OUT_DIR) # Phony targets .PHONY: all clean biber