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