Re: Template matching, a different perspective

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Template matching, a different perspective
Date: 2000-07-13 00:32:45
Message-ID: 25992.963448365@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-07-13 00:43:40 RE: [7.0.2] INDEX' TUPLES != HEAP' ..
Previous Message G. Anthony Reina 2000-07-13 00:31:03 Re: Installing the man pages