summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDarell Tan <darell.tan@gmail.com>2011-09-20 23:38:19 +0800
committerDarell Tan <darell.tan@gmail.com>2011-09-20 23:38:19 +0800
commit8d69550aaab3eee400a490de02b1ee81e4955be3 (patch)
tree4098f8dddd00eed23f0c1d7b4d342b50859cbf0d /Makefile
parent5fd6a1b8ed95945d6ae1ecc9a9b6dc75addeed00 (diff)
downloadmdns-repeater-8d69550aaab3eee400a490de02b1ee81e4955be3.tar.gz
mdns-repeater-8d69550aaab3eee400a490de02b1ee81e4955be3.zip
Switched to a more manageable version numbering system.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d49a3bf..8ecc858 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# Makefile for mdns-repeater
-HGVERSION=$(shell hg id -i)
+HGVERSION=$(shell hg parents --template "{latesttag}.{latesttagdistance}")
CFLAGS=-Wall
@@ -17,9 +17,17 @@ CFLAGS+= -DHGVERSION="\"${HGVERSION}\""
all: mdns-repeater
+mdns-repeater.o: _hgversion
+
mdns-repeater: mdns-repeater.o
+# version checking rules
+.PHONY: dummy
+_hgversion: dummy
+ @echo $(HGVERSION) | cmp -s $@ - || echo $(HGVERSION) > $@
+
clean:
-$(RM) *.o
+ -$(RM) _hgversion
-$(RM) mdns-repeater