[bootlin/training-materials updates] master: Makefile: replace __SESSION_NAME__ in the .tex by the session name (64d2e69b)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Jan 29 15:21:53 CET 2020


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/64d2e69b6d4cfaef1d82f3b2e02a520aebfe740f

>---------------------------------------------------------------

commit 64d2e69b6d4cfaef1d82f3b2e02a520aebfe740f
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date:   Wed Jan 29 15:21:53 2020 +0100

    Makefile: replace __SESSION_NAME__ in the .tex by the session name
    
    This allows to have __SESSION_NAME__ replaced even in verbatim
    environments and \code{...} macros.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>


>---------------------------------------------------------------

64d2e69b6d4cfaef1d82f3b2e02a520aebfe740f
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 8768f9c6..168419cf 100644
--- a/Makefile
+++ b/Makefile
@@ -178,6 +178,7 @@ LABS_PICTURES = $(call PICTURES,$(foreach s,$(LABS_CHAPTERS),labs/$(s))) $(COMMO
 	echo "\input{$(VARS)}" >> $(OUTDIR)/$(basename $@).tex
 	for f in $(filter %.tex,$^) ; do \
 		cp $$f $(OUTDIR)/`basename $$f` ; \
+		sed -i 's%__SESSION_NAME__%$(LABS_TRAINING)%' $(OUTDIR)/`basename $$f` ; \
 		printf "\input{%s}\n" `basename $$f .tex` >> $(OUTDIR)/$(basename $@).tex ; \
 	done
 	(cd $(OUTDIR); $(PDFLATEX_ENV) $(PDFLATEX) $(basename $@).tex)




More information about the training-materials-updates mailing list