1# $NetBSD: Makefile.bdf,v 1.6 2004/03/08 22:33:00 cgd Exp $ 2 3# Font files built using this makefile are cleaned in two ways: 4# 5# * temporary build files are cleaned by 'make clean' (via CLEANFILES). 6# 7# * Actual finished BDF and PCF files (BDFFILES and PCFFILES, 8# respectively) are removed only by "cleandir" because they 9# take a long time to build. (See the 'cleanfonts' target.) 10# 11# Also, we *must* split these operations into multiple 'rm' commands 12# because of the number of files being removed. Trying to 'rm' all of 13# these files with one command will cause some host systems to fail 14# (rm arg list too long). 15 16FILESDIR= ${X11FONTDIR}/${FONTSUBDIR} 17.PATH: ${X11SRCDIR.xc}/fonts/bdf/${FONTSUBDIR} 18 19FONTSUFFIX= .gz 20FONTGZIP= | gzip ${GZIPLEVEL:U-9} -ncf 21 22.include "${NETBSDSRCDIR}/x11/tools/bdftopcf/Makefile.bdftopcf" 23.include "${NETBSDSRCDIR}/x11/tools/ucs2any/Makefile.ucs2any" 24 25.for _F _M in ${UCSFILES} # { 26${_F}-${_M}.bdf: ${_F}.bdf 27 ${_MKTARGET_CREATE} 28 ${UCS2ANY} ${.ALLSRC} ${DESTDIR}${X11FONTDIR}/util/map-${_M} ${_M} 29 30BDFFILES+= ${_F}-${_M}.bdf 31.endfor # } 32 33.SUFFIXES: .bdf .pcf${FONTSUFFIX} 34 35.bdf.pcf${FONTSUFFIX}: 36 ${_MKTARGET_CREATE} 37 rm -f ${.TARGET} 38 ${BDFTOPCF} -t ${.IMPSRC} ${FONTGZIP} > ${.TARGET}.tmp \ 39 && mv ${.TARGET}.tmp ${.TARGET} 40 41PCFFILES+= ${BDFFILES:S/.bdf$/.pcf${FONTSUFFIX}/} 42CLEANFILES+= ${BDFFILES:S/.bdf$/.pcf${FONTSUFFIX}.tmp/} 43 44FILES+= ${PCFFILES} 45.if exists(fonts.alias) 46FILES+= fonts.alias 47.endif 48 49realall: ${PCFFILES} 50 51cleandir: cleanfonts 52 53cleanfonts: .PHONY .NOTMAIN 54 rm -f ${BDFFILES} 55 rm -f ${PCFFILES} 56 57.include "../Makefile.mkfontscale" 58