aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-01-25 22:58:48 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2012-01-25 23:00:52 -0500
commit508a9c236c5354e07e7c97f04d95a09a108ce9d6 (patch)
tree72cf7266e59fa3721d9723c7b5a225bcbf71c666
parentdd57bfdee98b5d0f7d796913581c28cbef956266 (diff)
downloadGradeBook-508a9c236c5354e07e7c97f04d95a09a108ce9d6.tar.gz
GradeBook-508a9c236c5354e07e7c97f04d95a09a108ce9d6.zip
Added config code generation and upload
-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)}/ < $< > $@
+