# Makefile for creating distribution # Type 'make dist' for create tar-gziped archiv. # # Author: Lubomir Host 'rajo' # # $Id: Makefile,v 1.2 2004/03/16 19:51:07 rajo Exp $ PACKAGE = access VERSION = 1.0 DISTFILES = access.sh \ config \ cvs-access-config \ permision-table \ test.sh TAR = tar ZIP = zip ZIP_ENV = -r9 GZIP_ENV = --best srcdir = . distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) top_builddir = . dist-all: dist dist: distdir GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) ZIP=$(ZIP_ENV) $(ZIP) $(distdir).zip $(distdir) -rm -rf $(distdir) -@banner="`md5sum $(distdir).tar.gz`"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ ( echo "md5sum for $(distdir) package from Lubomir Host 'rajo' "; \ echo "Visit my homepage http://rajo.platon.sk/prog/"; echo; \ echo "$$dashes"; \ echo "$$banner"; \ echo "`md5sum $(distdir).zip`"; \ echo "$$dashes" \ ) | tee md5sum.$(distdir) distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) @here=`cd $(top_builddir) && pwd`; \ top_distdir=`cd $(distdir) && pwd`; \ distdir=`cd $(distdir) && pwd`; @FILES=`echo "$(DISTFILES)" | awk 'BEGIN{RS=" "}{print}' | sort -u`; \ for file in $$FILES; do \ d=$(srcdir); \ if test -d $$d/$$file; then \ mkdir $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done clean: -rm -f $(PACKAGE)-*.tar.gz $(PACKAGE)-*.zip md5sum,*