diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2000-09-25 22:23:01 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2000-09-25 22:23:01 +0000 |
| commit | f428d053ce075bafe1785d0ba7792f4eb92d93d5 (patch) | |
| tree | 5a7e6981c0929343338ca0fa3de0f4e3e4702af1 /src/bin | |
| parent | e353e73768e54c7e5cfd5a1d6e97e1f6315207bb (diff) | |
| download | postgresql-f428d053ce075bafe1785d0ba7792f4eb92d93d5.tar.gz | |
Revise Tcl/Tk configuration. Make missing Tcl after --with-tcl an error,
add --without-tk option to disable Tk. We don't need the AC_PATH_XTRA
test because tkConfig.sh already contains all the information about how to
compile and link with X. Also make sure that libpq is up to date for
libpgtcl. Remove executable bits from pgaccess.sh, but add it to pgaccess.
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/Makefile | 7 | ||||
| -rw-r--r-- | src/bin/pgaccess/Makefile | 9 | ||||
| -rwxr-xr-x | src/bin/pgaccess/pgaccess.sh | 6 | ||||
| -rw-r--r-- | src/bin/pgtclsh/Makefile | 23 |
4 files changed, 22 insertions, 23 deletions
diff --git a/src/bin/Makefile b/src/bin/Makefile index 0519a29491..e635f5f4ce 100644 --- a/src/bin/Makefile +++ b/src/bin/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.31 2000/08/31 16:11:03 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.32 2000/09/25 22:22:54 petere Exp $ # #------------------------------------------------------------------------- @@ -19,9 +19,8 @@ ifdef MULTIBYTE DIRS += pg_encoding endif -# TCL/TK programs -ifeq ($(USE_TCL), true) -ifeq ($(USE_TK), true) +ifeq ($(with_tcl), yes) +ifeq ($(with_tk), yes) DIRS += pgaccess endif DIRS += pgtclsh diff --git a/src/bin/pgaccess/Makefile b/src/bin/pgaccess/Makefile index 359f98f4e5..8360973208 100644 --- a/src/bin/pgaccess/Makefile +++ b/src/bin/pgaccess/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.12 2000/09/17 13:02:41 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.13 2000/09/25 22:22:56 petere Exp $ # #------------------------------------------------------------------------- @@ -16,8 +16,11 @@ pgaccessdir = $(datadir)/pgaccess all: pgaccess -pgaccess: pgaccess.sh - sed -e 's,__wish__,$(WISH),' -e 's,__PGACCESSHOME__,$(pgaccessdir),' < $< > $@ +pgaccess: pgaccess.sh $(top_builddir)/src/Makefile.global + sed -e 's,@WISH@,$(WISH),g' \ + -e 's,@PGACCESSHOME@,$(pgaccessdir),g' \ + $< >$@ + chmod a+x $@ install: all installdirs $(INSTALL_SCRIPT) pgaccess $(DESTDIR)$(bindir)/pgaccess diff --git a/src/bin/pgaccess/pgaccess.sh b/src/bin/pgaccess/pgaccess.sh index c41cf53cce..196873b804 100755 --- a/src/bin/pgaccess/pgaccess.sh +++ b/src/bin/pgaccess/pgaccess.sh @@ -1,9 +1,9 @@ #! /bin/sh -PATH_TO_WISH=__wish__ -PGACCESS_HOME=__PGACCESSHOME__ +PATH_TO_WISH='@WISH@' +PGACCESS_HOME='@PGACCESSHOME@' export PATH_TO_WISH export PGACCESS_HOME -exec ${PATH_TO_WISH} ${PGACCESS_HOME}/main.tcl "$@" +exec "${PATH_TO_WISH}" "${PGACCESS_HOME}/main.tcl" "$@" diff --git a/src/bin/pgtclsh/Makefile b/src/bin/pgtclsh/Makefile index e2ae981f9e..053b50a6f0 100644 --- a/src/bin/pgtclsh/Makefile +++ b/src/bin/pgtclsh/Makefile @@ -5,7 +5,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.32 2000/09/17 13:02:42 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.33 2000/09/25 22:22:58 petere Exp $ # #------------------------------------------------------------------------- @@ -17,7 +17,7 @@ include $(top_builddir)/src/Makefile.global # Include definitions from the tclConfig.sh file # -include Makefile.tcldefs -ifeq ($(USE_TK), true) +ifeq ($(with_tk), yes) -include Makefile.tkdefs endif @@ -25,27 +25,24 @@ libpgtcl_srcdir = $(top_srcdir)/src/interfaces/libpgtcl libpgtcl_builddir = $(top_builddir)/src/interfaces/libpgtcl libpgtcl = -L$(libpgtcl_builddir) -lpgtcl -CFLAGS+= $(X_CFLAGS) -I$(libpgtcl_srcdir) +CPPFLAGS += -I$(libpgtcl_srcdir) $(TK_XINCLUDES) -# If we are here then TCL is available +# If we are here then Tcl is available PROGRAMS = pgtclsh -# Add TK targets if TK is available -ifeq ($(USE_TK), true) +# Add Tk targets if Tk is available +ifeq ($(with_tk), yes) PROGRAMS += pgtksh endif all: submake $(PROGRAMS) pgtclsh: pgtclAppInit.o - $(CC) $(CFLAGS) $(TCL_DEFS) -o $@ $< \ - $(libpgtcl) $(libpq) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ $< $(libpgtcl) $(libpq) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS) pgtksh: pgtkAppInit.o - $(CC) $(CFLAGS) $(TK_DEFS) -o $@ $< \ - $(libpgtcl) $(libpq) $(X_LIBS) $(TK_LIB_SPEC) $(TK_LIBS) \ - $(TCL_LIB_SPEC) $(X11_LIBS) $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ $< $(libpgtcl) $(libpq) $(TK_LIB_SPEC) $(TK_LIBS) $(TCL_LIB_SPEC) $(LDFLAGS) .PHONY: submake submake: @@ -53,7 +50,7 @@ submake: install: all installdirs $(INSTALL_PROGRAM) pgtclsh $(DESTDIR)$(bindir)/pgtclsh -ifeq ($(USE_TK), true) +ifeq ($(with_tk), yes) $(INSTALL_PROGRAM) pgtksh $(DESTDIR)$(bindir)/pgtksh endif @@ -70,7 +67,7 @@ Makefile.tkdefs: mkMakefile.tkdefs.sh $(SHELL) $< '$(TK_CONFIG_SH)' '$@' clean distclean maintainer-clean: - rm -f *.o Makefile.tcldefs Makefile.tkdefs pgtclsh pgtksh + rm -f pgtclAppInit.o pgtkAppInit.o Makefile.tcldefs Makefile.tkdefs pgtclsh pgtksh dep depend: $(CC) -MM $(CFLAGS) *.c > depend |
