Re: Contrib PROGRAM problem

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Boszormenyi Zoltan <zb(at)cybertec(dot)at>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Contrib PROGRAM problem
Date: 2013-01-19 04:59:48
Message-ID: 1358571588.17277.4.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2013-01-18 at 17:37 -0500, Andrew Dunstan wrote:
> > ifdef PROGRAM
> > $(PROGRAM): $(OBJS)
> > - $(CC) $(CFLAGS) $(OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX)
> $(LIBS) -o $@
> > + $(CC) $(CFLAGS) $(OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX)
> $(LIBS) -o $(at)$(X)
> > endif
> >
>
>
> Wouldn't it be better to make the rule be for $(PROGRAM)$(X) and
> adjust
> the dependency for "all" in the same manner? Otherwise make will
> rebuild
> it whether or not it's needed, won't it?
>
The above is the way it's done everywhere else in the source tree.

I think the reason this works is that either make or the system call
that make uses is aware of this naming issue somehow.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-01-19 05:02:31 Re: BUG #7815: Upgrading PostgreSQL from 9.1 to 9.2 with pg_upgrade/postgreql-setup fails - invalid status retrieve
Previous Message Andrew Dunstan 2013-01-19 04:57:47 Re: Contrib PROGRAM problem