diff options
-rw-r--r-- | Makefile | 98 | ||||
-rw-r--r-- | css_styles/evmik.scss (renamed from evmik.scss) | 0 | ||||
-rw-r--r-- | css_styles/local.mk | 14 | ||||
-rw-r--r-- | make_templates/css.mk | 33 |
4 files changed, 61 insertions, 84 deletions
@@ -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 diff --git a/evmik.scss b/css_styles/evmik.scss index 514d16e..514d16e 100644 --- a/evmik.scss +++ b/css_styles/evmik.scss diff --git a/css_styles/local.mk b/css_styles/local.mk new file mode 100644 index 0000000..fa5c1a0 --- /dev/null +++ b/css_styles/local.mk @@ -0,0 +1,14 @@ +# -*- make -*- +# (C) 2013 by Eugeniy Mikhailov, <evgmik@gmail.com> + + +#PACKAGE_DIR = $(shell basename `pwd`) +PACKAGE_DIR = . + +tex_independent := +t2t_fig_files := +tex_fig_files := + +REQUIRED_TARGETS += css +INSTALL_TARGETS += install_css + diff --git a/make_templates/css.mk b/make_templates/css.mk new file mode 100644 index 0000000..f705738 --- /dev/null +++ b/make_templates/css.mk @@ -0,0 +1,33 @@ +# -*- make -*- +# (C) 2013 by Eugeniy Mikhailov, <evgmik@gmail.com> + +CLEAN_TARGETS += clean_css +REAL_CLEAN_TARGETS += real_clean_css + +scss_files = $(wildcard *.scss) +css_targets = $(scss_files:%.scss=%.css) + +css: $(css_targets) + +$(css_targets): %.css : %.scss + sass $< > $@ + +clean_css: + rm -rf .sass-cache + +real_clean_css: + rm -f $(css_targets) + +dest_dir_css: + $(INSTALL) -d -m 0755 $(dest_dir) + +install_css: dest_dir_css +ifneq ($(strip $(css_targets)),) + $(INSTALL) -m 0644 $(css_targets) $(dest_dir)/ +endif + +install_css_src: dest_dir_css +ifneq ($(strip $(scss_files)),) + $(INSTALL) -m 0644 $(scss_files) $(dest_dir)/ +endif + |