From: Junio C Hamano Date: Wed, 26 Oct 2022 19:13:26 GMT Subject: Re: [PATCH v2 2/3] Makefile: define "TEST_{PROGRAM,OBJS}" variables earlier Message-ID: In-Reply-To: <221026.86y1t2beoj.gmgdl@evledraar.gmail.com> Ævar Arnfjörð Bjarmason writes: > On Wed, Oct 26 2022, Junio C Hamano wrote: > >> Ævar Arnfjörð Bjarmason writes: >> >>> Define the variables that make up TEST_OBJS earlier, and don't go back >>> & forth in their definition. Before we'd first append $X to >>> $(TEST_PROGRAMS), and then substitute $X back out of it to define >>> $(TEST_OBJS). Let's instead add a new $(TEST_PROGRAM_OBJS) variable, >>> which avoids this needless back & forth substitution. >> >> Makes sense, I guess. So TEST_OBJS is no longer used? > > Yes, sorry I'll clarify that in a re-roll. It invites the question why it needed to be renamed in the first place, though. If we needed to name something that is different from the original TEST_OBJS, it makes perfect sense to add a variable with a new name, but if it is not the case here, then...? >> Having said that, "all::" being able to be built up with independent >> pieces shine here in this split from the original. It probably is >> easier to reason about while seeing this isolated area of Makefile >> what is being done to TEST_PROGRAMS. > > ...here I'm not quite sure if you want to keep it after all or nat... I'll let it pass this time ;-) but my patience is not infinite.