pgsql/src/interfaces/libpq (Makefile)

Started by Tom Laneover 25 years ago7 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Date: Thursday, October 19, 2000 @ 23:45:35
Author: tgl

Update of /home/projects/pgsql/cvsroot/pgsql/src/interfaces/libpq
from hub.org:/home/projects/pgsql/tmp/cvs-serv61188

Modified Files:
Makefile

----------------------------- Log Message -----------------------------

Remove 'override' keyword, which breaks the build on HPUX, and probably
anywhere else that Makefile.shlib needs to modify CFLAGS to produce
valid code for a shared library. I'm not real clear on *why* the use
of override causes make to ignore the later attempt to assign
CFLAGS +=
but it indubitably does --- at least on gmake 3.79.1. gmake bug?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tom Lane (#1)
Re: pgsql/src/interfaces/libpq (Makefile)

I wrote:

Remove 'override' keyword, which breaks the build on HPUX, and probably
anywhere else that Makefile.shlib needs to modify CFLAGS to produce
valid code for a shared library. I'm not real clear on *why* the use
of override causes make to ignore the later attempt to assign
CFLAGS +=
but it indubitably does --- at least on gmake 3.79.1. gmake bug?

Sigh, that's what I get for typing commit notes right on the command
line --- what I cut-and-pasted was
CFLAGS += $(CFLAGS_SL)
but since I'd used double quotes, my shell tried to expand that...

Anyway, it seems like "override" does not work the way Peter is
expecting it to, at least not in my copy of gmake which I believe is
up-to-date. I seem to recall someone else complaining of this same
breakage a day or two back, as well.

Is this a make bug, or a make documentation bug, or what? I sure don't
see anything in the make manual to suggest that it should act the way
it's acting...

regards, tom lane

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#2)
Re: pgsql/src/interfaces/libpq (Makefile)

Tom Lane writes:

Anyway, it seems like "override" does not work the way Peter is
expecting it to, at least not in my copy of gmake which I believe is
up-to-date. I seem to recall someone else complaining of this same
breakage a day or two back, as well.

Is this a make bug, or a make documentation bug, or what?

I'm convinced it's one of the two, but I haven't heard back from
bug-make@gnu.org, yet. In any case, the VPATH/CPPFLAGS patch that's
coming up will stick an "override" in front of every C(PP)?FLAGS variable,
which is the right thing to do anyway.

(One might wonder why bother about this: it's because users might try to
run, e.g., "make all CFLAGS=-O99 -mfoo" etc., so you have to forcibly hold
on to the necessary CFLAGS as well. Yeah, I know, COPT -- but who's ever
heard of that?)

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#4Hiroshi Inoue
Inoue@tpf.co.jp
In reply to: Peter Eisentraut (#3)
RE: pgsql/src/interfaces/libpq (Makefile)

-----Original Message-----
From: Peter Eisentraut

Tom Lane writes:

Anyway, it seems like "override" does not work the way Peter is
expecting it to, at least not in my copy of gmake which I believe is
up-to-date. I seem to recall someone else complaining of this same
breakage a day or two back, as well.

Is this a make bug, or a make documentation bug, or what?

I'm convinced it's one of the two, but I haven't heard back from
bug-make@gnu.org, yet. In any case, the VPATH/CPPFLAGS patch that's
coming up will stick an "override" in front of every C(PP)?FLAGS variable,
which is the right thing to do anyway.

Hmm,is it sufficient ? For example,don't I have to change Makefile.custom
to use "override" ? I know now Makefile.custom isn't your recommendation
but how many people know it ?

Regards.
Hiroshi Inoue

#5Peter Eisentraut
peter_e@gmx.net
In reply to: Hiroshi Inoue (#4)
RE: pgsql/src/interfaces/libpq (Makefile)

Hiroshi Inoue writes:

Hmm,is it sufficient ? For example,don't I have to change Makefile.custom
to use "override" ?

You shouldn't have to. There is no "override CFLAGS" anywhere before
Makefile.custom is included (unless you use Irix or SCO, but that should
be fixed).

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#3)
Re: pgsql/src/interfaces/libpq (Makefile)

Peter Eisentraut <peter_e@gmx.net> writes:

(One might wonder why bother about this: it's because users might try to
run, e.g., "make all CFLAGS=-O99 -mfoo" etc., so you have to forcibly hold
on to the necessary CFLAGS as well. Yeah, I know, COPT -- but who's ever
heard of that?)

That's a fairly unconvincing example, since the likely result would be
settings CFLAGS to "-O99 ... -O2 ...", thus preventing the user from
getting what he wants. Given that we do not know how "override" really
behaves (except that it's not like the manual), nor how consistently
it behaves across different versions of gmake, I think that it would be
far smarter to avoid "override" completely.

regards, tom lane

#7Hiroshi Inoue
Inoue@tpf.co.jp
In reply to: Peter Eisentraut (#5)
Re: pgsql/src/interfaces/libpq (Makefile)

Peter Eisentraut wrote:

Hiroshi Inoue writes:

Hmm,is it sufficient ? For example,don't I have to change Makefile.custom
to use "override" ?

You shouldn't have to. There is no "override CFLAGS" anywhere before
Makefile.custom is included (unless you use Irix or SCO, but that should
be fixed).

Hmm,isn't it misleading ? Could all people take "override" into
account carefully when changing Makefiles ? Seems neither
you nor Tom knows the proper spec of "override". Of cource
I don't know it either.

Regards.
Hiroshi Inoue