Date: Wed, 05 Mar 2025 13:09:38 -0800 From: "Greg A. Woods" <wo...@planix.ca> Message-ID: <m1tpvzn-00Mo5f0@more.local>
| # Note by default on NetBSD the default shell used by make is /bin/sh and by | # default it is passed the options "-q" (which show up in "$-" as "eLqs") as the | # .echoFlag is set to this undocumented 'q' option (which, FYI, /bin/ksh doesn't | # have). This has the effect of hiding what is being read from $ENV, if | # anything. It certainly isn't undocumented, from man sh ... -q quietprofile If the -v or -x options have been set, temporarily disable them before reading initialization files, these being /etc/profile, .profile, and the file specified by the ENV environment variable. It is an option our sh has had since about forever (probably an original ash option). So assuming by "hiding what is being read" you mean that one or both of the -v and -x options get ignored while startup files (.profile and $ENV) are being read, then use. It is something of a bizarre option, which has weird consequences, that I am unable to properly work around (or never have been) but in your average simple case, works just as documented (where it gets weird is when one of those files wants to alter the state of -v or -x). And just for completeness, -L is local lineo, which affects how $LINENO is interpreted inside functions, -e you know I think (it was created, I have always believed, just for make to use, so using it there makes sense, but that's about the only time anyone should ever use it) and -s means reading stdin, which a sh run from make should never be doing, or I wouldn't have thought so anyway. kre ps: the quote above for -q is in the section of sh(1) about the set builtin command, which is the same place all the other options are documented.