diff options
-rw-r--r-- | mk/plist/plist-locale.awk | 8 | ||||
-rw-r--r-- | mk/plist/plist.mk | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/mk/plist/plist-locale.awk b/mk/plist/plist-locale.awk index 0cd95f87a1b..ec914ecb718 100644 --- a/mk/plist/plist-locale.awk +++ b/mk/plist/plist-locale.awk @@ -1,4 +1,4 @@ -# $NetBSD: plist-locale.awk,v 1.1 2006/04/17 06:12:46 jlam Exp $ +# $NetBSD: plist-locale.awk,v 1.2 2006/04/17 06:30:48 jlam Exp $ # # Copyright (c) 2006 The NetBSD Foundation, Inc. # All rights reserved. @@ -41,16 +41,22 @@ ### PKGLOCALEDIR is the ${PREFIX}-relative path to the "locale" directory ### under which all locale files are installed. ### +### USE_PKGLOCALEDIR is a yes/no variable indicating whether to convert +### "share/locale" to be under ${PKGLOCALEDIR}. +### BEGIN { PKGLOCALEDIR = ENVIRON["PKGLOCALEDIR"] ? ENVIRON["PKGLOCALEDIR"] : "share" + USE_PKGLOCALEDIR = ENVIRON["USE_PKGLOCALEDIR"] ? ENVIRON["USE_PKGLOCALEDIR"] : "no" } ### ### Convert share/locale to ${PKGLOCALEDIR}/locale for all locale entries. ### +(USE_PKGLOCALEDIR ~ /[yY][eE][sS]/) && \ /^share\/locale\// { sub("^share", PKGLOCALEDIR) } +(USE_PKGLOCALEDIR ~ /[yY][eE][sS]/) && \ /^@dirrm share\/locale\// { sub("^@dirrm share", "@dirrm " PKGLOCALEDIR) } diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk index 2e91a5b501d..c7c7b757da6 100644 --- a/mk/plist/plist.mk +++ b/mk/plist/plist.mk @@ -1,4 +1,4 @@ -# $NetBSD: plist.mk,v 1.10 2006/04/17 06:12:46 jlam Exp $ +# $NetBSD: plist.mk,v 1.11 2006/04/17 06:30:48 jlam Exp $ # # This Makefile fragment handles the creation of PLISTs for use by # pkg_create(8). @@ -91,6 +91,7 @@ MAKEVARS+= _IGNORE_INFO_PATH # scripts for information on each of the variable set in the environment. # _PLIST_AWK_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR:Q} +_PLIST_AWK_ENV+= USE_PKGLOCALEDIR=${USE_PKGLOCALEDIR:Dyes:Uno} _PLIST_AWK_ENV+= IMAKE_MANINSTALL=${_IMAKE_MANINSTALL:Q} _PLIST_AWK_ENV+= IGNORE_INFO_PATH=${_IGNORE_INFO_PATH:Q} _PLIST_AWK_ENV+= PKGINFODIR=${PKGINFODIR:Q} |