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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 31 2022, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> 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@xxxxxxxxx>
>> ---
>>  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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux