Autogenerate git-describe version numbers
[time-slider.git] / Makefile
index 346ebe8..ef0c9aa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,20 @@
-include VERSION
+ifeq ($(wildcard .git),)
+       include VERSION
+else
+       VERSION=$(shell git describe)
+endif
 
 mkinstalldirs = /usr/bin/mkdir -p
-INSTALL = /usr/sbin/install
-INSTALL_DATA = ${INSTALL} -u root -g bin -m 644 -f
-INSTALL_PROGRAM = ${INSTALL} -u root -g bin -f
-INSTALL_SCRIPT = ${INSTALL} -f
+INSTALL = /usr/bin/install
+INSTALL_DATA = ${INSTALL} -m 644 -t
+INSTALL_PROGRAM = ${INSTALL} -t
+INSTALL_SCRIPT = ${INSTALL} -t
 RM = /usr/bin/rm -f
 RMRF = /usr/bin/rm -Rf
 RMDIR = /usr/bin/rmdir
 # Use python 2.6 if PYTHON environent is not set
 ifeq ($(strip $(PYTHON)),)
-PYTHON = /usr/bin/python2.6
+PYTHON = /usr/bin/python2
 endif
 
 SUBDIRS = po data