aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gs/tcl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
committerErlang/OTP <[email protected]>2009-11-20 14:54:40 +0000
commit84adefa331c4159d432d22840663c38f155cd4c1 (patch)
treebff9a9c66adda4df2106dfd0e5c053ab182a12bd /lib/gs/tcl
downloadotp-84adefa331c4159d432d22840663c38f155cd4c1.tar.gz
otp-84adefa331c4159d432d22840663c38f155cd4c1.tar.bz2
otp-84adefa331c4159d432d22840663c38f155cd4c1.zip
The R13B03 release.OTP_R13B03
Diffstat (limited to 'lib/gs/tcl')
-rw-r--r--lib/gs/tcl/Makefile23
-rw-r--r--lib/gs/tcl/Makefile.in83
-rw-r--r--lib/gs/tcl/README156
3 files changed, 262 insertions, 0 deletions
diff --git a/lib/gs/tcl/Makefile b/lib/gs/tcl/Makefile
new file mode 100644
index 0000000000..53d7e97f7b
--- /dev/null
+++ b/lib/gs/tcl/Makefile
@@ -0,0 +1,23 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2002-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+#
+# Invoke with GNU make or clearmake -C gnu.
+#
+
+include $(ERL_TOP)/make/run_make.mk
diff --git a/lib/gs/tcl/Makefile.in b/lib/gs/tcl/Makefile.in
new file mode 100644
index 0000000000..dce34a4baa
--- /dev/null
+++ b/lib/gs/tcl/Makefile.in
@@ -0,0 +1,83 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2002-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../vsn.mk
+VSN=$(GS_VSN)
+
+# ----------------------------------------------------
+# The following variables differ on different systems, we set
+# reasonable defaults, if something different is needed it should
+# be set for that system only.
+# ----------------------------------------------------
+
+ifeq ($(TARGET),win32)
+TCL_TAR = binaries/win32.tar.gz
+else
+TCL_TAR = @TCL_TAR@
+endif
+
+CONFIGURE_FILES = ../configure ../configure.in
+
+ROOTDIR = ..
+BINDIR = $(ROOTDIR)/priv/bin
+LIBDIR = ./lib
+
+RELSYSDIR = $(RELEASE_PATH)/lib/gs-$(VSN)
+
+# ----------------------------------------------------
+# Common Macros
+# ----------------------------------------------------
+TCL_FILES = ../priv/gstk.tcl
+EXTRA_FILES = ../priv/gs-xdefaults
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+ifeq ($(TCL_TAR),)
+debug opt:
+else
+debug opt:
+ gzip -dc $(TCL_TAR) | (cd ../priv && tar -xf -)
+endif
+
+clean:
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec:
+ $(INSTALL_DIR) $(RELSYSDIR)/priv
+ $(INSTALL_DATA) $(TCL_FILES) $(EXTRA_FILES) $(RELSYSDIR)/priv
+ifneq ($(TCL_TAR),)
+ gzip -dc $(TCL_TAR) | (cd $(RELSYSDIR)/priv && tar -xf -)
+endif
+
+release_docs_spec:
diff --git a/lib/gs/tcl/README b/lib/gs/tcl/README
new file mode 100644
index 0000000000..5fc1836349
--- /dev/null
+++ b/lib/gs/tcl/README
@@ -0,0 +1,156 @@
+==============================================================================
+ How to create prebuilt Tcl/Tk binaries
+==============================================================================
+
+Please look further down in this text for Windows instructions...
+
+Unixish OS
+----------
+
+For commercial releases we use a prebuilt binary release of Tcl/Tk 8.X
+where X >= 2. This release is placed into "gs-VSN/priv/tcl" and the
+'gstk_port_handler' module searches this directory first to find the
+"wish" executable program.
+
+It is possible to pack the files from a standard installation on a
+machine into a TAR file but it is preferable to build Tcl/Tk from
+sources. The steps are
+
+ 0. Set some environment variables
+
+ % setenv BUILDDIR /tmp/build
+ % setenv GNUTAR gtar
+
+ 1. Download unpack the sources from http://sourceforge.net/projects/tcl.
+ Use the latest stable release. When this README was written
+ the latest stable version was 8.3.4.
+
+ % mkdir -p $BUILDDIR/tcl
+ % cd $BUILDDIR
+ % $GNUTAR -xzf /my/src/path/tcl8.3.4.tar.gz
+ % $GNUTAR -xzf /my/src/path/tk8.3.4.tar.gz
+
+ % cd tcl8.3.4/unix
+ % ./configure --enable-gcc --enable-threads --disable-load \
+ --disable-shared --prefix=$BUILDDIR/tcl
+ % make
+ % make install
+
+ % cd ../../tk8.3.4/unix
+ % ./configure --enable-gcc --enable-threads --disable-load \
+ --disable-shared --prefix=$BUILDDIR/tcl \
+ --with-tcl=$BUILDDIR/tcl/lib
+ % make
+ % make install
+
+ 2. Check that the executable wish program don't depend on libtcl
+ or libtk. If it does we have to redo this or keep them
+ where they are, else we can remove the libraries
+
+ % cd $BUILDDIR
+ % ldd tcl/bin/wish8.3
+
+ and if the executables doesn't depend on libtcl or libtk we remove them
+
+ % rm -f tcl/lib/libt*
+
+ 3. Remove other things we don't need. There may be other things in
+ later releases but only remove the obvious things
+
+ % rm -fr tcl/include tcl/man
+ % rm -f tcl/bin/tclsh*
+ % rm -f tcl/lib/*.sh
+ % rm -fr tcl/lib/tcl*/http*
+ % rm -fr tcl/lib/tcl*/tcltest*
+ % rm -fr tcl/lib/tk*/demos
+ % rm -fr tcl/lib/tk*/images
+ % rm -f tcl/lib/*/*.c
+
+ 4. Some releases of Tcl/Tk contains soft links that make the directory
+ structure circular making it impossible to use 'cp' to copy the
+ tcl directory. You can find them with
+
+ % find tcl -type l
+
+ 5. Find out the name of the resulting TAR archive. Run the GS configure
+ script on the target platform to view the name
+
+ % cd $ERL_TOP/lib/gs
+ % rm -f config.cache
+ % autoconf
+ % ./configure
+
+ 6. Use the TAR program on the system to pack the resulting Tcl/Tk
+ distribution. Keep the top "tcl" library
+
+ % tar -cf - tcl | gzip > xxxxxxxx.tar.gz
+
+ 7. Copy and check in this TAR archive into the directory
+
+ /clearcase/otp/erts/lib/gs/tcl/binaries
+
+ 8. We are done........
+
+
+Windows
+-------
+
+These instructions are aimed at the 8.5.7 release of both tcl and tk,
+but should work for 8.4 as well as 8.6 releases with appropriate
+modifications.
+
+0. Download the source tar files for both tcl and tk and unpack the
+tar files from the same root.
+
+1. Start with tcl. Open a command prompt with the appropriate Visual
+C++ command environment (there is usually a shortcut under VC++ tools
+or something in the start menu. With this command prompt, cd to the
+tcl<version>/win directory and issue the following commands:
+
+dos_prompt> nmake -f makefile.vc OPTS=static INSTALLDIR=<some temp dir>\tcl
+...
+dos_prompt> nmake -f makefile.vc OPTS=static INSTALLDIR=<some temp dir>\tcl install
+
+2. Move further to tk. Using the same command prompt, cd
+..\..\tk<version>\win and build there:
+
+dos_prompt> nmake -f makefile.vc OPTS=static TCLDIR=<top dir of sources>\tcl<version> INSTALLDIR=<some temp dir>\tcl
+...
+dos_prompt> nmake -f makefile.vc OPTS=static TCLDIR=<top dir of sources>\tcl<version> INSTALLDIR=<some temp dir>\tcl install
+
+3. Now you will need to strip the installation you put in <some temp
+dir>\tcl. To do this, you will want a more appropriate command
+shell. Start cygwin bash and cd to the cygwin equivalent of <some temp
+dir>, i.e. where tcl/tk was installed. Now clean away what's not
+needed (this is not optional, gs won't work with a full version...)
+
+ % rm -fr tcl/include tcl/man
+ % rm -f tcl/bin/tclsh*
+ % rm -f tcl/lib/*.sh
+ % rm -fr tcl/lib/tcl*/http*
+ % rm -fr tcl/lib/tcl*/tcltest*
+ % rm -fr tcl/lib/tcl*/tzdata
+ % rm -fr tcl/lib/tcl*/msgs
+ % rm -fr tcl/lib/tk*/demos
+ % rm -fr tcl/lib/tk*/images
+ % rm -fr tcl/lib/tk*/tzdata
+ % rm -f tcl/lib/*/*.c
+ % rm -f tcl/lib/*.lib
+ % rm -fr tcl/lib/tcl8
+
+(The last line is especially important, gs will crash otherwise...)
+
+4. Now copy license.terms from the sources, otherwise you may break the redistribution policy.
+
+ % cp <top of sources/tcl<version>/license.terms tcl/
+
+5. Pack the tar file:
+
+ % tar zcf win32.tar.gz tcl
+
+6. Put it in $ERL_TOP/lib/gs/tcl/binaries (as described for Unixes)
+
+7. You are done!
+
+
+