diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-01-14 23:12:34 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-01-14 23:12:34 -0500 |
commit | 1ea23bda1842020eed05dadcd71ed744e1d64454 (patch) | |
tree | 9da0e1d9c93f4ff9568c1cc3903409c657461554 | |
parent | e4a96cee395549dccb18f81b03724fe2d517c88f (diff) | |
download | makefile_templates-1ea23bda1842020eed05dadcd71ed744e1d64454.tar.gz makefile_templates-1ea23bda1842020eed05dadcd71ed744e1d64454.zip |
added makefiles to process beamer lectures
-rw-r--r-- | beamer_lecture.mk | 62 | ||||
-rw-r--r-- | subdir_makefile/Makefile | 1 |
2 files changed, 63 insertions, 0 deletions
diff --git a/beamer_lecture.mk b/beamer_lecture.mk new file mode 100644 index 0000000..479f948 --- /dev/null +++ b/beamer_lecture.mk @@ -0,0 +1,62 @@ +# -*- make -*- +# (C) 2014 by Eugeniy Mikhailov, <evgmik@gmail.com> + +# lecturedir = $(shell basename $(CURDIR)) +# lecture_num = $(lecturedir:lecture%=%) + +ifneq ($(strip $(lecture_num)),) +CLEAN_TARGETS += +REAL_CLEAN_TARGETS += real_clean_beamer_lecture_headers real_clean_toc + +beamer_lecture_presentation_tex = lecture$(lecture_num)_presentation.tex +beamer_lecture_handout_tex = lecture$(lecture_num)_handouts.tex + + +beamer_lecture_tex = $(beamer_lecture_presentation_tex) $(beamer_lecture_handout_tex) +beamer_lecture_pdf = $(beamer_lecture_tex:%.tex=%.pdf) + +tex_independent = $(beamer_lecture_tex) +beamer_lecture_includes = $(wildcard body/*.tex) + +beamer_lecture_inputs += $(beamer_lecture_includes:%=\\\\input{%}) +toc_t2t = toc.t2t + + +toc: $(toc_t2t) +$(toc_t2t): $(tex_includes) + ../bin/lecture_toc_creator.sh > $@ + +real_clean_toc: +ifneq ($(strip $(toc_t2t)),) + rm -f $(toc_t2t) +endif + +real_clean_beamer_lecture_headers: + rm -f $(beamer_lecture_tex) + +dest_dir_beamer_lecture: + $(INSTALL) -d -m 0755 $(dest_dir) + +pdf_beamer_lecture_tex: $(beamer_lecture_pdf) + +install_pdf_beamer_lecture_tex: dest_dir_beamer_lecture pdf_beamer_lecture_tex +ifneq ($(strip $(beamer_lecture_pdf)),) + $(INSTALL) -m 0644 $(beamer_lecture_pdf) $(dest_dir)/ +endif + + +$(beamer_lecture_handout_tex): + cat ../tex_preambule/lecture_handout.textemplate \ + | sed s/%%%date%%%/"${tex_date}"/ \ + | sed s!%%%body_includes%%%!"${beamer_lecture_inputs}"! \ + > $@ + +$(beamer_lecture_presentation_tex): + cat ../tex_preambule/lecture_presentation.textemplate \ + | sed s/%%%date%%%/"${tex_date}"/ \ + | sed s!%%%body_includes%%%!"${beamer_lecture_inputs}"! \ + > $@ + +# end of lecture_num if conditon +endif + diff --git a/subdir_makefile/Makefile b/subdir_makefile/Makefile index 65fa78f..6e5933f 100644 --- a/subdir_makefile/Makefile +++ b/subdir_makefile/Makefile @@ -5,6 +5,7 @@ TOPDIR ?= .. include ./local.mk include $(TOPDIR)/common.mk include $(MAKEINCLUDE_DIR)/t2t.mk +include $(MAKEINCLUDE_DIR)/beamer_lecture.mk include $(MAKEINCLUDE_DIR)/tex.mk include $(MAKEINCLUDE_DIR)/css.mk include $(MAKEINCLUDE_DIR)/raw.mk |