From aa83b05bd0fae1b315070b014afee6d861ccd1df Mon Sep 17 00:00:00 2001 From: jlam Date: Sat, 19 Aug 2017 00:29:55 +0000 Subject: mk/pkgtasks: Substitute for variables unconditionally in scripts. Replace @VAR@ with ${VAR} unconditionally in scripts, even if they values are empty. This will allow for fall-through to using the pkgtasks hard-coded defaults, usually found by searching the PATH contents, and it avoids having ugly "@VAR@" in the generated scripts. --- mk/pkgtasks/fonts.mk | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'mk') diff --git a/mk/pkgtasks/fonts.mk b/mk/pkgtasks/fonts.mk index edb0f6d47f7..95d5e79b1a8 100644 --- a/mk/pkgtasks/fonts.mk +++ b/mk/pkgtasks/fonts.mk @@ -1,4 +1,4 @@ -# $NetBSD: fonts.mk,v 1.2 2017/06/07 20:24:27 jlam Exp $ +# $NetBSD: fonts.mk,v 1.3 2017/08/19 00:29:55 jlam Exp $ # # Copyright (c) 2017 The NetBSD Foundation, Inc. # All rights reserved. @@ -64,36 +64,39 @@ _FONTS_DIRS.x11= # empty .if !empty(FONTS_DIRS.ttf:M*) . if ${X11_TYPE} == "modular" USE_TOOLS+= mkfontscale:run -FILES_SUBST+= MKFONTSCALE=${TOOLS_PATH.mkfontscale:Q} . else USE_TOOLS+= ttmkfdir:run -FILES_SUBST+= TTMKFDIR=${TOOLS_PATH.ttmkfdir:Q} . endif _FONTS_DIRS.x11+= ${FONTS_DIRS.ttf} .endif .if !empty(FONTS_DIRS.type1:M*) . if ${X11_TYPE} == "modular" USE_TOOLS+= mkfontscale:run -FILES_SUBST+= MKFONTSCALE=${TOOLS_PATH.mkfontscale:Q} . else USE_TOOLS+= type1inst:run -FILES_SUBST+= TYPE1INST=${TOOLS_PATH.type1inst:Q} . endif _FONTS_DIRS.x11+= ${FONTS_DIRS.type1} .endif _FONTS_DIRS.x11+= ${FONTS_DIRS.x11} .if !empty(_FONTS_DIRS.x11:M*) USE_TOOLS+= mkfontdir:run -FILES_SUBST+= MKFONTDIR=${TOOLS_PATH:mkfontdir:Q} . if ${X11_TYPE} == "modular" DEPENDS+= encodings-[0-9]*:../../fonts/encodings X11_ENCODINGSDIR?= ${X11BASE}/share/fonts/X11/encodings . else X11_ENCODINGSDIR?= ${X11BASE}/lib/fonts/X11/encodings . endif -FILES_SUBST+= X11_ENCODINGSDIR=${X11_ENCODINGSDIR:Q} .endif +# Variables for programs used by "fonts" package task. +FILES_SUBST+= MKFONTDIR=${TOOLS_PATH:mkfontdir:Q} +FILES_SUBST+= MKFONTSCALE=${TOOLS_PATH.mkfontscale:Q} +FILES_SUBST+= TTMKFDIR=${TOOLS_PATH.ttmkfdir:Q} +FILES_SUBST+= TYPE1INST=${TOOLS_PATH.type1inst:Q} + +# Path variables used by "fonts" package task. +FILES_SUBST+= X11_ENCODINGSDIR=${X11_ENCODINGSDIR:Q} + _PKGTASKS_DATA.fonts= ${_PKGTASKS_DIR}/fonts _PKGTASKS_DATAFILES+= ${_PKGTASKS_DATA.fonts} -- cgit v1.2.3