view contrib/mpd/Makefile @ 523:9ac53695a44d tip

Update mktplinkfw to handle more boards
author Aleksandr Rybalko <ray@ddteam.net>
date Fri, 08 Jan 2016 23:53:34 +0200
parents a245241eda54
children
line wrap: on
line source
# $Id: Makefile,v 1.13 2011/12/21 14:58:09 amotin Exp $

VERSION!=	cat src/Makefile | grep ^VERSION | awk '{ print $$2 }'

DISTNAME=	mpd-${VERSION}
TARBALL=	${DISTNAME}.tar.gz
PORTBALL=	port.tgz
CVSROOT?=	:pserver:[email protected]:/cvsroot/mpd

all:		${TARBALL} ${PORTBALL}

${TARBALL}:	.export-done
	cd mpd && ${MAKE} .${TARBALL}
	cp mpd/${TARBALL} ./${TARBALL}

.${TARBALL}:	.dist-done
	rm -f ${TARBALL}
	tar cvf - ${DISTNAME} | gzip --best > ${TARBALL}

${PORTBALL}:	.export-done
	cd mpd && ${MAKE} .${PORTBALL}
	cp mpd/${PORTBALL} ./${PORTBALL}

.${PORTBALL}:	.dist-done
	cd port && ${MAKE} port

.export-done:
	@if [ -z ${TAG} ]; then						\
		echo ERROR: Please specify TAG in environment;		\
		false;							\
	fi
	cvs -d${CVSROOT} export -r ${TAG} mpd
	touch ${.TARGET}

.dist-done:	.doc-done
	rm -rf ${DISTNAME} ${.TARGET}
	mkdir ${DISTNAME} ${DISTNAME}/src ${DISTNAME}/doc ${DISTNAME}/conf
	cp dist/Makefile ${DISTNAME}
	cp dist/Makefile.conf ${DISTNAME}/conf/Makefile
	cp dist/Makefile.doc ${DISTNAME}/doc/Makefile
	cp -r src/COPYRIGHT* src/Makefile src/[a-z]* ${DISTNAME}/src
	sed 's/@[email protected]/${VERSION}/g' < src/Makefile > ${DISTNAME}/src/Makefile
	cp doc/mpd*.html doc/mpd.ps ${DISTNAME}/doc
	cp doc/mpd.8 ${DISTNAME}/doc/mpd5.8.in
	cp conf/[a-z]* ${DISTNAME}/conf
	sed 's/@[email protected]/${VERSION}/g' < dist/README > ${DISTNAME}/README
	touch ${.TARGET}

.doc-done:
	rm -f ${.TARGET}
	cd doc && ${MAKE}
	touch ${.TARGET}

regen:		clean ${TARBALL}

send:	${TARBALL}
		tar cvf - ${.ALLSRC} | blow gatekeeper

clean cleandir:
	rm -rf mpd
	rm -f .export-done
	cd doc && ${MAKE} clean
	rm -f .doc-done
	rm -rf ${DISTNAME} ${TARBALL} ${PORTBALL}
	rm -f .dist-done
	cd src && ${MAKE} cleandir
	cd port && ${MAKE} cleandir

distclean:	clean
	rm -f ${TARBALL}

vers:
	@echo The version is: ${VERSION}