Commit 23646ac2fdc8fdca78d89fa10dae3db64f026be3

Thomas de Grivel 2012-04-20T06:57:20

make dist -> tarball

diff --git a/Makefile b/Makefile
index 1c5d1e1..b8fd528 100644
--- a/Makefile
+++ b/Makefile
@@ -25,4 +25,17 @@ SRCS =	git-auth.c \
 	symtable.c symtable.h \
 	sympackage.c sympackage.h
 
+VER = 0.1
+
+dist: ${PROG}-${VER}.tar.gz
+
+DISTFILES = ${SRCS} ${PROG}.1 Makefile
+
+${PROG}-${VER}.tar.gz: ${DISTFILES}
+	mkdir ${PROG}-${VER}
+	cp ${DISTFILES} ${PROG}-${VER}
+	tar czf $@.tmp ${PROG}-${VER}
+	rm -rf ${PROG}-${VER}
+	mv $@.tmp $@
+
 .include <bsd.prog.mk>