pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/check Check that some variables have the correct nu...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d5234082d80c
branches:  trunk
changeset: 363083:d5234082d80c
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed May 31 22:56:22 2017 +0000

description:
Check that some variables have the correct number of words.

Assert MAKE_DIRS_PERMS and OWN_DIRS_PERMS have the right number of
words before using a multivariable .for loop over those variables.
This prevents errors in parsing the makefiles.

diffstat:

 mk/check/check-files.mk |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r aa2a3c0a8436 -r d5234082d80c mk/check/check-files.mk
--- a/mk/check/check-files.mk   Wed May 31 22:55:01 2017 +0000
+++ b/mk/check/check-files.mk   Wed May 31 22:56:22 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-files.mk,v 1.32 2017/04/01 20:55:39 rillig Exp $
+# $NetBSD: check-files.mk,v 1.33 2017/05/31 22:56:22 jlam Exp $
 #
 # This file checks that the list of installed files matches the PLIST.
 # For that purpose it records the file list of LOCALBASE before and
@@ -78,8 +78,12 @@
 .for d in ${MAKE_DIRS} ${OWN_DIRS}
 CHECK_FILES_SKIP+=     ${d:C/^([^\/])/${PREFIX}\/\1/}.*
 .endfor
-.for d o g m in ${MAKE_DIRS_PERMS} ${OWN_DIRS_PERMS}
+.for _var_ in MAKE_DIRS_PERMS OWN_DIRS_PERMS
+.  if empty(${_var_}) || empty(${_var_}:C/.*/4/:M*:S/4 4 4 4//gW)
+.    for d o g m in ${${_var_}}
 CHECK_FILES_SKIP+=     ${d:C/^([^\/])/${PREFIX}\/\1/}.*
+.    endfor
+.  endif
 .endfor
 
 # Mutable X11 font database files



Home | Main Index | Thread Index | Old Index