Thread: pgsql: Cosmetic improvements in plpython's make rule for libpython impo

pgsql: Cosmetic improvements in plpython's make rule for libpython impo

From
Tom Lane
Date:
Cosmetic improvements in plpython's make rule for libpython import library.

This build technique is remarkably ugly, but that doesn't mean it has
to be unreadable too.  Be a bit more liberal with the vertical whitespace,
and give the .def file a proper dependency, just in case.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a7983e989d9cafc9cef49becfee054e34b1ed9b4

Modified Files
--------------
src/pl/plpython/Makefile |   15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)


Re: pgsql: Cosmetic improvements in plpython's make rule for libpython impo

From
Noah Misch
Date:
On Fri, Feb 14, 2014 at 04:31:42PM +0000, Tom Lane wrote:
> Cosmetic improvements in plpython's make rule for libpython import library.
>
> This build technique is remarkably ugly, but that doesn't mean it has
> to be unreadable too.  Be a bit more liberal with the vertical whitespace,
> and give the .def file a proper dependency, just in case.

That dependency omission was no accident.  See commit 0d147e43 and
contemporary discussion.

> Branch
> ------
> master
>
> Details
> -------
> http://git.postgresql.org/pg/commitdiff/a7983e989d9cafc9cef49becfee054e34b1ed9b4


Noah Misch <noah@leadboat.com> writes:
> On Fri, Feb 14, 2014 at 04:31:42PM +0000, Tom Lane wrote:
>> Cosmetic improvements in plpython's make rule for libpython import library.
>>
>> This build technique is remarkably ugly, but that doesn't mean it has
>> to be unreadable too.  Be a bit more liberal with the vertical whitespace,
>> and give the .def file a proper dependency, just in case.

> That dependency omission was no accident.  See commit 0d147e43 and
> contemporary discussion.

Hm.  I failed to find the "contemporary discussion" after a bit of
looking, but surely there's a way to get Cygwin's make to handle file
names with colons in them?  Or if not, maybe we should try to strip out
any drive letter appearing in the DLL spec?  I do not really believe the
argument that we don't need a dependency there.

            regards, tom lane


On Sun, Aug 17, 2014 at 11:55:09AM -0400, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
> > On Fri, Feb 14, 2014 at 04:31:42PM +0000, Tom Lane wrote:
> >> Cosmetic improvements in plpython's make rule for libpython import library.
> >>
> >> This build technique is remarkably ugly, but that doesn't mean it has
> >> to be unreadable too.  Be a bit more liberal with the vertical whitespace,
> >> and give the .def file a proper dependency, just in case.
>
> > That dependency omission was no accident.  See commit 0d147e43 and
> > contemporary discussion.
>
> Hm.  I failed to find the "contemporary discussion" after a bit of
> looking,

http://www.postgresql.org/message-id/flat/20130103031358.GB11705@tornado.leadboat.com

> but surely there's a way to get Cygwin's make to handle file
> names with colons in them?  Or if not, maybe we should try to strip out
> any drive letter appearing in the DLL spec?

Escaping the colon with a backslash does work.  (There's nothing
Cygwin-specific in play, just standard GNU make colon semantics.)

> I do not really believe the
> argument that we don't need a dependency there.

We don't add a dependency on /usr/lib/libz.a, even though a change to that
file might influence a rebuild.  This is similar.