1# $FreeBSD$ 2 3MAINTAINER= obrien@FreeBSD.org 4 5BZ2DIR= ${.CURDIR}/../../contrib/bzip2 6.PATH: ${BZ2DIR} 7 8PROG= bzip2 9MAN= bzip2.1 10CFLAGS+= -D_FILE_OFFSET_BITS=64 11 12SUBDIR+= doc 13 14DPADD= ${LIBBZ2} 15LDADD= -lbz2 16 17NOSHARED?= YES 18 19LINKS= ${BINDIR}/bzip2 ${BINDIR}/bunzip2 20LINKS+= ${BINDIR}/bzip2 ${BINDIR}/bzcat 21MLINKS= bzip2.1 bunzip2.1 bzip2.1 bzcat.1 22 23REFFILES= sample1.ref sample2.ref sample3.ref 24DREFFILES= sample1.bz2 sample2.bz2 sample3.bz2 25TESTFILES= ${REFFILES} ${DREFFILES} 26 27CLEANFILES+= ${TESTFILES} \ 28 sample1.rb2 sample2.rb2 sample3.rb2 \ 29 sample1.tst sample2.tst sample3.tst 30 31.for f in ${REFFILES} 32${f}: ${f}.gz.uu 33 uudecode -p ${BZ2DIR}/${f}.gz.uu | gunzip > ${f} 34.endfor 35.for f in ${DREFFILES} 36${f}: ${f}.uu 37 uudecode ${BZ2DIR}/${f}.uu 38.endfor 39 40test: bzip2 ${TESTFILES} 41 @cat ${BZ2DIR}/words1 42 ./bzip2 -1 < sample1.ref > sample1.rb2 43 ./bzip2 -2 < sample2.ref > sample2.rb2 44 ./bzip2 -3 < sample3.ref > sample3.rb2 45 ./bzip2 -d < sample1.bz2 > sample1.tst 46 ./bzip2 -d < sample2.bz2 > sample2.tst 47 ./bzip2 -ds < sample3.bz2 > sample3.tst 48 cmp sample1.bz2 sample1.rb2 49 cmp sample2.bz2 sample2.rb2 50 cmp sample3.bz2 sample3.rb2 51 cmp sample1.tst sample1.ref 52 cmp sample2.tst sample2.ref 53 cmp sample3.tst sample3.ref 54 @cat ${BZ2DIR}/words3 55 56.include <bsd.prog.mk> 57