summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <hg@njw.me.uk>2011-07-21 23:24:29 +0100
committerNick White <hg@njw.me.uk>2011-07-21 23:24:29 +0100
commitb58b6005c989a102e0e3c1212949a99e9ca71e04 (patch)
tree1599c7b74369048e4572ea97c6d3369b5564f9f9
parent6975914fcab0b795aed0a19ed4c277e9f3f628a5 (diff)
Add dist rule to makefile
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ac6b529..2c50c3e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
# See COPYING file for copyright, license and warranty details.
include config.mk
+NAME = getbooks
+
SRC = getgbook.c
LIB = util.o
@@ -34,4 +36,11 @@ uninstall:
clean:
rm -f -- $(BIN) $(OBJ) util.a
-.PHONY: all clean install uninstall
+dist:
+ @mkdir -p $(NAME)-$(VERSION)
+ @cp $(SRC) util.h util.c Makefile config.mk $(NAME)-$(VERSION)
+ @tar c $(NAME)-$(VERSION) | gzip -c > $(NAME)-$(VERSION).tar.gz
+ @rm -rf $(NAME)-$(VERSION)
+ @echo $(NAME)-$(VERSION).tar.gz
+
+.PHONY: all clean install uninstall dist