Makefile
24 lines
| 680 B
| text/x-makefile
|
MakefileLexer
Jonathan Frederic
|
r12661 | TPLS := $(patsubst %.tpl,../latex/skeleton/%.tplx,$(wildcard *.tpl)) | ||
Matthias BUSSONNIER
|
r9608 | |||
Jonathan Frederic
|
r12661 | all: clean $(TPLS) | ||
Matthias BUSSONNIER
|
r9608 | |||
Jonathan Frederic
|
r12661 | # Convert standard Jinja2 syntax to LaTeX safe Jinja2 | ||
# see http://flask.pocoo.org/snippets/55/ for more info | ||||
MinRK
|
r12455 | ../latex/skeleton/%.tplx: %.tpl | ||
Matthias BUSSONNIER
|
r9608 | @echo 'generating tex equivalent of $^: $@' | ||
Jonathan Frederic
|
r12661 | @echo '((= Auto-generated template file, DO NOT edit directly!\n' \ | ||
' To edit this file, please refer to ../../skeleton/README.md' \ | ||||
'=))\n\n' > $@ | ||||
Matthias BUSSONNIER
|
r9608 | @sed \ | ||
-e 's/{%/((*/g' \ | ||||
-e 's/%}/*))/g' \ | ||||
-e 's/{{/(((/g' \ | ||||
-e 's/}}/)))/g' \ | ||||
-e 's/{#/((=/g' \ | ||||
-e 's/#}/=))/g' \ | ||||
Matthias BUSSONNIER
|
r9611 | -e "s/tpl'/tplx'/g" \ | ||
Matthias BUSSONNIER
|
r9608 | $^ >> $@ | ||
clean: | ||||
@echo "cleaning generated tplx files..." | ||||
Jonathan Frederic
|
r12661 | @-rm ../latex/skeleton/*.tplx | ||