Re: [RFC PATCH v3 01/15] Makefile: use common template for GIT-BUILD-OPTIONS
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Oct 19, 2024, 05:00 UTC
- Message-ID
- <CAPig+cR2QXmgFEpaQrvsAF1jV8nZavFjYQkMXp5zaYVER2CiSg@mail.gmail.com>
- In-Reply-To
- <800fb080f45f48e248e1ed9c7b3e40cdfc526115.1729254070.git.ps@pks.im>
On Fri, Oct 18, 2024 at 8:23 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 8 quoted lines
> 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...
Show 7 quoted lines
> + @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?