# $Id: Makefile,v 1.4 2003/12/02 17:32:15 abs Exp $
#

PKGNAME=Text-CSV-Hash
PROG=Hash.pm
MANSECTION=1
FILES=Makefile ${PROG} README Makefile.PL test.pl test.csv
GENFILES=${PKGNAME}.html ${PKGNAME}.${MANSECTION}
VERSION!=perl -MExtUtils::MakeMaker -le 'print MM->parse_version(shift)' ${PROG}

all:	${GENFILES}

tar:
	mkdir ${PKGNAME}-${VERSION}
	cp  ${FILES} ${PKGNAME}-${VERSION}
	tar cvf - ${PKGNAME}-${VERSION} | bzip2 -9 > ${PKGNAME}-${VERSION}.tbz
	rm -rf ${PKGNAME}-${VERSION}

test:
	perl -wTc ${PROG}

clean:	
	rm -f ${GENFILES} index.html ${PKGNAME}-*.tbz *~~

# GENFILES

${PKGNAME}.${MANSECTION}:	${PROG}
	pod2man ${PROG} > ${PKGNAME}.${MANSECTION}

${PKGNAME}.html:	${PROG}
	pod2html ${PROG} > ${PKGNAME}.html
	rm -f pod2htmd.x~~ pod2htmi.x~~

# developer specific targets
.if exists(../common/common.mk)
.include "../common/common.mk"
.endif
