1# $FreeBSD$ 2# $NetBSD: Makefile,v 1.13 2007/03/13 16:34:37 tnozaki Exp $ 3 4ESUBDIR?= ${CODE} 5PARTFILE?= ${.CURDIR}/${CODE}.part 6.if exists(${PARTFILE}) 7PART!= sed '/^\#/d;/^$$/d;' ${PARTFILE} 8.endif 9TABLENAME?= ${CODE}-%%PART%%%UCS 10RTABLENAME?= UCS%${CODE}-%%PART%% 11 12ENCID?= ${CODE}%%PART%% 13ENCEXT?= .mps 14MAPPER?= mapper_std 15REVSYMBOL?= 16FILESDIR= ${CSMAPPERDIR}/${ESUBDIR} 17 18.SUFFIXES: .src .646 .mps 19 20.src.mps: 21 ${MKCSMAPPER} -o ${.TARGET} ${.IMPSRC} 22 23.if !target(mapper.dir.${ESUBDIR}) 24.if !exists(mapper.dir.${ESUBDIR}.src) 25mapper.dir.${ESUBDIR}: ${CODE}.part 26 echo "# ${ESUBDIR}" > ${.TARGET} 27.for i in ${PART} 28 printf "%-32s%-32s%s\n" ${ENCID:S@%%PART%%@${i}@}/UCS ${MAPPER} \ 29 ${ESUBDIR}/${TABLENAME:S@%%PART%%@${i}@:S/:/@/}${ENCEXT} >> ${.TARGET} 30 printf "%-32s%-32s%s\n" UCS/${ENCID:S@%%PART%%@${i}@} ${MAPPER} \ 31 ${REVSYMBOL}${ESUBDIR}/${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}${ENCEXT} >> ${.TARGET} 32.endfor 33 echo >> ${.TARGET} 34.else 35mapper.dir.${ESUBDIR}: mapper.dir.${ESUBDIR}.src 36 (echo "# ${ESUBDIR}" ; cat ${.ALLSRC} ; echo ) > ${.TARGET} 37.endif 38.endif 39CLEANFILES+= mapper.dir.${ESUBDIR} 40 41.if !target(charset.pivot.${ESUBDIR}) 42.if !exists(charset.pivot.${ESUBDIR}.src) 43charset.pivot.${ESUBDIR}: ${CODE}.part 44 echo "# ${ESUBDIR}" > ${.TARGET} 45.for i in ${PART} 46 printf "%-32s%-32s%d\n" ${ENCID:S@%%PART%%@${i}@} UCS 1 >> ${.TARGET} 47 printf "%-32s%-32s%d\n" UCS ${ENCID:S@%%PART%%@${i}@} 1 >> ${.TARGET} 48.endfor 49 echo >> ${.TARGET} 50.else 51charset.pivot.${ESUBDIR}: charset.pivot.${ESUBDIR}.src 52 (echo "# ${ESUBDIR}" ; cat ${.ALLSRC} ; echo ) > ${.TARGET} 53.endif 54.endif 55CLEANFILES+= charset.pivot.${ESUBDIR} 56 57 58.if !defined(MAPS) 59.for i in ${PART} 60.if exists(${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.src) 61FILES+= ${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps 62CLEANFILES+= ${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps 63.endif 64.if exists(${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.src) 65FILES+= ${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps 66CLEANFILES+= ${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps 67.endif 68.endfor 69.else 70FILES+= ${MAPS} 71CLEANFILES+= ${MAPS} 72.endif 73 74.include "./Makefile.inc" 75.include <bsd.prog.mk> 76 77.if !defined(_SKIP_BUILD) 78all: mapper.dir.${ESUBDIR} charset.pivot.${ESUBDIR} 79.endif 80