From: Mark Wooding Date: Sat, 24 May 2014 22:20:55 +0000 (+0100) Subject: Makefile: Add `dist' target. X-Git-Tag: 1.1.0~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/chopwood/commitdiff_plain/a4a97b6b268cec0f0c468fdc4700b17092bc3ba5 Makefile: Add `dist' target. I don't think source distributions are really the right answer for Chopwood, but it's a tradition, and it doesn't seem like a harmful one. For the record: you're expected to run Chopwood out of a Git clone; and users should get distributions from you using the AGPL-required `source' command. --- diff --git a/Makefile b/Makefile index 13a7b59..3ccd4e5 100644 --- a/Makefile +++ b/Makefile @@ -117,4 +117,23 @@ CLEANFILES += $(TARGETS) clean::; rm -f $(CLEANFILES) .PHONY: clean +###-------------------------------------------------------------------------- +### Distributions. + +distdir = $(PACKAGE)-$(VERSION) + +DISTFILES = $(SOURCES) +DISTFILES += AGPLv3 +DISTFILES += Makefile get-version +DISTFILES += userv.rc + +dist: + rm -rf $(distdir) + mkdir $(distdir) + cp $(DISTFILES) $(distdir) + echo $(VERSION) >$(distdir)/RELEASE + tar cvfz $(distdir).tar.gz $(distdir) + rm -rf $(distdir) +.PHONY: dist + ###----- That's all, folks --------------------------------------------------