Skip to content

Commit

Permalink
Makefile: replace __SESSION_NAME__ in the .tex by the session name
Browse files Browse the repository at this point in the history
This allows to have __SESSION_NAME__ replaced even in verbatim
environments and \code{...} macros.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  • Loading branch information
tpetazzoni committed Jan 29, 2020
1 parent c0d86ca commit 64d2e69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -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)
Expand Down

0 comments on commit 64d2e69

Please sign in to comment.