From 9ce21757892648fa12d66747deed0dd9db790b9e Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 13 Feb 2012 22:41:37 -0500 Subject: Add distribution targets to build system. --- (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index ee9a703..994eacf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -28,6 +28,12 @@ LIBDIR = @libdir@ MANDIR = @mandir@ MAKE = @make@ +PACKAGE = @package@ +VERSION = @version@ + +distdir = $(PACKAGE)-$(VERSION) +distfiles = configure Makefile.in COPYING INSTALL TODO genopkg.sh + .SUFFIXES: .PHONY: all @@ -80,3 +86,20 @@ uninstall: @cd lib && $(MAKE) $$(cat ../install.config) uninstall @printf 'Uninstalling manual pages...\n' @cd man && $(MAKE) $$(cat ../install.config) uninstall + +.PHONY: distdir dist dist-gzip dist-bzip2 + +distdir: + @[ -d '$(distdir)' ] || mkdir '$(distdir)' + @cp -pR $(distfiles) $(distdir) + @cd src && $(MAKE) distdir + @cd lib && $(MAKE) distdir + @cd man && $(MAKE) distdir + +dist dist-gzip: distdir + @tar -cf - '$(distdir)' | gzip -9c > '$(distdir).tar.gz' + @rm -Rf '$(distdir)' + +dist-bzip2: distdir + @tar -cf - '$(distdir)' | bzip2 -9c > '$(destdir).tar.bz2' + @rm -Rf '$(distdir)' -- cgit v0.9.1