aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/Makefile.common12
1 files changed, 8 insertions, 4 deletions
diff --git a/common/Makefile.common b/common/Makefile.common
index 92ac79a..460bdc7 100644
--- a/common/Makefile.common
+++ b/common/Makefile.common
@@ -1,5 +1,6 @@
TEX=$(shell command -v lualatex xelatex | head -n 1)
SOURCE=.
+MODEL ?= .
SRC =$(wildcard *.rst)
SVG =$(wildcard content/*.svg)
@@ -12,7 +13,7 @@ all: $(PDFS)
BIBS =$(wildcard *.bib)
DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex) )
+SOURCES := $(sort $(wildcard $(MODEL)/resources/*.tex) )
null :=
space := $(null) #
@@ -24,9 +25,12 @@ TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
#
EXTRA_RST_OPTIONS ?=
+EXTRA_STYLES ?=
+
+
# Remove the comments and the empty lines from the module list file
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^\s$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
+PACK = $(shell sed -e 's/\#.*$$//' -e '/^\s$$/d' $(MODEL)/resources/modules)
+PACKAGES = $(subst $(space),$(comma),$(strip $(PACK)))
tmp:
mkdir tmp
@@ -42,7 +46,7 @@ tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
--documentoption=12pt,A4,table \
--syntax-highlight=short \
$(EXTRA_RST_OPTIONS) \
- --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
+ --stylesheet=$(PACKAGES),$(EXTRA_STYLES),$(TEX_STYLE) $< $@
sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
sed -i -e 's/admonition-/admonition/g' $@