Re: [ADMIN] Re: [HACKERS] Problems with src/pl/tcl/mkMakefile.tcldefs.sh.in in 6.5

From: wieck(at)debis(dot)com (Jan Wieck)
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: pgsql-hackers(at)thewrittenword(dot)com, pgsql-hackers(at)postgreSQL(dot)org, pgsql-admin(at)postgreSQL(dot)org
Subject: Re: [ADMIN] Re: [HACKERS] Problems with src/pl/tcl/mkMakefile.tcldefs.sh.in in 6.5
Date: 1999-07-11 13:46:26
Message-ID: m113Jw2-0003kdC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

>
> > On Sat, Jul 10, 1999 at 02:45:47AM -0400, Bruce Momjian wrote:
> > > I didn't understand this the first time you sent it either.
> > >
> > > Send me a patch to review, please.
> >
> > --- src/pl/tcl/mkMakefile.tcldefs.sh.in.orig Fri Jul 9 08:29:09 1999
> > +++ src/pl/tcl/mkMakefile.tcldefs.sh.in Fri Jul 9 08:29:49 1999
> > @@ -8,9 +8,6 @@
> >
> > cat @TCL_CONFIG_SH@ |
> > egrep '^TCL_|^TK_' |
> > - while read inp
> > - do
> > - eval eval echo $inp
> > - done >Makefile.tcldefs
> > + sed -e "s/^\([^=]*\)='\(.*\)'$/\1=\2/" >Makefile.tcldefs
> >
>
> I understand what your patch does, and it looks OK, but any idea why the
> 'eval eval' was there, and is it safe to skip it? I can apply this to
> 6.6.

As far as I can recall, the first of all versions I've
created did it mainly that way (with a simple sed(1) call).
But since tclConfig.sh is a shell script, there have to be
shell variable expansions done on some platforms and that
resulted finally in the double eval. So I would consider the
above a little step for a man, but a big leap backward for
mankind.

Instead, the result of the double eval must get special
characters quoted in some way.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-07-11 15:38:43 Re: [SQL] Re: [HACKERS] SELECT DISTINCT question
Previous Message Oleg Bartunov 1999-07-11 06:09:24 Re: [SQL] Re: [HACKERS] SELECT DISTINCT question