From: Eric Sunshine Date: Sat, 19 Oct 2024 05:00:46 GMT Subject: Re: [RFC PATCH v3 01/15] Makefile: use common template for GIT-BUILD-OPTIONS Message-ID: In-Reply-To: <800fb080f45f48e248e1ed9c7b3e40cdfc526115.1729254070.git.ps@pks.im> On Fri, Oct 18, 2024 at 8:23 AM Patrick Steinhardt wrote: > Introduce a new "GIT-BUILD-OPTIONS.in" template to address this issue. > This has multiple advantages: > [...] > - Some build systems complain when not all variables could be > substituted, alerting us of mismatches. Others don't, but if we > forgot to substitute such variables we now have a bogus string that > will likely cause our tests to fail, if they have any meaning in the > first place. Regarding the above... > + @sed \ > + -e "s|@SHELL_PATH@|\'$(SHELL_PATH_SQ)\'|" \ > + -e "s|@TEST_SHELL_PATH@|\'$(TEST_SHELL_PATH_SQ)\'|" \ > + [...] > + GIT-BUILD-OPTIONS.in >$@+ > @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi > @if test -f GIT-BUILD-DIR; then rm GIT-BUILD-DIR; fi ... can't we `grep` whether any unsubstituted variables remain in $@+ and complain if they do?