summaryrefslogtreecommitdiff
path: root/make_templates/tex.mk
blob: 01c32b14f5bf903a87d925e000d094df2f0291b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- 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)

$(pdf_from_independent_tex): %.pdf : %.tex $(tex_fig_files)
	rubber -d  $< 

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

clean_tex_aux:
	rm -f $(tex_independent:%.tex=%.dvi)
	rm -f $(tex_independent:%.tex=%.log)
	rm -f $(tex_independent:%.tex=%.aux)
	rm -f $(tex_independent:%.tex=%.nav)
	rm -f $(tex_independent:%.tex=%.out)
	rm -f $(tex_independent:%.tex=%.snm)
	rm -f $(tex_independent:%.tex=%.toc)
	rm -f $(tex_independent:%.tex=%.vrb)
	rm -f $(tex_independent:%.tex=%.blg)
	rm -f $(tex_independent:%.tex=%.bbl)
	rm -f missfont.log
	rm -f *Notes.bib


real_clean_tex: clean_tex_aux
	rm -f $(pdf_from_independent_tex)