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

From Brook Milligan
Subject Re: [HACKERS] Configure problem, redux (was Re: TCL installation troubles)
Date
Msg-id 199810280011.RAA01059@trillium.nmsu.edu
Whole thread Raw
In response to Re: [HACKERS] Configure problem, redux (was Re: TCL installation troubles)  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Configure problem, redux (was Re: TCL installation troubles)  ("Billy G. Allie" <Bill.Allie@mug.org>)
List pgsql-hackers
   So you output all defines into a single file, and include that in every  Makefile.  That is interesting.

I guess this isn't too clear.  Here is what I am trying to advocate:

configure output -> Makefile.global + config.h substituting as
appropriate.

all Makefiles include Makefile.global (which includes Makefile.custom
if it exists? and other things like the shared library Makefile).

one of the included Makefiles has a generic rule for *.sql.in -> *.sql
that depends on Makefile.global also.

If a directory has *.sql.in it will automatically be converted with
the correct substitutions; after all, the substitution is the same in
each case so one rule suffices (even if several variables need
substituting); note that sed will not substitute for patterns not
found in individual *.sql.in files even if the general rule says
otherwise.

Same mechanism for any other general substitutions, if necessary
(probably not).

Makefiles do not have any sed monsters, just one rule involving sed in
a generally included Makefile.sed_monsters. :)  The individual
*.sql.in files would be written in exactly the same way as if
configure was doing the substitution.

All configure information is in one place (Makefile.global and
config.h).  All dependencies do the right thing, even if those are
changed post-configure.

Cheers,
Brook


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Configure problem, redux (was Re: TCL installation troubles)
Next
From: "Dmitry Potapov"
Date:
Subject: PostgreSQL 6.3.2 for Windows NT/95