From 0b4e059cabe7e546f46d3b011a315c21ea4eeb40 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 7 Feb 2024 16:35:23 +0100 Subject: [PATCH] guardrail --- modele/Makefile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/modele/Makefile b/modele/Makefile index 90ec70d..d43dcbe 100644 --- a/modele/Makefile +++ b/modele/Makefile @@ -1,25 +1,32 @@ NAME = rapport BIBFILE = sources +CLASS = rapstage.cls + TEX = $(NAME).tex SRC = $(TEX) PDF = $(TEX:.tex=.pdf) -TEXMK = latexmk -shell-escape -lualatex +TEXMK = latexmk -shell-escape -lualatex -bibtex WGET = wget -q --show-progress +# Si vous n'arrivez pas à compiler le projet, vous devez probablement +# installer Pygmentize, une dépendance de minted. +# Pour cela : pip install Pygments + all: $(PDF) $(PDF): %.pdf: %.tex - @$(TEXMK) $< >/dev/null - bibtex $(BIBFILE) - @$(TEXMK) $< >/dev/null - $(TEXMK) $< +ifneq (,$(wildcard $(CLASS))) + @$(TEXMK) $< +else + @echo "Can't proceed, $(CLASS) missing." +endif EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc bbl blg clean: rm -rf $(PDF) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext)) updateclass: - @$(WGET) https://git.mylloon.fr/Paris7/rapport-stage/raw/branch/main/rapstage.cls \ - -O rapstage.cls + @$(WGET) https://git.mylloon.fr/Paris7/rapport-stage/raw/branch/main/$(CLASS) \ + -O $(CLASS)