Re: Contrib PROGRAM problem
Peter Eisentraut <peter_e@gmx.net>
From: Peter Eisentraut <peter_e@gmx.net>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Boszormenyi Zoltan <zb@cybertec.at>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>
Date: 2013-01-19T04:59:48Z
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 $@$(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.