diff options
-rw-r--r-- | .hgignore | 2 | ||||
-rw-r--r-- | Makefile | 17 |
2 files changed, 18 insertions, 1 deletions
@@ -3,4 +3,4 @@ syntax: glob *.o
_hgversion
mdns-repeater
-
+mdns-repeater-*.zip
@@ -1,5 +1,12 @@ # Makefile for mdns-repeater + +ZIP_NAME = mdns-repeater-$(HGVERSION) + +ZIP_FILES = mdns-repeater \ + README.txt \ + LICENSE.txt + HGVERSION=$(shell hg parents --template "{latesttag}.{latesttagdistance}") CFLAGS=-Wall @@ -21,6 +28,15 @@ mdns-repeater.o: _hgversion mdns-repeater: mdns-repeater.o +.PHONY: zip +zip: TMPDIR := $(shell mktemp -d) +zip: mdns-repeater + mkdir $(TMPDIR)/$(ZIP_NAME) + cp $(ZIP_FILES) $(TMPDIR)/$(ZIP_NAME) + -$(RM) $(CURDIR)/$(ZIP_NAME).zip + cd $(TMPDIR) && zip -r $(CURDIR)/$(ZIP_NAME).zip $(ZIP_NAME) + -$(RM) -rf $(TMPDIR) + # version checking rules .PHONY: dummy _hgversion: dummy @@ -30,4 +46,5 @@ clean: -$(RM) *.o -$(RM) _hgversion -$(RM) mdns-repeater + -$(RM) mdns-repeater-*.zip |