summaryrefslogtreecommitdiff
path: root/src/bin/pgtclsh
diff options
context:
space:
mode:
authorBruce Momjian1998-10-15 15:58:16 +0000
committerBruce Momjian1998-10-15 15:58:16 +0000
commit01cdd04731f180ee0dc685386f2a4490fdcfd80d (patch)
tree173ae175e4fdac27ad72183e6b3b1fd69c74800c /src/bin/pgtclsh
parent3c4e2bc9be076805dfc2561628aa575f1c8db0cf (diff)
TCL/TK fixes from Billy G. Allie.
Diffstat (limited to 'src/bin/pgtclsh')
-rw-r--r--src/bin/pgtclsh/Makefile32
-rw-r--r--src/bin/pgtclsh/mkMakefile.tcltkdefs.sh.in26
2 files changed, 26 insertions, 32 deletions
diff --git a/src/bin/pgtclsh/Makefile b/src/bin/pgtclsh/Makefile
index c9a2427857e..c9731376481 100644
--- a/src/bin/pgtclsh/Makefile
+++ b/src/bin/pgtclsh/Makefile
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.21 1998/10/13 16:30:48 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.22 1998/10/15 15:58:15 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -17,7 +17,10 @@ include ../../Makefile.global
#
# Include definitions from the tclConfig.sh file
#
-include Makefile.tcltkdefs
+include Makefile.tcldefs
+ifeq ($(USE_TK), true)
+ include Makefile.tkdefs
+endif
CFLAGS+= $(X_CFLAGS) -I$(SRCDIR)/interfaces/libpgtcl
@@ -30,10 +33,23 @@ endif
LIBPGTCL= -L$(SRCDIR)/interfaces/libpgtcl -lpgtcl
LIBPQ= -L$(LIBPQDIR) -lpq
-all: pgtclsh pgtksh
+# If we are here then TCL is available
+PGMS = pgtclsh
+INSTPGMS = install_tcl
+
+# Add TK targets if TK is available
+ifeq ($(USE_TK), true)
+ PGMS += pgtksh
+ INSTPGMS += install_tk
+endif
+
+all: $(PGMS)
-Makefile.tcltkdefs:
- /bin/sh mkMakefile.tcltkdefs.sh
+Makefile.tcldefs:
+ /bin/sh mkMakefile.tcldefs.sh
+
+Makefile.tkdefs:
+ /bin/sh mkMakefile.tkdefs.sh
pgtclsh: pgtclAppInit.o
$(CC) $(CFLAGS) $(TCL_DEFS) -o $@ pgtclAppInit.o \
@@ -44,8 +60,12 @@ pgtksh: pgtkAppInit.o
$(LIBPGTCL) $(LIBPQ) $(X_LIBS) $(TK_LIB_SPEC) $(TK_LIBS) \
$(TCL_LIB_SPEC) $(X11_LIBS) $(LDFLAGS)
-install: pgtclsh pgtksh
+install: $(INSTPGMS)
+
+install_tcl: pgtclsh
$(INSTALL) $(INSTL_EXE_OPTS) pgtclsh $(BINDIR)/pgtclsh
+
+install_tk: pgtksh
$(INSTALL) $(INSTL_EXE_OPTS) pgtksh $(BINDIR)/pgtksh
clean:
diff --git a/src/bin/pgtclsh/mkMakefile.tcltkdefs.sh.in b/src/bin/pgtclsh/mkMakefile.tcltkdefs.sh.in
deleted file mode 100644
index a7d7a6fc25f..00000000000
--- a/src/bin/pgtclsh/mkMakefile.tcltkdefs.sh.in
+++ /dev/null
@@ -1,26 +0,0 @@
-
-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
-
-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
-
-. @TCL_CONFIG_SH@
-. @TK_CONFIG_SH@
-
-cat @TCL_CONFIG_SH@ @TK_CONFIG_SH@ |
- egrep '^TCL_|^TK_' |
- while read inp
- do
- eval eval echo $inp
- done >Makefile.tcltkdefs
-
-exit 0