Thread: libpgtcl
Hello, in the Directory src/bin/pgtclsh there is a good mechanism to integrate the tcl-spec in the Makefile. The patch in the attachemant does this in the src/interfaces/libpgtcl too Thank you Rudolf -- --------------------------------------------------------------- Rudolf Weber http://www.infnet.verein.de/home/rw E-Mail: rfweber@bluewin.de--- ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh.in.orig Tue Jun 6 01:03:10 2000 +++ ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh.in Tue Jun 6 01:02:19 2000 @@ -0,0 +1,16 @@ + +if [ ! -f @TCL_CONFIG_SH@ ]; then + echo "@TCL_CONFIG_SH@ not found" + echo "I need this file! Please make a symbolic link to this file" + echo "and start make again." + exit 1 +fi + +cat @TCL_CONFIG_SH@ | + egrep '^TCL_' | + while read inp + do + eval eval echo $inp + done >Makefile.tcldefs + +exit 0 --- ./src/interfaces/libpgtcl/mkMakefile.tkdefs.sh.in.orig Tue Jun 6 01:03:21 2000 +++ ./src/interfaces/libpgtcl/mkMakefile.tkdefs.sh.in Tue Jun 6 01:02:19 2000 @@ -0,0 +1,18 @@ + +if [ ! -f @TK_CONFIG_SH@ ]; then + echo "@TK_CONFIG_SH@ not found" + echo "I need this file! Please make a symbolic link to this file" + echo "and start make again." + exit 1 +fi + +. @TK_CONFIG_SH@ + +cat @TK_CONFIG_SH@ | + egrep '^TK_' | + while read inp + do + eval eval echo $inp + done >Makefile.tkdefs + +exit 0 --- ./src/interfaces/libpgtcl/Makefile.in.orig Wed Mar 8 02:58:36 2000 +++ ./src/interfaces/libpgtcl/Makefile.in Tue Jun 6 01:22:46 2000 @@ -17,6 +17,14 @@ SRCDIR= @top_srcdir@ include $(SRCDIR)/Makefile.global +# +# Include definitions from the tclConfig.sh file +# +include Makefile.tcldefs +ifeq ($(USE_TK), true) +include Makefile.tkdefs +endif + CFLAGS+= -I$(SRCDIR)/backend \ -I$(SRCDIR)/include \ -I$(LIBPQDIR) @@ -48,6 +56,11 @@ beforeinstall-headers: -@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi +Makefile.tcldefs: mkMakefile.tcldefs.sh + /bin/sh mkMakefile.tcldefs.sh + +Makefile.tkdefs: mkMakefile.tkdefs.sh + /bin/sh mkMakefile.tkdefs.sh .PHONY: clean --- ./src/configure.in.orig Thu May 25 00:43:59 2000 +++ ./src/configure.in Tue Jun 6 01:16:10 2000 @@ -1371,6 +1371,8 @@ interfaces/ecpg/preproc/Makefile interfaces/libpq++/Makefile interfaces/libpgeasy/Makefile + interfaces/libpgtcl/mkMakefile.tcldefs.sh + interfaces/libpgtcl/mkMakefile.tkdefs.sh interfaces/libpgtcl/Makefile interfaces/odbc/GNUmakefile interfaces/odbc/Makefile.global
Applied. > Hello, > > in the Directory src/bin/pgtclsh there is a good mechanism to integrate > the > tcl-spec in the Makefile. > The patch in the attachemant does this in the src/interfaces/libpgtcl > too > > Thank you > Rudolf > -- > --------------------------------------------------------------- > Rudolf Weber > http://www.infnet.verein.de/home/rw > E-Mail: rfweber@bluewin.de > --- ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh.in.orig Tue Jun 6 01:03:10 2000 > +++ ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh.in Tue Jun 6 01:02:19 2000 > @@ -0,0 +1,16 @@ > + > +if [ ! -f @TCL_CONFIG_SH@ ]; then > + echo "@TCL_CONFIG_SH@ not found" > + echo "I need this file! Please make a symbolic link to this file" > + echo "and start make again." > + exit 1 > +fi > + > +cat @TCL_CONFIG_SH@ | > + egrep '^TCL_' | > + while read inp > + do > + eval eval echo $inp > + done >Makefile.tcldefs > + > +exit 0 > --- ./src/interfaces/libpgtcl/mkMakefile.tkdefs.sh.in.orig Tue Jun 6 01:03:21 2000 > +++ ./src/interfaces/libpgtcl/mkMakefile.tkdefs.sh.in Tue Jun 6 01:02:19 2000 > @@ -0,0 +1,18 @@ > + > +if [ ! -f @TK_CONFIG_SH@ ]; then > + echo "@TK_CONFIG_SH@ not found" > + echo "I need this file! Please make a symbolic link to this file" > + echo "and start make again." > + exit 1 > +fi > + > +. @TK_CONFIG_SH@ > + > +cat @TK_CONFIG_SH@ | > + egrep '^TK_' | > + while read inp > + do > + eval eval echo $inp > + done >Makefile.tkdefs > + > +exit 0 > --- ./src/interfaces/libpgtcl/Makefile.in.orig Wed Mar 8 02:58:36 2000 > +++ ./src/interfaces/libpgtcl/Makefile.in Tue Jun 6 01:22:46 2000 > @@ -17,6 +17,14 @@ > SRCDIR= @top_srcdir@ > include $(SRCDIR)/Makefile.global > > +# > +# Include definitions from the tclConfig.sh file > +# > +include Makefile.tcldefs > +ifeq ($(USE_TK), true) > +include Makefile.tkdefs > +endif > + > CFLAGS+= -I$(SRCDIR)/backend \ > -I$(SRCDIR)/include \ > -I$(LIBPQDIR) > @@ -48,6 +56,11 @@ > beforeinstall-headers: > -@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi > > +Makefile.tcldefs: mkMakefile.tcldefs.sh > + /bin/sh mkMakefile.tcldefs.sh > + > +Makefile.tkdefs: mkMakefile.tkdefs.sh > + /bin/sh mkMakefile.tkdefs.sh > > .PHONY: clean > > --- ./src/configure.in.orig Thu May 25 00:43:59 2000 > +++ ./src/configure.in Tue Jun 6 01:16:10 2000 > @@ -1371,6 +1371,8 @@ > interfaces/ecpg/preproc/Makefile > interfaces/libpq++/Makefile > interfaces/libpgeasy/Makefile > + interfaces/libpgtcl/mkMakefile.tcldefs.sh > + interfaces/libpgtcl/mkMakefile.tkdefs.sh > interfaces/libpgtcl/Makefile > interfaces/odbc/GNUmakefile > interfaces/odbc/Makefile.global -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
I am happy to back it out. Comments? [Let me give the author time to respond.] [ Charset ISO-8859-1 unsupported, converting... ] > I just looked at this yesterday and I wonder why one would want to do > this. The libpgtcl build works perfectly fine and it doesn't even link > with tcl, so there's little reason to "integrate the tcl-spec" into > things. The only thing that this change accomplishes is that it makes the > libpgtcl build deviate more from the common behaviour (for example by not > using the compiler the user specified). IMHO, the custom build code for > the Perl, Python, and part of the Tcl interface should be considered a > necessary evil since we don't know better but nothing that should be > propagated unnecessarily. > > > On Tue, 13 Jun 2000, Bruce Momjian wrote: > > > Applied. > > > > > > > Hello, > > > > > > in the Directory src/bin/pgtclsh there is a good mechanism to integrate > > > the > > > tcl-spec in the Makefile. > > > The patch in the attachemant does this in the src/interfaces/libpgtcl > > > too > > > > > > Thank you > > > Rudolf > > > -- > > > --------------------------------------------------------------- > > > Rudolf Weber > > > http://www.infnet.verein.de/home/rw > > > E-Mail: rfweber@bluewin.de > > > > > --- ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh.in.orig Tue Jun 6 01:03:10 2000 > > > +++ ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh.in Tue Jun 6 01:02:19 2000 > > > @@ -0,0 +1,16 @@ > > > + > > > +if [ ! -f @TCL_CONFIG_SH@ ]; then > > > + echo "@TCL_CONFIG_SH@ not found" > > > + echo "I need this file! Please make a symbolic link to this file" > > > + echo "and start make again." > > > + exit 1 > > > +fi > > > + > > > +cat @TCL_CONFIG_SH@ | > > > + egrep '^TCL_' | > > > + while read inp > > > + do > > > + eval eval echo $inp > > > + done >Makefile.tcldefs > > > + > > > +exit 0 > > > --- ./src/interfaces/libpgtcl/mkMakefile.tkdefs.sh.in.orig Tue Jun 6 01:03:21 2000 > > > +++ ./src/interfaces/libpgtcl/mkMakefile.tkdefs.sh.in Tue Jun 6 01:02:19 2000 > > > @@ -0,0 +1,18 @@ > > > + > > > +if [ ! -f @TK_CONFIG_SH@ ]; then > > > + echo "@TK_CONFIG_SH@ not found" > > > + echo "I need this file! Please make a symbolic link to this file" > > > + echo "and start make again." > > > + exit 1 > > > +fi > > > + > > > +. @TK_CONFIG_SH@ > > > + > > > +cat @TK_CONFIG_SH@ | > > > + egrep '^TK_' | > > > + while read inp > > > + do > > > + eval eval echo $inp > > > + done >Makefile.tkdefs > > > + > > > +exit 0 > > > --- ./src/interfaces/libpgtcl/Makefile.in.orig Wed Mar 8 02:58:36 2000 > > > +++ ./src/interfaces/libpgtcl/Makefile.in Tue Jun 6 01:22:46 2000 > > > @@ -17,6 +17,14 @@ > > > SRCDIR= @top_srcdir@ > > > include $(SRCDIR)/Makefile.global > > > > > > +# > > > +# Include definitions from the tclConfig.sh file > > > +# > > > +include Makefile.tcldefs > > > +ifeq ($(USE_TK), true) > > > +include Makefile.tkdefs > > > +endif > > > + > > > CFLAGS+= -I$(SRCDIR)/backend \ > > > -I$(SRCDIR)/include \ > > > -I$(LIBPQDIR) > > > @@ -48,6 +56,11 @@ > > > beforeinstall-headers: > > > -@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi > > > > > > +Makefile.tcldefs: mkMakefile.tcldefs.sh > > > + /bin/sh mkMakefile.tcldefs.sh > > > + > > > +Makefile.tkdefs: mkMakefile.tkdefs.sh > > > + /bin/sh mkMakefile.tkdefs.sh > > > > > > .PHONY: clean > > > > > > --- ./src/configure.in.orig Thu May 25 00:43:59 2000 > > > +++ ./src/configure.in Tue Jun 6 01:16:10 2000 > > > @@ -1371,6 +1371,8 @@ > > > interfaces/ecpg/preproc/Makefile > > > interfaces/libpq++/Makefile > > > interfaces/libpgeasy/Makefile > > > + interfaces/libpgtcl/mkMakefile.tcldefs.sh > > > + interfaces/libpgtcl/mkMakefile.tkdefs.sh > > > interfaces/libpgtcl/Makefile > > > interfaces/odbc/GNUmakefile > > > interfaces/odbc/Makefile.global > > > > > > > > -- > Peter Eisentraut Sernanders v?g 10:115 > peter_e@gmx.net 75262 Uppsala > http://yi.org/peter-e/ Sweden > > -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian <pgman@candle.pha.pa.us> writes: > I am happy to back it out. Comments? [Let me give the author time to > respond.] >> I just looked at this yesterday and I wonder why one would want to do >> this. The libpgtcl build works perfectly fine and it doesn't even link >> with tcl, so there's little reason to "integrate the tcl-spec" into >> things. My thoughts were pretty much the same as Peter's. We use the Tcl compiler and switches for pltcl because it was the path of least resistance for linking in libtcl.so. But the libpgtcl interface doesn't do that, and has not been a source of portability problems --- and it's been around for a lot longer than pltcl (we don't really know that pltcl's scheme works for everyone). So changing the way we build libpgtcl seems to me to be a risky change for little or no benefit. My inclination is to sail along with the two different build approaches for a few releases and see what sort of portability problems we hear about. Perhaps in a year or so it'll make sense to unify the handling of libpgtcl and pltcl, but right now I'm dubious. regards, tom lane
I will back it out then. > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > I am happy to back it out. Comments? [Let me give the author time to > > respond.] > > >> I just looked at this yesterday and I wonder why one would want to do > >> this. The libpgtcl build works perfectly fine and it doesn't even link > >> with tcl, so there's little reason to "integrate the tcl-spec" into > >> things. > > My thoughts were pretty much the same as Peter's. We use the Tcl > compiler and switches for pltcl because it was the path of least > resistance for linking in libtcl.so. But the libpgtcl interface > doesn't do that, and has not been a source of portability problems > --- and it's been around for a lot longer than pltcl (we don't > really know that pltcl's scheme works for everyone). So changing > the way we build libpgtcl seems to me to be a risky change for > little or no benefit. > > My inclination is to sail along with the two different build > approaches for a few releases and see what sort of portability > problems we hear about. Perhaps in a year or so it'll make sense to > unify the handling of libpgtcl and pltcl, but right now I'm dubious. > > regards, tom lane > -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Backed out. [ Charset ISO-8859-1 unsupported, converting... ] > I just looked at this yesterday and I wonder why one would want to do > this. The libpgtcl build works perfectly fine and it doesn't even link > with tcl, so there's little reason to "integrate the tcl-spec" into > things. The only thing that this change accomplishes is that it makes the > libpgtcl build deviate more from the common behaviour (for example by not > using the compiler the user specified). IMHO, the custom build code for > the Perl, Python, and part of the Tcl interface should be considered a > necessary evil since we don't know better but nothing that should be > propagated unnecessarily. > > > On Tue, 13 Jun 2000, Bruce Momjian wrote: > > > Applied. > > > > > > > Hello, > > > > > > in the Directory src/bin/pgtclsh there is a good mechanism to integrate > > > the > > > tcl-spec in the Makefile. > > > The patch in the attachemant does this in the src/interfaces/libpgtcl > > > too > > > > > > Thank you > > > Rudolf > > > -- > > > --------------------------------------------------------------- > > > Rudolf Weber > > > http://www.infnet.verein.de/home/rw > > > E-Mail: rfweber@bluewin.de > > > > > --- ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh.in.orig Tue Jun 6 01:03:10 2000 > > > +++ ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh.in Tue Jun 6 01:02:19 2000 > > > @@ -0,0 +1,16 @@ > > > + > > > +if [ ! -f @TCL_CONFIG_SH@ ]; then > > > + echo "@TCL_CONFIG_SH@ not found" > > > + echo "I need this file! Please make a symbolic link to this file" > > > + echo "and start make again." > > > + exit 1 > > > +fi > > > + > > > +cat @TCL_CONFIG_SH@ | > > > + egrep '^TCL_' | > > > + while read inp > > > + do > > > + eval eval echo $inp > > > + done >Makefile.tcldefs > > > + > > > +exit 0 > > > --- ./src/interfaces/libpgtcl/mkMakefile.tkdefs.sh.in.orig Tue Jun 6 01:03:21 2000 > > > +++ ./src/interfaces/libpgtcl/mkMakefile.tkdefs.sh.in Tue Jun 6 01:02:19 2000 > > > @@ -0,0 +1,18 @@ > > > + > > > +if [ ! -f @TK_CONFIG_SH@ ]; then > > > + echo "@TK_CONFIG_SH@ not found" > > > + echo "I need this file! Please make a symbolic link to this file" > > > + echo "and start make again." > > > + exit 1 > > > +fi > > > + > > > +. @TK_CONFIG_SH@ > > > + > > > +cat @TK_CONFIG_SH@ | > > > + egrep '^TK_' | > > > + while read inp > > > + do > > > + eval eval echo $inp > > > + done >Makefile.tkdefs > > > + > > > +exit 0 > > > --- ./src/interfaces/libpgtcl/Makefile.in.orig Wed Mar 8 02:58:36 2000 > > > +++ ./src/interfaces/libpgtcl/Makefile.in Tue Jun 6 01:22:46 2000 > > > @@ -17,6 +17,14 @@ > > > SRCDIR= @top_srcdir@ > > > include $(SRCDIR)/Makefile.global > > > > > > +# > > > +# Include definitions from the tclConfig.sh file > > > +# > > > +include Makefile.tcldefs > > > +ifeq ($(USE_TK), true) > > > +include Makefile.tkdefs > > > +endif > > > + > > > CFLAGS+= -I$(SRCDIR)/backend \ > > > -I$(SRCDIR)/include \ > > > -I$(LIBPQDIR) > > > @@ -48,6 +56,11 @@ > > > beforeinstall-headers: > > > -@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi > > > > > > +Makefile.tcldefs: mkMakefile.tcldefs.sh > > > + /bin/sh mkMakefile.tcldefs.sh > > > + > > > +Makefile.tkdefs: mkMakefile.tkdefs.sh > > > + /bin/sh mkMakefile.tkdefs.sh > > > > > > .PHONY: clean > > > > > > --- ./src/configure.in.orig Thu May 25 00:43:59 2000 > > > +++ ./src/configure.in Tue Jun 6 01:16:10 2000 > > > @@ -1371,6 +1371,8 @@ > > > interfaces/ecpg/preproc/Makefile > > > interfaces/libpq++/Makefile > > > interfaces/libpgeasy/Makefile > > > + interfaces/libpgtcl/mkMakefile.tcldefs.sh > > > + interfaces/libpgtcl/mkMakefile.tkdefs.sh > > > interfaces/libpgtcl/Makefile > > > interfaces/odbc/GNUmakefile > > > interfaces/odbc/Makefile.global > > > > > > > > -- > Peter Eisentraut Sernanders v?g 10:115 > peter_e@gmx.net 75262 Uppsala > http://yi.org/peter-e/ Sweden > > -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026