Re: Introduce ENDLIST to terminate multiline makefile lists - Mailing list pgsql-hackers

From Chao Li
Subject Re: Introduce ENDLIST to terminate multiline makefile lists
Date
Msg-id CAEoWx2kkJA3HqrpQZusrCu-gN5HSFVRdL69srd0rV60+FNNctA@mail.gmail.com
Whole thread Raw
In response to Re: Introduce ENDLIST to terminate multiline makefile lists  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers

On Mon, Dec 29, 2025 at 10:08 AM Michael Paquier <michael@paquier.xyz> wrote:
On Mon, Dec 29, 2025 at 09:43:30AM +0800, Chao Li wrote:
> Note that since ENDLIST is defined in Makefile.global.in, this change
> requires rerunning ./configure.
>
> [1] https://postgr.es/m/DF6HDGB559U5.3MPRFCWPONEAE@jeltef.nl

FWIW, I don't see an advantage in this proposal, and it has the
disadvantage of more maintenance if one needs to create a new list.
The current state of things is simpler. 

For example, a list is:
```
OBJS = \
   a.o \
   b.o
```

Now we need to add c.o, then:
```
OBJS = \
   a.o \
   b.o \ <== this line needs to add tailing \
   c.o <== add this new line
```
there are two lines of changes.

With the $(ENDLIST), we just add an single line:
```
OBJS = \
  a.o \
  b.o \
  c.o \    <== only adding this new line, a single line of diff
  $(ENDLIST)
```

Could you please explain what more maintenance would be?

I do get the argument about C enums, but there is a difference between a grammar rule trick and
something allowed in a language specification.


I didn't mention C enums. How did you get that? I think I only mentioned C/C++ projects because they used Makefile for building.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.

pgsql-hackers by date:

Previous
From: Henson Choi
Date:
Subject: Re: RFC: PostgreSQL Storage I/O Transformation Hooks
Next
From: Tom Lane
Date:
Subject: Re: Introduce ENDLIST to terminate multiline makefile lists