Re: [PATCH 2/2] t/Makefile: get UNIT_TESTS list from C sources
- From
Jeff King <peff@peff.net>
- Date
- Jan 30, 2024, 05:23 UTC
- Message-ID
- <20240130052331.GB154684@coredump.intra.peff.net>
- In-Reply-To
- <CA+kUOanDydgCEax9RFu_xVXkx_LeiSPOoWiUpwAg=EVQxSDJRw@mail.gmail.com>
On Mon, Jan 29, 2024 at 09:31:11PM +0000, Adam Dinwoodie wrote:
Show 15 quoted lines
> > Hmm, good point. It seems like the answer should obviously be "yes", but > > Windows CI seemed to pass all the same (and I checked that it indeed ran > > the unit tests). Do we only get the $X suffix for MSVC builds or > > something? Looks like maybe cygwin, as well. > > Cygwin will automatically append ".exe" when doing directory listings; > a check if the file "a" exists will return true on Cygwin if "a" or > "a.exe" exists; a glob for "a*" in a directory containing files "a1" > and "a2.exe" will return "a1" and "a2". This causes problems in some > edge cases, but it means *nix scripts and applications are much more > likely to work without any Cygwin-specific handling. I *think* this > logic is carried downstream to MSYS2 and thence to Git for Windows. > > As a result, I'm not surprised this worked without handling $X, but I > don't think there's any harm in adding it either.
Ah, that makes sense. I do think it will work under the conditions you laid out, but I don't know if there are platforms where that's not the case. I'll add the $(X) just to be sure (as that really feels more consistent with what the top-level Makefile is doing anyway).
Thanks.
-Peff