summaryrefslogtreecommitdiff
path: root/matlab_usage_source/Makefile
blob: 9ed831d1b8b5eec9561ef2c49500d9ddf60abc93 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# -*- make -*-
# FILE: "/home/evmik/jobs/wm/2013_fall_Experimental_Atomic_Physics_251/matlab_usage_source/Makefile"
# LAST MODIFICATION: "Wed, 04 Sep 2013 13:41:20 -0400 (evmik)"
# (C) 2001 by Eugeniy Mikhailov, <evmik@tamu.edu>
# $Id: Makefile,v 1.3 2003/04/23 20:40:19 evmik Exp $

MANUSCRIPT_DIR = $(shell basename `pwd`)
SUBDIR=`find ./ -maxdepth 1 -type d |sed 1d| sed /CVS/d`

INSTALL = install -C
CP_FILES = $(INSTALL) --mode=664

dest_dir = ../matlab_usage

LATEX_OPTIONS="-interaction=nonstopmode -src-specials"

DATE := $(shell date +%Y%m%d)

ROOT_OF_MAIN_TEX_FILE= EIT_filter
MAIN_TEX_FILE=$(ROOT_OF_MAIN_TEX_FILE).tex

t2t_files  = $(wildcard *.t2t)
tex_targets  = $(t2t_files:%.t2t=%.tex)
pdf_targets  = $(tex_targets:%.tex=%.pdf)	
html_targets = $(t2t_files:%.t2t=%.html)

tex_independent= 
pdf_independent= $(tex_independent:%.tex=%.pdf)

fig_files = errorbar_plot.png simple_unlabeled_plot.png simple_labeled_plot.png

misc_files = $(fig_files) $(tex_independent)

all: html $(pdf_independent) copy2dest
	make clean

html: $(html_targets)

pdf:  $(pdf_independent)

tex: $(tex_targets)



$(html_targets): %.html : %.t2t
	txt2tags --css-sugar --toc --toc-level=1 -t html -o $@ $< 
	

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

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

$(dest_dir):
	$(INSTALL) -d $(dest_dir)

copy2dest: $(dest_dir) pdf
	$(CP_FILES)  $(html_targets) $(dest_dir)/
	#$(CP_FILES)  $(pdf_independent) $(dest_dir)/
	$(CP_FILES)  $(misc_files) $(dest_dir)/

clean: clean_tex
	rm -f last_time_uploaded
	
real_clean: clean_all
	
clean_all: clean	
	rm -f $(pdf_targets)
	rm -f $(pdf_independent)
	rm -f $(html_targets)

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

clean_bib:
	rm -f $(tex_targets:%.tex=%.bbl)