Re: [HACKERS] Re: Configure problem, redux (was Re: TCL installation troubles) - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re: Configure problem, redux (was Re: TCL installation troubles)
Date
Msg-id 199810272040.PAA01032@candle.pha.pa.us
Whole thread Raw
In response to Re: Configure problem, redux (was Re: TCL installation troubles)  (Brook Milligan <brook@trillium.NMSU.Edu>)
Responses Re: [HACKERS] Re: Configure problem, redux (was Re: TCL installation troubles)
List 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@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] new graphics file?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Configure problem, redux (was Re: TCL installation troubles)