minix/external/mit/xorg/share/fonts/Makefile.bdf
Lionel Sambuc 971bb1a587 Importing external/mit/xorg support rules
Change-Id: Ib11d8659485a444797bf3a2118182a1d4e316b50
2014-11-10 14:43:29 +01:00

58 lines
1.6 KiB
Makefile

# $NetBSD: Makefile.bdf,v 1.2 2009/03/31 21:18:36 perry Exp $
# Font files built using this makefile are cleaned in two ways:
#
# * temporary build files are cleaned by 'make clean' (via CLEANFILES).
#
# * Actual finished BDF and PCF files (BDFFILES and PCFFILES,
# respectively) are removed only by "cleandir" because they
# take a long time to build. (See the 'cleanfonts' target.)
#
# Also, we *must* split these operations into multiple 'rm' commands
# because of the number of files being removed. Trying to 'rm' all of
# these files with one command will cause some host systems to fail
# (rm arg list too long).
FILESDIR= ${X11FONTDIR}/${FONTSUBDIR}
.PATH: ${X11SRCDIR.${FONTSRCPKG}}
FONTSUFFIX= .gz
FONTGZIP= | gzip ${GZIPLEVEL:U-9} -ncf
.include "${NETBSDSRCDIR}/external/mit/xorg/tools/bdftopcf/Makefile.bdftopcf"
.include "${NETBSDSRCDIR}/external/mit/xorg/tools/ucs2any/Makefile.ucs2any"
.for _F _M in ${UCSFILES} # {
${_F}-${_M}.bdf: ${_F}.bdf
${_MKTARGET_CREATE}
${UCS2ANY} ${.ALLSRC} ${DESTDIR}${X11FONTDIR}/util/map-${_M} ${_M}
BDFFILES+= ${_F}-${_M}.bdf
.endfor # }
.SUFFIXES: .bdf .pcf${FONTSUFFIX}
.bdf.pcf${FONTSUFFIX}:
${_MKTARGET_CREATE}
rm -f ${.TARGET}
${BDFTOPCF} -t ${.IMPSRC} ${FONTGZIP} > ${.TARGET}.tmp \
&& mv ${.TARGET}.tmp ${.TARGET}
PCFFILES+= ${BDFFILES:S/.bdf$/.pcf${FONTSUFFIX}/}
CLEANFILES+= ${BDFFILES:S/.bdf$/.pcf${FONTSUFFIX}.tmp/}
FILES+= ${PCFFILES}
.if exists(fonts.alias)
FILES+= fonts.alias
.endif
realall: ${PCFFILES}
cleandir: cleanfonts
cleanfonts: .PHONY .NOTMAIN
rm -f ${BDFFILES}
rm -f ${PCFFILES}
.include "../../Makefile.font"