Permalink
Browse files

added dist target to tklbam

  • Loading branch information...
lirazsiri committed Aug 11, 2011
1 parent e47b9f0 commit abf3846510746adbc44f34ec23944ece6c7d8e14
Showing with 10 additions and 1 deletion.
  1. +10 −1 Makefile
View
@@ -5,7 +5,7 @@ name=
prefix = /usr/local
PATH_BIN = $(prefix)/bin
PATH_INSTALL_LIB = $(prefix)/lib/$(progname)
-PATH_DIST := $(progname)-$(shell date +%F)
+PATH_DIST := $(progname)-$$(autoversion HEAD)
SHELL = /bin/bash
@@ -15,6 +15,15 @@ debug:
$(foreach v, $V, $(warning $v = $($v)))
@true
+dist:
+ -mkdir -p $(PATH_DIST)
+
+ cp -a .git $(PATH_DIST)
+ cd $(PATH_DIST) && git-checkout --force HEAD
+
+ tar jcvf $(PATH_DIST).tar.bz2 $(PATH_DIST)
+ rm -rf $(PATH_DIST)
+
help:
@echo '=== Targets:'
@echo 'install [ prefix=path/to/usr ] # default: prefix=$(value prefix)'

0 comments on commit abf3846

Please sign in to comment.