Received: by mail.netbsd.org (Postfix, from userid 605) id DC84884F40; Sat, 18 Apr 2020 11:42:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 61C3B84DB7 for ; Sat, 18 Apr 2020 11:42:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id nBm31-uXG6kU for ; Sat, 18 Apr 2020 11:42:34 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id CE70F84D48 for ; Sat, 18 Apr 2020 11:42:34 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id C1FF2FB27; Sat, 18 Apr 2020 11:42:34 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1587210154247890" MIME-Version: 1.0 Date: Sat, 18 Apr 2020 11:42:34 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/mk To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20200418114234.C1FF2FB27@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1587210154247890 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Sat Apr 18 11:42:34 UTC 2020 Modified Files: pkgsrc/mk: subst.mk Log Message: mk/subst.mk: fix pkglint warnings and notes To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 pkgsrc/mk/subst.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1587210154247890 Content-Disposition: inline Content-Length: 2463 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/mk/subst.mk diff -u pkgsrc/mk/subst.mk:1.75 pkgsrc/mk/subst.mk:1.76 --- pkgsrc/mk/subst.mk:1.75 Sat Apr 18 11:32:01 2020 +++ pkgsrc/mk/subst.mk Sat Apr 18 11:42:34 2020 @@ -1,4 +1,4 @@ -# $NetBSD: subst.mk,v 1.75 2020/04/18 11:32:01 rillig Exp $ +# $NetBSD: subst.mk,v 1.76 2020/04/18 11:42:34 rillig Exp $ # # The subst framework replaces text in one or more files in the WRKSRC # directory. Packages can define several ``classes'' of replacements. @@ -97,7 +97,7 @@ SUBST_SHOW_DIFF?= no SUBST_NOOP_OK?= yes # only for backwards compatiblity _VARGROUPS+= subst -_USR_VARS.subst= SUBST_SHOW_DIFF SUBST_NOOP_OK +_USER_VARS.subst= SUBST_SHOW_DIFF SUBST_NOOP_OK _PKG_VARS.subst= SUBST_CLASSES .for c in ${SUBST_CLASSES} . for pv in SUBST_STAGE SUBST_MESSAGE SUBST_FILES SUBST_SED SUBST_VARS \ @@ -113,9 +113,9 @@ _LISTED_VARS.subst= SUBST_SED.* SUBST_FI ECHO_SUBST_MSG?= ${STEP_MSG} -# _SUBST_IS_TEXT_FILE_CMD returns 0 if $$file is a text file. -_SUBST_IS_TEXT_FILE_CMD?= \ - [ -z "`LC_ALL=C ${TR} -cd '\\0' < "$$file" | ${TR} '\\0' 'x'`" ] +# _SUBST_IS_TEXT_FILE_CMD exits successfully if $$file is a text file. +_SUBST_IS_TEXT_FILE_CMD= \ + [ -z "`LC_ALL=C ${TR} -cd '\\0' < \"$$file\" | ${TR} '\\0' 'x'`" ] .if ${SUBST_CLASSES:U:O} != ${SUBST_CLASSES:U:O:u} PKG_FAIL_REASON+= "[subst.mk] duplicate SUBST class in: ${SUBST_CLASSES:O}" @@ -134,15 +134,16 @@ SUBST_FILTER_CMD.${class}+= -e s,@${v:C| _SUBST_KEEP.${class}?= LC_ALL=C ${DIFF} -u "$$file" "$$tmpfile" || true . endif _SUBST_KEEP.${class}?= ${DO_NADA} -SUBST_SKIP_TEXT_CHECK.${class}?= no +SUBST_SKIP_TEXT_CHECK.${class}?= \ + no SUBST_NOOP_OK.${class}?= ${SUBST_NOOP_OK} _SUBST_WARN.${class}= ${${SUBST_NOOP_OK.${class}:tl} == yes:?${INFO_MSG}:${WARNING_MSG}} "[subst.mk:${class}]" -.if !empty(SUBST_SKIP_TEXT_CHECK.${class}:M[Yy][Ee][Ss]) +. if !empty(SUBST_SKIP_TEXT_CHECK.${class}:M[Yy][Ee][Ss]) _SUBST_IS_TEXT_FILE_CMD.${class}= ${TRUE} -.else +. else _SUBST_IS_TEXT_FILE_CMD.${class}= ${_SUBST_IS_TEXT_FILE_CMD} -.endif +. endif . if defined(SUBST_STAGE.${class}) ${SUBST_STAGE.${class}}: subst-${class} @@ -191,7 +192,7 @@ ${_SUBST_COOKIE.${class}}: fi; \ done; \ \ - if test "$$changed,${SUBST_NOOP_OK.${class}:tl}" = no,no; then \ + if ${TEST} "$$changed,${SUBST_NOOP_OK.${class}:tl}" = no,no; then \ ${FAIL_MSG} "[subst.mk:${class}] The pattern $$pattern has no effect."; \ fi; \ done; \ --_----------=_1587210154247890--