1*ad30f8e7SGabor Kovesdan# $FreeBSD$ 2*ad30f8e7SGabor Kovesdan 3*ad30f8e7SGabor KovesdanSUBDIR= tablegen refgen posix gnu 4*ad30f8e7SGabor Kovesdan 5*ad30f8e7SGabor KovesdanENCODING= ASCII ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-6 \ 6*ad30f8e7SGabor Kovesdan ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10 ISO8859-11 ISO8859-13 \ 7*ad30f8e7SGabor Kovesdan ISO8859-14 ISO8859-15 ISO8859-16 ARMSCII-8 BIG5 BIG5-HKSCS \ 8*ad30f8e7SGabor Kovesdan CP1131 CP1251 CP866 CP949 GB18030 GB2312 GBK VISCII KOI8-R KOI8-U \ 9*ad30f8e7SGabor Kovesdan PT154 SHIFT_JIS EUC-CN EUC-JP EUC-KR 10*ad30f8e7SGabor Kovesdan 11*ad30f8e7SGabor Kovesdan.if defined(EXTRA_CHECK) 12*ad30f8e7SGabor KovesdanENCODING+= ATARIST BIG5-2003 C99 CP1046 CP1124 CP1125 CP1129 CP1131 CP1133 \ 13*ad30f8e7SGabor Kovesdan CP1161 CP1162 CP1163 CP1250 CP1251 CP1252 CP1253 CP1254 CP1255 \ 14*ad30f8e7SGabor Kovesdan CP1256 CP1257 CP1258 CP437 CP737 CP775 CP850 CP852 CP853 CP855 \ 15*ad30f8e7SGabor Kovesdan CP856 CP857 CP858 CP860 CP861 CP862 CP863 CP864 CP865 CP866 CP869 \ 16*ad30f8e7SGabor Kovesdan CP874 CP922 CP932 CP936 CP943 CP949 CP950 DEC-HANYU EUC-TW \ 17*ad30f8e7SGabor Kovesdan EUC-JIS-2004 GB18030 GBK GEORGIAN-ACADEMY GEORGIAN-PS HP-ROMAN8 \ 18*ad30f8e7SGabor Kovesdan HZ ISO-2022-CN ISO-2022-CN-EXT ISO-2022-JP ISO-2022-JP-1 \ 19*ad30f8e7SGabor Kovesdan ISO-2022-JP-2 ISO-2022-JP-2004 ISO-2022-KR ISO-IR-14 ISO-IR-57 \ 20*ad30f8e7SGabor Kovesdan ISO-IR-165 JAVA JIS_X0201 JIS_X0208-1990 JOHAB KOI8-RU KOI8-T \ 21*ad30f8e7SGabor Kovesdan KZ-1048 MULELAO-1 NEXTSTEP PT154 RISCOS-LATIN1 TCVN5712-1 \ 22*ad30f8e7SGabor Kovesdan TDS565 23*ad30f8e7SGabor Kovesdan# 24*ad30f8e7SGabor Kovesdan# MAC encodings are known to be outdated in GNU so it's no good 25*ad30f8e7SGabor Kovesdan# to ensure compatibility blindly here 26*ad30f8e7SGabor Kovesdan# 27*ad30f8e7SGabor Kovesdan#ENCODING+= MACARABIC MACCENTRALEUROPE MACCROATIAN MACCYRILLIC MACGREEK \ 28*ad30f8e7SGabor Kovesdan# MACICELAND MACROMANIA MACROMAN MACTHAI MACTURKISH MACUKRAINE \ 29*ad30f8e7SGabor Kovesdan# MACHEBREW 30*ad30f8e7SGabor Kovesdan.endif 31*ad30f8e7SGabor Kovesdan 32*ad30f8e7SGabor KovesdanGEN_FWD?= ${.CURDIR}/tablegen/tablegen -t 33*ad30f8e7SGabor KovesdanGEN_REV?= ${.CURDIR}/tablegen/tablegen -tr 34*ad30f8e7SGabor KovesdanREF_FWD?= ${.CURDIR}/refgen/refgen -t 35*ad30f8e7SGabor KovesdanREF_REV?= ${.CURDIR}/refgen/refgen -tr 36*ad30f8e7SGabor KovesdanCMP?= ${.CURDIR}/tablegen/cmp.sh 37*ad30f8e7SGabor Kovesdan 38*ad30f8e7SGabor Kovesdanmake-ref: refgen 39*ad30f8e7SGabor Kovesdan mkdir -p ref 40*ad30f8e7SGabor Kovesdan.for enc in ${ENCODING} 41*ad30f8e7SGabor Kovesdan @echo "Generating ${enc} --> UTF-32 ..." 42*ad30f8e7SGabor Kovesdan -@${REF_FWD} ${enc} >ref/${enc} 43*ad30f8e7SGabor Kovesdan @echo "Generating UTF-32 --> ${enc} ..." 44*ad30f8e7SGabor Kovesdan -@${REF_REV} ${enc} >ref/${enc}-rev 45*ad30f8e7SGabor Kovesdan.endfor 46*ad30f8e7SGabor Kovesdan 47*ad30f8e7SGabor Kovesdancheck: tablegen 48*ad30f8e7SGabor Kovesdan mkdir -p output 49*ad30f8e7SGabor Kovesdan.for enc in ${ENCODING} 50*ad30f8e7SGabor Kovesdan @echo "Checking ${enc} --> UTF-32 ..." 51*ad30f8e7SGabor Kovesdan -@${GEN_FWD} ${enc} >output/${enc} 52*ad30f8e7SGabor Kovesdan @${CMP} ref/${enc} output/${enc} 53*ad30f8e7SGabor Kovesdan @echo "Checking UTF-32 --> ${enc} ..." 54*ad30f8e7SGabor Kovesdan -@${GEN_REV} ${enc} >output/${enc}-rev 55*ad30f8e7SGabor Kovesdan @${CMP} ref/${enc}-rev output/${enc}-rev 56*ad30f8e7SGabor Kovesdan.endfor 57*ad30f8e7SGabor Kovesdan 58*ad30f8e7SGabor Kovesdanperftest: refgen tablegen 59*ad30f8e7SGabor Kovesdan.for enc in ${ENCODING} 60*ad30f8e7SGabor Kovesdan @echo "Checking ${enc} --> UTF-32 ..." 61*ad30f8e7SGabor Kovesdan @echo "GNU runtime:" 62*ad30f8e7SGabor Kovesdan @/usr/bin/time -h ${REF_FWD} ${enc} >/dev/null 63*ad30f8e7SGabor Kovesdan @echo "BSD runtime:" 64*ad30f8e7SGabor Kovesdan @/usr/bin/time -h ${GEN_FWD} ${enc} >/dev/null 65*ad30f8e7SGabor Kovesdan @echo "Checking UTF-32 --> ${enc} ..." 66*ad30f8e7SGabor Kovesdan @echo "GNU runtime:" 67*ad30f8e7SGabor Kovesdan @/usr/bin/time -h ${REF_REV} ${enc} >/dev/null 68*ad30f8e7SGabor Kovesdan @echo "BSD runtime:" 69*ad30f8e7SGabor Kovesdan @/usr/bin/time -h ${GEN_REV} ${enc} >/dev/null 70*ad30f8e7SGabor Kovesdan.endfor 71*ad30f8e7SGabor Kovesdan 72*ad30f8e7SGabor Kovesdanposixtest: posix 73*ad30f8e7SGabor Kovesdan @${.CURDIR}/posix/posix 74*ad30f8e7SGabor Kovesdan 75*ad30f8e7SGabor Kovesdangnutest: gnu 76*ad30f8e7SGabor Kovesdan @${.CURDIR}/gnu/gnu 77*ad30f8e7SGabor Kovesdan 78*ad30f8e7SGabor Kovesdantest-everything: check perftest posixtest gnutest 79*ad30f8e7SGabor Kovesdan 80*ad30f8e7SGabor KovesdanCLEANDIRS+= output 81*ad30f8e7SGabor Kovesdan 82*ad30f8e7SGabor Kovesdan.include <bsd.prog.mk> 83