Thread: pgsql/src/interfaces/libpq (Makefile)

pgsql/src/interfaces/libpq (Makefile)

From
Tom Lane
Date:
  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?

Re: pgsql/src/interfaces/libpq (Makefile)

From
Tom Lane
Date:
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

Re: pgsql/src/interfaces/libpq (Makefile)

From
Peter Eisentraut
Date:
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/


RE: pgsql/src/interfaces/libpq (Makefile)

From
"Hiroshi Inoue"
Date:
> -----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


RE: pgsql/src/interfaces/libpq (Makefile)

From
Peter Eisentraut
Date:
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/


Re: pgsql/src/interfaces/libpq (Makefile)

From
Tom Lane
Date:
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

Re: pgsql/src/interfaces/libpq (Makefile)

From
Hiroshi Inoue
Date:

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