Re: [HACKERS] Re: Configure problem, redux (was Re: TCL installation troubles)

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: brook(at)trillium(dot)NMSU(dot)Edu (Brook Milligan)
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, lockhart(at)alumni(dot)caltech(dot)edu, Bill(dot)Allie(at)mug(dot)org, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: Configure problem, redux (was Re: TCL installation troubles)
Date: 1998-10-27 20:40:54
Message-ID: 199810272040.PAA01032@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I'm not certain how best to handle the SQL scripts that need to know
> where libdir is, but I can think of several possibilities, one being
> that "create function" could have a library search path built into it,
> thus pushing the knowledge of where libdir is into some C code (which
> would probably be getting it from the PGLIB environment variable).
> Or we could put the value of libdir into a system table somewhere that
> the scripts can read at runtime.
>
> The way to handle this is to have rules in the Makefile that do the
> substitution. For example, something like the following Makefile
> fragment will do the trick, even if the definitition of $libdir in
> Makefile.global is modified after configure is run.
>
> SRCDIR=../../..
> include ${SRCDIR}/Makefile.global
> mklang.sql: mklang.sql.in ${SRCDIR}/Makefile.global
> sed < $< > $@ -e 's:@libdir@:${libdir}:'

The problem here is that you are duplicating the normal configure
processing in every Makefile that needs it. This will get old very
fast, and hard to maintain. configure does this already, and
automatically, in one place. Yes, you must re-run configure, and you do
loose your changes, but pulling all the stuff into every Makefile seems
worse.

--
Bruce Momjian | http://www.op.net/~candle
maillist(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 Bruce Momjian 1998-10-27 20:58:12 Re: [HACKERS] new graphics file?
Previous Message Bruce Momjian 1998-10-27 20:37:14 Re: [HACKERS] Configure problem, redux (was Re: TCL installation troubles)