BUG #1490: contrib .sql.in sed command bogus

Started by Alexis Wilkeabout 21 years ago3 messagesbugs
Jump to latest
#1Alexis Wilke
alexis@m2osw.com

The following bug has been logged online:

Bug reference: 1490
Logged by: Alexis Wilke
Email address: alexis@m2osw.com
PostgreSQL version: 8.0.1
Operating system: Linux
Description: contrib .sql.in sed command bogus
Details:

Inside pgxs.mk I had to change the $$libdir into $(libdir ) to get the
proper path in the final .sql file:

ifneq (,$(MODULES)$(MODULE_big))
%.sql: %.sql.in
sed 's,MODULE_PATHNAME,$(libdir)/$*,g' $< >$@
endif

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alexis Wilke (#1)
Re: BUG #1490: contrib .sql.in sed command bogus

"Alexis Wilke" <alexis@m2osw.com> writes:

Inside pgxs.mk I had to change the $$libdir into $(libdir ) to get the
proper path in the final .sql file:

ifneq (,$(MODULES)$(MODULE_big))
%.sql: %.sql.in
sed 's,MODULE_PATHNAME,$(libdir)/$*,g' $< >$@
endif

This is not correct --- the substitution is supposed to be literally
"$libdir", and so the makefile is correct as-is. (I'm not sure why we
still bother with doing the sed conversion at all, except that if we
removed it you can be sure we'd think of some other thing we needed it
for ;-))

regards, tom lane

#3Alexis Wilke
alexis@m2osw.com
In reply to: Tom Lane (#2)
Re: BUG #1490: contrib .sql.in sed command bogus

Hi Tom,

Indeed, with the correct version the $libdir will work in the .sql file.
Very good. 8-)

Alexis

On Mon, 21 Feb 2005, Tom Lane wrote:

Show quoted text

"Alexis Wilke" <alexis@m2osw.com> writes:

Inside pgxs.mk I had to change the $$libdir into $(libdir ) to get the
proper path in the final .sql file:

ifneq (,$(MODULES)$(MODULE_big))
%.sql: %.sql.in
sed 's,MODULE_PATHNAME,$(libdir)/$*,g' $< >$@
endif

This is not correct --- the substitution is supposed to be literally
"$libdir", and so the makefile is correct as-is. (I'm not sure why we
still bother with doing the sed conversion at all, except that if we
removed it you can be sure we'd think of some other thing we needed it
for ;-))

regards, tom lane