Re: utils C files

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: utils C files
Date: 2002-07-18 00:32:21
Message-ID: 200207180032.g6I0WLx25524@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > > Can you point to one example of such an inconsistency? I can't find one.
> >
> > Sure, interfaces/libpq had:
> >
> > OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
> > pqexpbuffer.o dllist.o md5.o pqsignal.o fe-secure.o \
> > $(INET_ATON) $(SNPRINTF) $(STRERROR)
> >
> > while psql/Makefile had what I think you wanted:
>
> Note that the libpq makefile goes through trouble to link the inet_aton.c
> file into the current directory, so this example doesn't count.

Well, the code is:

# this only gets done if configure finds system doesn't have inet_aton()
inet_aton.c: $(backend_src)/port/inet_aton.c
rm -f $@ && $(LN_S) $< .

How is this any better than just mentioning the *.o file and letting the
default rules compile it. I don't understand how linking to the current
directory gets us anything. Now, if you did a 'make -C dir target' that
would be different.

In fact, with the lib idea dead, if there are special rules for for
certain port/*.o files, we should put those rules in Makefile.global and
let all the code use it. That way, we defined it in one place, but can
use the object file anywhere.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tony Reina 2002-07-18 00:56:12 Planner very slow on same query to slightly different tables
Previous Message Bruce Momjian 2002-07-18 00:29:54 Re: Future of src/utils

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-07-18 01:37:14 Re: utils C files
Previous Message Manfred Koizar 2002-07-17 23:57:38 Re: Optional Oid