git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 2/2] Makefile: use $(OBJECTS) instead of $(C_OBJ)

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 1, 2022, 14:52 UTC
Message-ID
<220901.867d2njg52.gmgdl@evledraar.gmail.com>
In-Reply-To
<xmqqmtbkdr5n.fsf@gitster.g>
On Wed, Aug 31 2022, Junio C Hamano wrote:
Show 16 quoted lines
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> In the preceding commit $(C_OBJ) added in c373991375a (Makefile: list
>> generated object files in OBJECTS, 2010-01-26) became synonymous with
>> $(OBJECTS). Let's avoid the indirection and use the $(OBJECTS)
>> variable directly instead.
>>
>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>> ---
>>  Makefile | 6 ++----
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> This is a declaration that we would never ever build .o files out of
> sources other than .c files.  While it does make sense to have it
> outside the scope of [PATCH 1/2], I am not sure if it even belongs
> to the same series.
I think it does. Before this the C_OBJ would be:
	C_OBJ := $(filter-out $(ASM_OBJ),$(OBJECTS))

but after 1/2 it's the same as $(OBJECTS). An earlier iteration of this did this cleanup "while we're at it" (which I do think makes sense as an atomic change), but I got the feedback that the cleanup wasn't strictly necessary.

But as 1/2 has removed the ability to build those $(ASM_OBJ), as we had only one of those, I don't think keeping this particular bit of indirection makes sense.

Of course it doesn't really matter at all, the real change is the removal of $(ASM_OBJ).

If we do start building *.o files out of *.S files (or other non-*.c) again we'll need new rules anyway. I think we should just add any such variables back then, and not keep this small bit of dead husk around.

Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 17 in “SHA1dc on mac”
  1. Mike HommeyFeb 12, 2020
  2. Eric SunshineFeb 12, 2020
  3. Mike HommeyFeb 12, 2020
  4. Junio C HamanoFeb 12, 2020
  5. Remove non-SHA1dc sha1 implementationsMike Hommey, Feb 23, 2020
  6. Jeff KingFeb 24, 2020
  7. Jeff KingFeb 24, 2020
  8. ppc: remove custom SHA-1 implementationÆvar Arnfjörð Bjarmason, Mar 19, 2022
  9. Junio C HamanoMar 21, 2022
  10. ppc: remove custom SHA-1 implementationÆvar Arnfjörð Bjarmason, Mar 21, 2022
  11. brian m. carlsonMar 21, 2022
  12. 0/2 Makefile + hash.h: remove PPC_SHA1 implementationÆvar Arnfjörð Bjarmason, Aug 31, 2022
  13. 2/2 Makefile: use $(OBJECTS) instead of $(C_OBJ)Ævar Arnfjörð Bjarmason, Aug 31, 2022
  14. Junio C HamanoAug 31, 2022
  15. Ævar Arnfjörð BjarmasonSep 1, 2022
  16. Junio C HamanoSep 1, 2022
  17. 1/2 Makefile + hash.h: remove PPC_SHA1 implementationÆvar Arnfjörð Bjarmason, Aug 31, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.