From bf7b6ed92b4ff476cbec4f117801d82fdcceb0b2 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 26 Jan 2021 16:00:33 +0100 Subject: [PATCH] make userguide both compilable with make and from the file in the manual/ directory --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index eacaf5e..684c2fd 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,12 @@ VERSIONDATENEXT = $(shell date +"%Y\/%m\/%d") TARBALL=moderncv-$(VERSIONNEXT).tar EXAMPLESDIR = examples -MANUAL = $(MANUALDIR)/moderncv_userguide.tex +# MANUALTEX is used by the userguide method that operates in the +# $(MANUALDIR) folder. MANUAL is used by methods operating in +# the $(MODERNCVDIR) folder. This is to ensuer that the userguide +# is also buildable within the manual folder. +MANUALTEX = moderncv_userguide.tex +MANUAL = $(MANUALDIR)/$(MANUALTEX) TEMPLATE = $(MODERNCVDIR)/template.tex TEMPLATEBIB = publications.bib TEMPLATEBASE = $(basename $(TEMPLATE)) @@ -70,8 +75,11 @@ templates: $(TEMPLATE) $(TEMPLATEBIB) userguide: templates $(MANUAL) # build the user guide. Since the guide includes the template examples, we # build those first by calling the templates rule. - lualatex --output-directory=$(MANUALDIR) $(MANUAL) - lualatex --output-directory=$(MANUALDIR) $(MANUAL) + cd $(MANUALDIR) + ./format_files_for_userguide.py + lualatex $(MANUALTEX) + lualatex $(MANUALTEX) + cd .. version: