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