# -*- make -*- TOPDIR=$(shell pwd) make = make include $(TOPDIR)/common.mk 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 labbook_sample = ./labbook_sample samples += $(labreport_sample) $(labbook_sample) ./matlab_usage 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 -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/
/\n/' | \ cat > cal.html