# -*- make -*- # FILE: "/home/evmik/src/my_src/GradeBook/Makefile" # LAST MODIFICATION: "Mon, 30 Jan 2012 11:09:22 -0500 (evmik)" # (C) 2011 by Eugeniy Mikhailov, # $Id:$ # TOPDIR=$(shell pwd) GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch $(shell [ -f $(TOPDIR)/.git/HEAD ] && sed 's/ref: refs\/heads\/\(.*\)/\\\\\\"\1\\\\\\"/g' $(TOPDIR)/.git/HEAD || echo 'unknown'))" VERSION:=$(shell git describe --tags --abbrev=0) upscr = rsync -ave ssh upload_location_code = physics.wm.edu:public_html/cgi-bin/ upload_location_styles = physics.wm.edu:public_html/ upload_location_javascript = physics.wm.edu:public_html/ upload_location_icons = physics.wm.edu:public_html/icons/ cgi_code_files = ./GradeBook.tcl ./GradeBook_lib.tcl ./libBasicTableOperations.tcl ./txtPlot.tcl files4upload_code = $(cgi_code_files) ./gb_config.tcl files4upload_styles = ./GradeBook.css files4upload_javascript = ./GradeBook.js files4upload_icons = $(wildcard ./icons/*.png) default: config upload_cgi: upload_code upload_styles upload_icons upload_javascript upload_icons: $(upscr) $(files4upload_icons) $(upload_location_icons) upload_code: config $(upscr) $(files4upload_code) $(upload_location_code) upload_styles: style $(upscr) $(files4upload_styles) $(upload_location_styles) upload_javascript: $(upscr) $(files4upload_javascript) $(upload_location_javascript) style: GradeBook.css GradeBook.css: GradeBook.scss sass $< > $@ config: gb_config.tcl gb_config.tcl: gb_config.template $(cgi_code_files) sed s/__VERSION__/{$(GIT_VERSION)}/ < $< > $@