summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-06-26 02:38:25 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-06-26 02:38:25 (GMT)
commitf15ecdc26533b8e571018eb086bb44c0cff4df73 (patch)
tree49ebe8bd87b63580af690f60125023a34b2e8f14
parente0a03f97795a574958b1be946798f3a34cb25d1d (diff)
downloadtk-f15ecdc26533b8e571018eb086bb44c0cff4df73.zip
tk-f15ecdc26533b8e571018eb086bb44c0cff4df73.tar.gz
tk-f15ecdc26533b8e571018eb086bb44c0cff4df73.tar.bz2
* Expanded install-binaries target to create and install a
pkgIndex.tcl file to enable Tk as a loadable package [Patch 521356]
-rw-r--r--ChangeLog6
-rw-r--r--unix/Makefile.in23
-rw-r--r--win/Makefile.in20
3 files changed, 44 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index b638a72..6e1de5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-06-25 Don Porter <dgp@users.sf.net>
+
+ * unix/Makefile.in: Expanded install-binaries target to create
+ * win/Makefile.in: and install a pkgIndex.tcl file to enable
+ Tk as a loadable package [Patch 521356]
+
2002-06-25 Anton Kovalenko <a_kovalenko@users.sourceforge.net>
* library/mkpsenc.tcl: (added) utilities to generate
diff --git a/unix/Makefile.in b/unix/Makefile.in
index a756044..0564485 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.72 2002/06/25 16:45:12 rmax Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.73 2002/06/26 02:38:26 dgp Exp $
# Current Tk version; used in various names.
@@ -89,6 +89,15 @@ TCL_LIB_FLAG = @TCL_LIB_FLAG@
# Libraries built with optimization switches have this additional extension
TK_DBGX = @TK_DBGX@
+# Flag, 1: we're building a shared lib, 0 we're not
+TK_SHARED_BUILD = @TK_SHARED_BUILD@
+
+# Directory in which to install the pkgIndex.tcl file for loadable Tk
+PKG_INSTALL_DIR = $(LIB_INSTALL_DIR)/tk$(VERSION)$(TK_DBGX)
+
+# Package index file for loadable Tk
+PKG_INDEX = $(PKG_INSTALL_DIR)/pkgIndex.tcl
+
# warning flags
CFLAGS_WARNING = @CFLAGS_WARNING@
@@ -482,7 +491,7 @@ install: all install-binaries install-libraries install-demos install-doc
# possible (e.g. if installing as root).
install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish
- @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
+ @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) $(PKG_INSTALL_DIR); \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
@@ -496,6 +505,16 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish
fi
@echo "Installing $(TK_LIB_FILE) to $(LIB_INSTALL_DIR)/"
@$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
+ @if test "$(TK_SHARED_BUILD)"; then \
+ echo "Creating package index $(PKG_INDEX)"; \
+ rm -f $(PKG_INDEX); \
+ echo "if {[package vcompare \\" > $(PKG_INDEX); \
+ echo " [package provide Tcl] \\" >> $(PKG_INDEX); \
+ echo " $(TCLVERSION)] != 0} {return}" >> $(PKG_INDEX); \
+ echo "package ifneeded Tk $(VERSION) \\" >> $(PKG_INDEX); \
+ echo " [list load [file join \$$dir .. \\" >> $(PKG_INDEX); \
+ echo " $(TK_LIB_FILE)] Tk]" >> $(PKG_INDEX); \
+ fi
@(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE))
@chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
@echo "Installing wish as $(BIN_INSTALL_DIR)/wish$(VERSION)"
diff --git a/win/Makefile.in b/win/Makefile.in
index 5e1fdfc..836cb52 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -4,7 +4,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.52 2002/06/21 23:09:54 hobbs Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.53 2002/06/26 02:38:26 dgp Exp $
TCLVERSION = @TCL_VERSION@
VERSION = @TK_VERSION@
@@ -73,6 +73,12 @@ MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann
# Libraries built with optimization switches have this additional extension
TK_DBGX = @TK_DBGX@
+# Directory in which to install the pkgIndex.tcl file for loadable Tk
+PKG_INSTALL_DIR = $(LIB_INSTALL_DIR)/tk$(VERSION)$(TK_DBGX)
+
+# Package index file for loadable Tk
+PKG_INDEX = $(PKG_INSTALL_DIR)/pkgIndex.tcl
+
# The directory containing the Tcl source and header files.
TCL_SRC_DIR = @TCL_SRC_DIR@
@@ -414,12 +420,12 @@ gdb: binaries
@echo "set env TK_LIBRARY=$(ROOT_DIR_NATIVE)/library" >> gdb.run
PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \
gdb ./$(WISH) --command=gdb.run
- rm gdb.run
+ @$(RM) gdb.run
install: all install-binaries install-libraries install-doc install-demos
install-binaries: binaries
- @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
+ @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) $(PKG_INSTALL_DIR); \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
@@ -435,6 +441,14 @@ install-binaries: binaries
$(COPY) $$i "$(BIN_INSTALL_DIR)"; \
fi; \
done
+ @echo "Creating package index $(PKG_INDEX)";
+ @$(RM) $(PKG_INDEX);
+ @echo "if {[package vcompare \\" > $(PKG_INDEX); \
+ @echo " [package provide Tcl] \\" >> $(PKG_INDEX); \
+ @echo " $(TCLVERSION)] != 0} {return}" >> $(PKG_INDEX); \
+ @echo "package ifneeded Tk $(VERSION) \\" >> $(PKG_INDEX); \
+ @echo " [list load [file join \$$dir .. \\" >> $(PKG_INDEX); \
+ @echo " $(TK_DLL_FILE)] Tk]" >> $(PKG_INDEX); \
@for i in tkConfig.sh $(TK_LIB_FILE) $(TK_STUB_LIB_FILE); \
do \
if [ -f $$i ]; then \