1# $FreeBSD$ 2 3BZ2DIR= ${SRCTOP}/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 \ 16 bzip2.1 bzcat.1 \ 17 bzip2.1 bzip2recover.1 18 19REFFILES= sample1.ref sample2.ref sample3.ref 20DREFFILES= sample1.bz2 sample2.bz2 sample3.bz2 21TESTFILES= ${REFFILES} ${DREFFILES} 22 23CLEANFILES+= ${TESTFILES} \ 24 sample1.rb2 sample2.rb2 sample3.rb2 \ 25 sample1.tst sample2.tst sample3.tst 26 27.for f in ${REFFILES} 28${f}: ${f}.gz.uu 29 uudecode -p ${BZ2DIR}/${f}.gz.uu | gunzip > ${f} 30.endfor 31.for f in ${DREFFILES} 32${f}: ${f}.uu 33 uudecode ${BZ2DIR}/${f}.uu 34.endfor 35 36test: bzip2 ${TESTFILES} 37 @cat ${BZ2DIR}/words1 38 ./bzip2 -1 < sample1.ref > sample1.rb2 39 ./bzip2 -2 < sample2.ref > sample2.rb2 40 ./bzip2 -3 < sample3.ref > sample3.rb2 41 ./bzip2 -d < sample1.bz2 > sample1.tst 42 ./bzip2 -d < sample2.bz2 > sample2.tst 43 ./bzip2 -ds < sample3.bz2 > sample3.tst 44 cmp sample1.bz2 sample1.rb2 45 cmp sample2.bz2 sample2.rb2 46 cmp sample3.bz2 sample3.rb2 47 cmp sample1.tst sample1.ref 48 cmp sample2.tst sample2.ref 49 cmp sample3.tst sample3.ref 50 @cat ${BZ2DIR}/words3 51 52.include <bsd.prog.mk> 53