xref: /freebsd/tools/test/sort/regression/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1*1aaed33eSGabor KovesdanTESTFILE= test01 test02 test03 test04 test05 test06 test07 test08 \
2*1aaed33eSGabor Kovesdan	test09 test10 test11 test12 test13 test14 test15 test16 test17 \
3*1aaed33eSGabor Kovesdan	test_nums
4*1aaed33eSGabor Kovesdan
5*1aaed33eSGabor KovesdanOPTIONS= r f fr fs fu i ir b bs bd bu g gs gu gr n nr M Mr u nu ns
6*1aaed33eSGabor Kovesdan
7*1aaed33eSGabor Kovesdan#SORT?=	/usr/local/bin/bsdsort
8*1aaed33eSGabor KovesdanGNUSORT?=~/coreutils/bin/sort
9*1aaed33eSGabor KovesdanSORT?=	../sort
10*1aaed33eSGabor KovesdanCMP?=	${.CURDIR}/cmp.sh
11*1aaed33eSGabor Kovesdan
12*1aaed33eSGabor Kovesdancheck:
13*1aaed33eSGabor Kovesdan	mkdir -p output
14*1aaed33eSGabor Kovesdan.for f in ${TESTFILE}
15*1aaed33eSGabor Kovesdan	@LANG=C;${SORT} data/${f} >output/${f}
16*1aaed33eSGabor Kovesdan	@#LANG=C;${GNUSORT} data/${f} >ref/${f}
17*1aaed33eSGabor Kovesdan	@${CMP} ref/${f} output/${f}
18*1aaed33eSGabor Kovesdan.endfor
19*1aaed33eSGabor Kovesdan.for opt in ${OPTIONS}
20*1aaed33eSGabor Kovesdan.for f in ${TESTFILE}
21*1aaed33eSGabor Kovesdan	@LANG=C;${SORT} -${opt} data/${f} >output/${f}${opt}
22*1aaed33eSGabor Kovesdan	@#LANG=C;${GNUSORT} -${opt} data/${f} >ref/${f}${opt}
23*1aaed33eSGabor Kovesdan	@${CMP} ref/${f}${opt} output/${f}${opt}
24*1aaed33eSGabor Kovesdan.endfor
25*1aaed33eSGabor Kovesdan.endfor
26*1aaed33eSGabor Kovesdan
27*1aaed33eSGabor KovesdanCLEANDIRS+= output
28*1aaed33eSGabor Kovesdan
29*1aaed33eSGabor Kovesdan.include <bsd.prog.mk>
30