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