@ -4,7 +4,7 @@
# Makefile for the pltcl shared object
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.7 1998/10/13 16:30:49 momjian Exp $
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.8 1998/10/17 23:33:23 tgl Exp $
#
#-------------------------------------------------------------------------
@ -14,12 +14,30 @@
SRCDIR = ../../../src
i n c l u d e $( SRCDIR ) / M a k e f i l e . g l o b a l
#
# Include definitions from the tclConfig.sh file
# NOTE: GNU make will make this file automatically if it doesn't exist,
# using the make rule that appears below. Cute, eh?
#
i n c l u d e M a k e f i l e . t c l d e f s
#
# Find out whether Tcl was built as a shared library --- if not,
# we can't link a shared library that depends on it, and have to
# forget about building pltcl.
# In Tcl 8, tclConfig.sh sets TCL_SHARED_BUILD for us, but in
# older Tcl releases it doesn't. In that case we guess based on
# the name of the Tcl library.
#
i f n d e f T C L _ S H A R E D _ B U I L D
i f n e q ( , $( findstring $ ( DLSUFFIX ) ,$ ( TCL_LIB_FILE ) ) )
TCL_SHARED_BUILD = 1
e l s e
TCL_SHARED_BUILD = 0
e n d i f
e n d i f
# Change following to how shared library that contain
# correct references to libtcl must get built on your system.
# Since these definitions come from the tclConfig.sh script,
@ -62,22 +80,43 @@ ifdef EXPSUFF
INFILES += $( DLOBJS:.o= $( EXPSUFF) )
e n d i f
i f e q ( $( TCL_SHARED_BUILD ) , 1 )
#
# Build the shared lib
#
all : $( INFILES )
Makefile.tcldefs :
install : all
$( INSTALL) $( INSTL_LIB_OPTS) $( DLOBJS) $( LIBDIR) /$( DLOBJS)
e l s e
#
# Oops, can't build it
#
all :
@echo "Cannot build pltcl because Tcl is not a shared library; skipping it."
install :
@echo "Cannot build pltcl because Tcl is not a shared library; skipping it."
e n d i f
#
# Make targets that are still valid when we can't build pltcl
# should be below here.
#
Makefile.tcldefs : mkMakefile .tcldefs .sh
/bin/sh mkMakefile.tcldefs.sh
#
# Clean
#
clean :
rm -f $( INFILES)
rm -f $( INFILES) *.o
rm -f Makefile.tcldefs
install : all
$( INSTALL) $( INSTL_LIB_OPTS) $( DLOBJS) $( LIBDIR) /$( DLOBJS)
dep depend :