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