blob: abb3e864af33acb375ee74723864c84fa0ac48c5 (
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# -*- make -*-
make = make
class_base_dir = $(shell basename $(CURDIR))
upload_location_wm = physics.wm.edu:public_html/classes/$(class_base_dir)/
# see 2012_fall_practical_computing_for_scientists for PREVIOUS_YEAR_MATERIALS_DIR usage
PREVIOUS_YEAR_MATERIALS_DIR =
misc = ./evmik.css
weekly_slides_dir = ./weekly_pdf_slides
weekly_pdf_slides= $(wildcard $(weekly_slides_dir)/*.pdf)
syllabus_dir = ./syllabus
syllabus_pdf = $(wildcard $(syllabus_dir)/*.pdf)
syllabus_html = $(wildcard $(syllabus_dir)/*.html)
homeworks_assignment_dir = ./homeworks
homeworks_assignments = $(wildcard $(homeworks_assignment_dir)/*.pdf)
lecture_notes = ./notes
lab_manual = ./manual
labreport_sample = ./labreport_sample
samples += $(labreport_sample)
misc += $(lab_manual)
files4upload = $(html_targets) $(samples) $(syllabus_dir) $(misc)
t2t_files = $(wildcard *.t2t)
html_targets = $(t2t_files:%.t2t=%.html)
tex_targets = $(t2t_files:%.t2t=%.tex)
pdf_targets = $(t2t_files:%.t2t=%.pdf)
t2t_includes = $(wildcard ./t2t_includes/*.t2t)
t2t_includes += ./configs/config.t2t
scss_files = $(wildcard *.scss)
css_targets = $(scss_files:%.scss=%.css)
upscr = rsync --delete -ave ssh
default: html css
css: $(css_targets)
$(css_targets): %.css : %.scss
sass $< > $@
html: $(html_targets)
pdf: $(pdf_targets)
tex: $(tex_targets)
upload: upload_location_wm
$(html_targets): %.html : %.t2t $(t2t_includes)
txt2tags --css-sugar --toc --toc-level=2 -t html -o $@ $<
$(pdf_targets): %.pdf : %.tex
pdflatex $<
$(tex_targets): %.tex : %.t2t $(t2t_includes)
txt2tags -t tex -o $@ $<
clean_latex_tmp:
rm -f *.aux
rm -f *.log
rm -f *.out
rm -f *.tex
stick:
$(make) upload2location upload_location=/mnt/stick/$(class_base_dir)/
upload_location_wm:
$(make) upload2location upload_location=$(upload_location_wm)
upload2location:
$(upscr) $(files4upload) $(upload_location)
last_time_uploaded: $(files4upload) $(weekly_pdf_slides) $(lab_manuals_pdf) $(homeworks_assignments)
touch last_time_uploaded
clean: clean_latex_tmp
rm -f last_time_uploaded
rm -rf .sass-cache
clean_all: clean
rm -f $(pdf_targets)
rm -f $(tex_targets)
rm -f $(html_targets)
rm -f cal.html
rm -f tentative_list_of_topics.html
# rm -f tentative_list_of_topics.t2t
real_clean: clean_all
backup:
rsync -rvze ssh * spiffy.physics.wm.edu:jobs/wm/$(class_base_dir)/
cal: cal.html
# tentative_list_of_topics.t2t: $(PREVIOUS_YEAR_MATERIALS_DIR)/lecture*/toc.t2t
# bin/lecture_toc2tent_shed.sh $(PREVIOUS_YEAR_MATERIALS_DIR) > $@
lecture_names.rem: tentative_list_of_topics.t2t
bin/tent_sched2lec_names.sh < tentative_list_of_topics.t2t > lecture_names.rem
cal.html: tentative_list_of_topics.t2t lecture_names.rem calendar.rem
remind -p5 calendar.rem 16 jan 2013 | ./bin/rem2html -title "Modern Astrophysics calendar" | \
sed 's/<head>/<head>\n<meta name="viewport" content="width=device-width, initial-scale=1.0">/' | \
cat > cal.html
|