[FE training-materials-updates] makefile: have the labs generate \training too
Maxime Ripard
maxime.ripard at free-electrons.com
Tue Jul 22 18:32:11 CEST 2014
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=9e228ce5e8f10edde648c88983b8a1719fcb3f81
>---------------------------------------------------------------
commit 9e228ce5e8f10edde648c88983b8a1719fcb3f81
Author: Maxime Ripard <maxime.ripard at free-electrons.com>
Date: Tue Jul 22 18:28:16 2014 +0200
makefile: have the labs generate \training too
Up until now, the \training variable was only filled with SLIDES_TRAINING, even
though we were building a lab.
Obviously, it was resulting in a empty variable whenever in the labs.
Introduce a TRAINING variable, that will be output to \training, that will be
set either to SLIDES_TRAINING or to LABS_TRAINING, so that we can rely on it in
any case.
Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
>---------------------------------------------------------------
9e228ce5e8f10edde648c88983b8a1719fcb3f81
Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 73519b5..f7c1348 100644
--- a/Makefile
+++ b/Makefile
@@ -386,6 +386,8 @@ endif
SLIDES_COMMON_AFTER = common/slide-footer.tex
endif
+TRAINING = $(SLIDES_TRAINING)
+
ifeq ($(SLIDES_CHAPTERS),)
$(error "No chapter to build, maybe you're building a single chapter whose name doesn't start with a training session name")
endif
@@ -437,12 +439,15 @@ LABS_VARSFILE = common/$(LABS_TRAINING)-labs-vars.tex
LABS_CHAPTERS = $($(call UPPERCASE, $(LABS_TRAINING))_LABS)
LABS_FOOTER = common/labs-footer.tex
else
+LABS_TRAINING = $(firstword $(subst -, , $(LABS)))
LABS_VARSFILE = common/single-lab-vars.tex
LABS_CHAPTERS = $(LABS)
LABS_HEADER = common/single-lab-header.tex
LABS_FOOTER = common/labs-footer.tex
endif
+TRAINING = $(LABS_TRAINING)
+
# Compute the set of corresponding .tex files and pictures
LABS_TEX = \
$(LABS_VARSFILE) \
@@ -542,7 +547,7 @@ $(OUTDIR)/%.jpg: %.jpg
$(VARS): FORCE
@mkdir -p $(dir $@)
/bin/echo "\def \sessionurl {$(SESSION_URL)}" > $@
- /bin/echo "\def \training {$(SLIDES_TRAINING)}" >> $@
+ /bin/echo "\def \training {$(TRAINING)}" >> $@
clean:
$(RM) -rf $(OUTDIR) *.pdf
More information about the training-materials-updates
mailing list