One test per line, one source per line, etc. etc. etc.

Florian Weimer fweimer@redhat.com
Mon Jun 28 10:05:10 GMT 2021


* Dmitry V. Levin:

> On Sun, Jun 27, 2021 at 10:14:09PM +0200, Florian Weimer via Libc-alpha wrote:
>> * Carlos O'Donell via Libc-alpha:
>> 
>> > Do we have consensus for someone to just cleanup all the makefiles
>> > to have one source per line, one test per line etc.?
>> 
>> I think there was some opposition to trailing \ in lists in Makefiles.
>> This:
>> 
>> routines += \
>>   read \
>>   write \
>> 
>> vs:
>> 
>> routines += \
>>   read \
>>   write
>
> I'd suggest this instead:
>
> routines += \
>   read \
>   write \
>   #

Or even:

routines += \
  read \
  write \
  # routines

It seems to work:

“
routines += \
  read \
  write \
  # routines
stop = 1

all: print-routines print-stop

print-%:
	@echo "$* = $($*)"
”

This prints:

“
routines = read write 
stop = 1
”

Thanks,
Florian



More information about the Libc-alpha mailing list