aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 034f0d7..01f5eee 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,20 @@
# -*- make -*-
-# FILE: "/mnt/light_huge_archive/home/evmik/src/my_src/GradeBook/Makefile"
-# LAST MODIFICATION: "Thu, 21 Apr 2011 23:29:40 -0400 (evmik)"
+# FILE: "/home/evmik/src/my_src/GradeBook/Makefile"
+# LAST MODIFICATION: "Wed, 25 Jan 2012 22:59:44 -0500 (evmik)"
# (C) 2011 by Eugeniy Mikhailov, <evgmik@gmail.com>
# $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_icons = physics.wm.edu:public_html/icons/
-files4upload_code = ./GradeBook.tcl ./GradeBook_lib.tcl ./libBasicTableOperations.tcl
+files4upload_code = ./GradeBook.tcl ./GradeBook_lib.tcl ./libBasicTableOperations.tcl ./gb_config.tcl
files4upload_styles = ./GradeBook.css
files4upload_icons = $(wildcard ./icons/*.png)
@@ -24,7 +27,7 @@ upload_cgi: upload_code upload_styles upload_icons
upload_icons:
$(upscr) $(files4upload_icons) $(upload_location_icons)
-upload_code:
+upload_code: ./gb_config.tcl
$(upscr) $(files4upload_code) $(upload_location_code)
upload_styles: style
@@ -34,3 +37,9 @@ style: GradeBook.css
GradeBook.css: GradeBook.scss
sass $< > $@
+
+conf: gb_config.tcl
+
+gb_config.tcl: gb_config.template
+ sed s/__VERSION__/{$(GIT_VERSION)}/ < $< > $@
+