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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Re: Configure problem, redux (was Re: TCL installation troubles)
Дата
Msg-id 199810272040.PAA01032@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Configure problem, redux (was Re: TCL installation troubles)  (Brook Milligan <brook@trillium.NMSU.Edu>)
Ответы Re: [HACKERS] Re: Configure problem, redux (was Re: TCL installation troubles)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] new graphics file?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Configure problem, redux (was Re: TCL installation troubles)