summaryrefslogtreecommitdiff
path: root/make_templates
diff options
context:
space:
mode:
Diffstat (limited to 'make_templates')
-rw-r--r--make_templates/t2t.mk9
-rw-r--r--make_templates/tex.mk7
2 files changed, 16 insertions, 0 deletions
diff --git a/make_templates/t2t.mk b/make_templates/t2t.mk
index 9a07ddd..64d1535 100644
--- a/make_templates/t2t.mk
+++ b/make_templates/t2t.mk
@@ -1,6 +1,9 @@
# -*- make -*-
# (C) 2013 by Eugeniy Mikhailov, <evgmik@gmail.com>
+CLEAN_TARGETS += clean_tex
+REAL_CLEAN_TARGETS += real_clean_tex
+
t2t_files = $(wildcard *.t2t)
tex_from_t2t = $(t2t_files:%.t2t=%.tex)
pdf_from_t2t = $(tex_from_t2t:%.tex=%.pdf)
@@ -28,11 +31,17 @@ dest_dir_t2t:
$(INSTALL) -d -m 0755 $(dest_dir)
install_html_t2t: dest_dir_t2t $(html_from_t2t)
+ifneq ($(strip $(html_from_t2t)),)
$(INSTALL) -m 0644 $(html_from_t2t) $(dest_dir)/
+endif
+ifneq ($(strip $(t2t_fig_files)),)
$(INSTALL) -m 0644 $(t2t_fig_files) $(dest_dir)/
+endif
install_pdf_t2t: dest_dir_t2t $(pdf_from_t2t)
+ifneq ($(strip $(pdf_from_t2t)),)
$(INSTALL) -m 0644 $(pdf_from_t2t) $(dest_dir)/
+endif
clean_t2t: clean_t2t_tex
diff --git a/make_templates/tex.mk b/make_templates/tex.mk
index e529d7b..01c32b1 100644
--- a/make_templates/tex.mk
+++ b/make_templates/tex.mk
@@ -1,6 +1,9 @@
# -*- make -*-
# (C) 2013 by Eugeniy Mikhailov, <evgmik@gmail.com>
+CLEAN_TARGETS += clean_t2t
+REAL_CLEAN_TARGETS += real_clean_t2t
+
pdf_from_independent_tex= $(tex_independent:%.tex=%.pdf)
pdf_tex: $(pdf_from_independent_tex)
@@ -12,8 +15,12 @@ dest_dir_tex:
$(INSTALL) -d -m 0755 $(dest_dir)
install_pdf_tex: dest_dir_tex $(pdf_from_independent_tex)
+ifneq ($(strip $(pdf_from_independent_tex)),)
$(INSTALL) -m 0644 $(pdf_from_independent_tex) $(dest_dir)/
+endif
+ifneq ($(strip $(tex_fig_files)),)
$(INSTALL) -m 0644 $(tex_fig_files) $(dest_dir)/
+endif
clean_tex: clean_tex_aux