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