diff options
author | P. J. McDermott <pjm@nac.net> | 2012-02-13 22:41:37 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-02-13 22:41:37 (EST) |
commit | 9ce21757892648fa12d66747deed0dd9db790b9e (patch) | |
tree | c6ae6885ff771bcdadfa05c968bcf5e8cb5e7b1d /Makefile.in | |
parent | de1fd1294b9d5f1853c369d7c8825f3e8f2fd4ef (diff) |
Add distribution targets to build system.
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 23 |
1 files changed, 23 insertions, 0 deletions
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)' |