summaryrefslogtreecommitdiffstats
path: root/win
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 /win
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]
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in20
1 files changed, 17 insertions, 3 deletions
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 \