Thu Jun 25 08:45:00 2020 UTC ()
mk: Handle pdksh issue with "set -e" in for loop.

With our current version of pdksh, a "false && something" construct under
"set -e" conditions will continue as it does with other shells, but if the
construct is within a for loop then it exits, causing failures in the
substitution code.  An explicit "|| true" is necessary to avoid this.

Approved during the freeze by wiz.


(jperkin)
diff -r1.100 -r1.101 pkgsrc/mk/subst.mk

cvs diff -r1.100 -r1.101 pkgsrc/mk/subst.mk (expand / switch to context diff)
--- pkgsrc/mk/subst.mk 2020/06/16 18:13:54 1.100
+++ pkgsrc/mk/subst.mk 2020/06/25 08:45:00 1.101
@@ -1,4 +1,4 @@
-# $NetBSD: subst.mk,v 1.100 2020/06/16 18:13:54 rillig Exp $
+# $NetBSD: subst.mk,v 1.101 2020/06/25 08:45:00 jperkin Exp $
 #
 # The subst framework replaces text in one or more files in the WRKSRC
 # directory. Packages can define several ``classes'' of replacements.
@@ -221,7 +221,7 @@
 			noop_count="$$noop_count+";			\
 			noop_patterns="$$noop_patterns$$noop_sep$$pattern"; \
 			noop_sep=" ";					\
-		};							\
+		} || ${TRUE};						\
 	done;								\
 	\
 	case $$noop_count in						\