*** ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh.orig Sat Jul 1 17:02:31 2000 --- ./src/interfaces/libpgtcl/mkMakefile.tcldefs.sh Sat Jul 1 17:02:31 2000 *************** *** 0 **** --- 1,23 ---- + #! /bin/sh + + # $1 = path to tclConfig.sh ; $2 = output file + + if test x"$1" = x ; then + echo "$0: No tclConfig.sh file specified. Did you use \`configure --with-tcl'?" 1>&2 + exit 1 + fi + + # Source the file to obtain the correctly expanded variable definitions + . "$1" + + # Read the file a second time as an easy way of getting the list of variable + # definitions to output. + cat "$1" | + egrep '^TCL_|^TK_' | + sed 's/^\([^=]*\)=.*$/\1/' | + while read var + do + eval echo "\"$var = \$$var\"" + done > "$2" + + exit 0 *** ./src/interfaces/libpgtcl/Makefile.orig Fri May 11 03:46:33 2001 --- ./src/interfaces/libpgtcl/Makefile Mon Dec 17 11:14:05 2001 *************** *** 12,17 **** --- 12,19 ---- top_builddir = ../../.. include ../../Makefile.global + -include Makefile.tcldefs + NAME= pgtcl SO_MAJOR_VERSION= 2 SO_MINOR_VERSION= 2 *************** *** 20,26 **** --- 22,34 ---- OBJS= pgtcl.o pgtclCmds.o pgtclId.o + ifneq ($(TCL_SHLIB_LD_LIBS),) + # link command for a shared lib must mention shared libs it uses + # TCL_LIB_SPEC is probably not gcc safe when tcl was built with a native compiler + SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS) $(libpq) + else SHLIB_LINK = $(libpq) + endif # If crypt is a separate library, rather than part of libc, it may need # to be referenced separately to keep (broken) linkers happy. (This is *************** *** 48,55 **** uninstall: uninstall-lib rm -f $(DESTDIR)$(includedir)/libpgtcl.h clean distclean maintainer-clean: clean-lib ! rm -f $(OBJS) depend dep: $(CC) -MM $(CFLAGS) *.c >depend --- 56,66 ---- uninstall: uninstall-lib rm -f $(DESTDIR)$(includedir)/libpgtcl.h + Makefile.tcldefs: mkMakefile.tcldefs.sh + $(SHELL) $< '$(TCL_CONFIG_SH)' '$@' + clean distclean maintainer-clean: clean-lib ! rm -f $(OBJS) Makefile.tcldefs depend dep: $(CC) -MM $(CFLAGS) *.c >depend *** ./src/pl/tcl/Makefile.orig Sat Oct 13 06:23:50 2001 --- ./src/pl/tcl/Makefile Mon Dec 17 12:56:19 2001 *************** *** 26,97 **** endif endif - # Change following to how shared library that contains references to - # libtcl must get built on your system. Since these definitions come - # from the tclConfig.sh script, they should work if the shared build - # of tcl was successful on this system. However, tclConfig.sh lies to - # us a little bit (at least in versions 7.6 through 8.0.4) --- it - # doesn't mention -lc in TCL_LIBS, but you still need it on systems - # that want to hear about dependent libraries... - ifneq ($(TCL_SHLIB_LD_LIBS),) ! # link command for a shared lib must mention shared libs it uses ! SHLIB_EXTRA_LIBS=$(TCL_LIBS) -lc else ! ifeq ($(PORTNAME), hpux) ! # link command for a shared lib must mention shared libs it uses, ! # even though Tcl doesn't think so... ! SHLIB_EXTRA_LIBS=$(TCL_LIBS) -lc ! else ! # link command for a shared lib must NOT mention shared libs it uses ! SHLIB_EXTRA_LIBS= endif - endif ! %$(TCL_SHLIB_SUFFIX): %.o ! $(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS) - - CC = $(TCL_CC) - - # Since we are using Tcl's choice of C compiler, which might not be - # the same one selected for Postgres, do NOT use CFLAGS from - # Makefile.global. Instead use TCL's CFLAGS plus necessary -I - # directives. - - # Can choose either TCL_CFLAGS_OPTIMIZE or TCL_CFLAGS_DEBUG here, as - # needed - override CPPFLAGS += $(TCL_DEFS) - override CFLAGS = $(TCL_CFLAGS_OPTIMIZE) $(TCL_SHLIB_CFLAGS) - - - # - # DLOBJS is the dynamically-loaded object file. - # - DLOBJS= pltcl$(DLSUFFIX) - - INFILES= $(DLOBJS) - - # - # plus exports files - # - ifdef EXPSUFF - INFILES+= $(DLOBJS:.o=$(EXPSUFF)) - endif - - - # Provide dummy targets for the case where we can't build the shared library. - ifeq ($(TCL_SHARED_BUILD), 1) ! all: $(INFILES) $(MAKE) -C modules $@ - pltcl$(DLSUFFIX): pltcl.o - install: all installdirs ! $(INSTALL_SHLIB) $(DLOBJS) $(DESTDIR)$(pkglibdir)/$(DLOBJS) $(MAKE) -C modules $@ installdirs: --- 26,51 ---- endif endif + NAME = pltcl + SO_MAJOR_VERSION = 2 + SO_MINOR_VERSION = 0 + OBJS = pltcl.o ifneq ($(TCL_SHLIB_LD_LIBS),) ! SHLIB_LINK=$(TCL_LIB_SPEC) $(TCL_LIBS) else ! SHLIB_LINK=$(TCL_LIB_SPEC) endif ! include $(top_srcdir)/src/Makefile.shlib ifeq ($(TCL_SHARED_BUILD), 1) ! all: all-lib $(MAKE) -C modules $@ install: all installdirs ! $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX) $(MAKE) -C modules $@ installdirs: *************** *** 99,105 **** $(MAKE) -C modules $@ uninstall: ! rm -f $(DESTDIR)$(pkglibdir)/$(DLOBJS) $(MAKE) -C modules $@ else # TCL_SHARED_BUILD = 0 --- 53,59 ---- $(MAKE) -C modules $@ uninstall: ! rm -f $(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX) $(MAKE) -C modules $@ else # TCL_SHARED_BUILD = 0 *************** *** 114,119 **** Makefile.tcldefs: mkMakefile.tcldefs.sh $(SHELL) $< '$(TCL_CONFIG_SH)' '$@' ! clean distclean maintainer-clean: ! rm -f $(INFILES) pltcl.o Makefile.tcldefs $(MAKE) -C modules $@ --- 68,73 ---- Makefile.tcldefs: mkMakefile.tcldefs.sh $(SHELL) $< '$(TCL_CONFIG_SH)' '$@' ! clean distclean maintainer-clean: clean-lib ! rm -f $(OBJS) Makefile.tcldefs $(MAKE) -C modules $@ *** ./src/Makefile.shlib.orig Sun Nov 11 20:20:53 2001 --- ./src/Makefile.shlib Mon Dec 17 13:03:50 2001 *************** *** 400,406 **** clean-lib: rm -f lib$(NAME).a ifeq ($(enable_shared), yes) ! rm -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) lib$(NAME)$(DLSUFFIX) endif ifeq ($(PORTNAME), win) rm -rf $(NAME).def --- 400,409 ---- clean-lib: rm -f lib$(NAME).a ifeq ($(enable_shared), yes) ! rm -f lib$(NAME)$(DLSUFFIX) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) ! ifdef EXPSUFF ! rm -f lib$(NAME)$(EXPSUFF) ! endif endif ifeq ($(PORTNAME), win) rm -rf $(NAME).def