Re: Confused about gram.y referencs in Makefile?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Japin Li <japinli(at)hotmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Confused about gram.y referencs in Makefile?
Date: 2023-09-25 15:29:54
Message-ID: 18971.1695655794@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
> On 25 Sep 2023, at 05:34, Japin Li <japinli(at)hotmail(dot)com> wrote:
>> How about "See gram.h target's comment in src/backend/parser/Makefile"
>> or just "See src/backend/parser/Makefile"?

> The latter seems more stable, if the Makefile is ever restructured it's almost
> guaranteed that this comment will be missed with the location info becoming
> stale.

I did it like this:

# Note that while each script call produces two output files, to be
-# parallel-make safe we need to split this into two rules. (See for
-# example gram.y for more explanation.)
+# parallel-make safe we need to split this into two rules. (See notes
+# in src/backend/parser/Makefile about rules with multiple outputs.)
#

There are a whole lot of other cross-references to that same comment,
and they all look like

# See notes in src/backend/parser/Makefile about the following two rules

I considered modifying all of those as well, but decided it wasn't
really worth the trouble. The Makefiles' days are numbered I think.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-09-25 15:30:07 Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }
Previous Message Andrew Dunstan 2023-09-25 15:19:12 Re: Remove MSVC scripts from the tree