Re: Template matching, a different perspective - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Template matching, a different perspective
Date
Msg-id 25992.963448365@sss.pgh.pa.us
Whole thread Raw
In response to Template matching, a different perspective  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> One thing that occurred to me, if I'm going to rejuggle the templates, why
> not name them like the Makefile.${os} and the include/port/${os}.h? We
> don't really need two matching logics and no matter how smart we make the
> template matching, there's still nothing to be gained if we don't find the
> right Makefile.port and include/port/os.h (which we apparently do).

Er, um, hmm ... for some reason I'd thought the Makefile and port files
were selected by the template file, but I see they ain't.  I agree
that's pretty stupid; no point in smart template matching if the other
part falls over.

If we are eliminating the compiler choice from the template names, then
I think you've got a good idea: make a one-for-one correspondence
between templates, Makefile.ports, and os.h's.

If we do that then I'd still like to see a --with-template option, but
now it'd select all three files, and would provide a way for the user
to override that big case on $host_os.  (Alternatively, if the regular
configure "--host" option allows the same result, then we wouldn't need
--with-template anymore.)

BTW, if you are going to end up editing most or all of the templates
anyway, I'd suggest getting rid of that hack about substituting : to =,
and make the templates plain-vanilla shell scripts.  I put the hack
in awhile ago because I didn't want to edit all the templates, but
I was just being lazy :-(
        regards, tom lane


pgsql-hackers by date:

Previous
From: "G. Anthony Reina"
Date:
Subject: Re: Installing the man pages
Next
From: "Hiroshi Inoue"
Date:
Subject: RE: [7.0.2] INDEX' TUPLES != HEAP' ..