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