summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile98
1 files changed, 14 insertions, 84 deletions
diff --git a/Makefile b/Makefile
index 246087b..78c9d6c 100644
--- a/Makefile
+++ b/Makefile
@@ -4,84 +4,39 @@ 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
+include $(TOPDIR)/common.mk
+#include ./local.mk
+include $(MAKEINCLUDE_DIR)/t2t.mk
+include $(MAKEINCLUDE_DIR)/tex.mk
+include $(MAKEINCLUDE_DIR)/css.mk
-$(html_targets): %.html : %.t2t $(t2t_includes)
- txt2tags --css-sugar -t html -o $@ $<
+dest_dir = $(DESTDIR)$(PREFIX)/$(PACKAGE_DIR)
-$(pdf_targets): %.pdf : %.tex
- pdflatex $<
+.DEFAULT_GOAL := all
-$(tex_targets): %.tex : %.t2t $(t2t_includes)
- txt2tags -t tex -o $@ $<
+all: compile install
+compile: $(REQUIRED_TARGETS)
+clean: $(CLEAN_TARGETS)
+
+real_clean: $(REAL_CLEAN_TARGETS)
-clean_latex_tmp:
- rm -f *.aux
- rm -f *.log
- rm -f *.out
- rm -f *.tex
+install: $(INSTALL_TARGETS)
-stick:
- $(make) upload2location upload_location=/mnt/stick/$(class_base_dir)/
+upload: upload_location_wm
upload_location_wm:
@@ -93,34 +48,9 @@ upload2location:
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