1ad30f8e7SGabor Kovesdan# $NetBSD: Makefile,v 1.13 2007/03/13 16:34:37 tnozaki Exp $ 2ad30f8e7SGabor Kovesdan 3ad30f8e7SGabor KovesdanESUBDIR?= ${CODE} 4ad30f8e7SGabor KovesdanPARTFILE?= ${.CURDIR}/${CODE}.part 5ad30f8e7SGabor Kovesdan.if exists(${PARTFILE}) 6ad30f8e7SGabor KovesdanPART!= sed '/^\#/d;/^$$/d;' ${PARTFILE} 7ad30f8e7SGabor Kovesdan.endif 8ad30f8e7SGabor KovesdanTABLENAME?= ${CODE}-%%PART%%%UCS 9ad30f8e7SGabor KovesdanRTABLENAME?= UCS%${CODE}-%%PART%% 10ad30f8e7SGabor Kovesdan 11ad30f8e7SGabor KovesdanENCID?= ${CODE}%%PART%% 12ad30f8e7SGabor KovesdanENCEXT?= .mps 13ad30f8e7SGabor KovesdanMAPPER?= mapper_std 14ad30f8e7SGabor KovesdanREVSYMBOL?= 15ad30f8e7SGabor KovesdanFILESDIR= ${CSMAPPERDIR}/${ESUBDIR} 16ad30f8e7SGabor Kovesdan 17ad30f8e7SGabor Kovesdan.SUFFIXES: .src .646 .mps 18ad30f8e7SGabor Kovesdan 19ad30f8e7SGabor Kovesdan.src.mps: 20ad30f8e7SGabor Kovesdan ${MKCSMAPPER} -o ${.TARGET} ${.IMPSRC} 21ad30f8e7SGabor Kovesdan 22ad30f8e7SGabor Kovesdan.if !target(mapper.dir.${ESUBDIR}) 23ad30f8e7SGabor Kovesdan.if !exists(mapper.dir.${ESUBDIR}.src) 24ad30f8e7SGabor Kovesdanmapper.dir.${ESUBDIR}: ${CODE}.part 25ad30f8e7SGabor Kovesdan echo "# ${ESUBDIR}" > ${.TARGET} 26ad30f8e7SGabor Kovesdan.for i in ${PART} 27ad30f8e7SGabor Kovesdan printf "%-32s%-32s%s\n" ${ENCID:S@%%PART%%@${i}@}/UCS ${MAPPER} \ 28790ffa6cSGabor Kovesdan ${ESUBDIR}/${TABLENAME:S@%%PART%%@${i}@:S/:/@/}${ENCEXT} >> ${.TARGET} 29ad30f8e7SGabor Kovesdan printf "%-32s%-32s%s\n" UCS/${ENCID:S@%%PART%%@${i}@} ${MAPPER} \ 30790ffa6cSGabor Kovesdan ${REVSYMBOL}${ESUBDIR}/${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}${ENCEXT} >> ${.TARGET} 31ad30f8e7SGabor Kovesdan.endfor 32ad30f8e7SGabor Kovesdan echo >> ${.TARGET} 33ad30f8e7SGabor Kovesdan.else 34ad30f8e7SGabor Kovesdanmapper.dir.${ESUBDIR}: mapper.dir.${ESUBDIR}.src 35ad30f8e7SGabor Kovesdan (echo "# ${ESUBDIR}" ; cat ${.ALLSRC} ; echo ) > ${.TARGET} 36ad30f8e7SGabor Kovesdan.endif 37ad30f8e7SGabor Kovesdan.endif 38ad30f8e7SGabor KovesdanCLEANFILES+= mapper.dir.${ESUBDIR} 39ad30f8e7SGabor Kovesdan 40ad30f8e7SGabor Kovesdan.if !target(charset.pivot.${ESUBDIR}) 41ad30f8e7SGabor Kovesdan.if !exists(charset.pivot.${ESUBDIR}.src) 42ad30f8e7SGabor Kovesdancharset.pivot.${ESUBDIR}: ${CODE}.part 43ad30f8e7SGabor Kovesdan echo "# ${ESUBDIR}" > ${.TARGET} 44ad30f8e7SGabor Kovesdan.for i in ${PART} 45ad30f8e7SGabor Kovesdan printf "%-32s%-32s%d\n" ${ENCID:S@%%PART%%@${i}@} UCS 1 >> ${.TARGET} 46ad30f8e7SGabor Kovesdan printf "%-32s%-32s%d\n" UCS ${ENCID:S@%%PART%%@${i}@} 1 >> ${.TARGET} 47ad30f8e7SGabor Kovesdan.endfor 48ad30f8e7SGabor Kovesdan echo >> ${.TARGET} 49ad30f8e7SGabor Kovesdan.else 50ad30f8e7SGabor Kovesdancharset.pivot.${ESUBDIR}: charset.pivot.${ESUBDIR}.src 51ad30f8e7SGabor Kovesdan (echo "# ${ESUBDIR}" ; cat ${.ALLSRC} ; echo ) > ${.TARGET} 52ad30f8e7SGabor Kovesdan.endif 53ad30f8e7SGabor Kovesdan.endif 54ad30f8e7SGabor KovesdanCLEANFILES+= charset.pivot.${ESUBDIR} 55ad30f8e7SGabor Kovesdan 56ad30f8e7SGabor Kovesdan 57ad30f8e7SGabor Kovesdan.if !defined(MAPS) 58ad30f8e7SGabor Kovesdan.for i in ${PART} 59790ffa6cSGabor Kovesdan.if exists(${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.src) 60790ffa6cSGabor KovesdanFILES+= ${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps 61790ffa6cSGabor KovesdanCLEANFILES+= ${TABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps 62ad30f8e7SGabor Kovesdan.endif 63790ffa6cSGabor Kovesdan.if exists(${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.src) 64790ffa6cSGabor KovesdanFILES+= ${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps 65790ffa6cSGabor KovesdanCLEANFILES+= ${RTABLENAME:S@%%PART%%@${i}@:S/:/@/}.mps 66ad30f8e7SGabor Kovesdan.endif 67ad30f8e7SGabor Kovesdan.endfor 68ad30f8e7SGabor Kovesdan.else 69ad30f8e7SGabor KovesdanFILES+= ${MAPS} 70ad30f8e7SGabor KovesdanCLEANFILES+= ${MAPS} 71ad30f8e7SGabor Kovesdan.endif 72ad30f8e7SGabor Kovesdan 73ad30f8e7SGabor Kovesdan.include "./Makefile.inc" 74ad30f8e7SGabor Kovesdan.include <bsd.prog.mk> 75*e03766c6SBryan Drewery 76*e03766c6SBryan Drewery.if !defined(_SKIP_BUILD) 77*e03766c6SBryan Dreweryall: mapper.dir.${ESUBDIR} charset.pivot.${ESUBDIR} 78*e03766c6SBryan Drewery.endif 79