
Make-a-wish	(aka: Tcl-my-fancy)

Tom Poindexter
tpoind@advtech.uswest.com

Version 1.0, December, 1993
Make-a-wish is public domain.  You can do anything with it, to it, or for it.


Make-a-wish is available at:
harbor.ecn.purdue.edu as /pub/tcl/code/make-a-wish-1.0.tar.Z


WHAT IS MAKE-A-WISH

Make-a-wish is a simple sh script and makefile that tries to aid
in creating Tcl/Tk interpreters with various extensions.

Interpreters made by Make-a-wish are statically linked.  If you
want to make interpreters that use dynamically loadable libraries,
you should look into other packages that do that. 


USING MAKE-A-WISH

Make-a-wish assumes that Tcl/Tk, and possibly Extended Tcl (TclX)
has already been configured, built, and installed.

Make-a-wish does not build each individual extension.  You will have
to build each extension following the instructions in each package.
Make-a-wish assumes that extensions build a libxxx.a file that
contains the extension's code.  Also, if a particular extension needs
tcl library code installed, you'll have to do that also.

Another important assumption is that all Tcl, Tk, TclX, and extensions
are located in sibling directories to Make-a-wish.  For example:

         src/tcl/
		 tcl7.3/
		 tk3.6/
		 tclX7.3a/
		 make-a-wish/
		 oratcl-2.0/
		 sybtcl-2.0/
		 itcl-1.3/
		 blt-1.0/
		 tcl-dp-2.0/


Run the sh script "maw-configure".  Make-a-wish asks whether you want
to build standard or Extended Tcl, and whether you want to build a 
tclsh/tcl (no Tk), wish/wishx (with Tk), or both.  You will also be asked to
supply names for the resulting interpreters.

Make-a-wish will then find every libxxx.a file in its parent directory and
siblings.  You will then be asked to identify the Tcl/Tk directories,
and possibly the Extended Tcl directories and libs libtclx.a and libtkx.a

For all other libraries found, Make-a-wish will ask if the library 
contains a Tcl/Tk extension you want to add.  When you select
a library, Make-a-wish tries to find the name of the extension's Init
function.  If an Init function can't be found, or is wrong, enter the
name of the Init function.  Most current extensions use "xxx_Init", where
"xxx" is the name of the extension package. 

Make-a-wish will ask for any additional libraries that might be needed
by any extension.  Again, check each extension you are adding for details.

Finally, Make-a-wish will build a sed script to be used by the makefiles,
and two other make include files.  You should review the files before
trying make.

If all looks reasonable, try "make".  The Makefile will copy the
appropriate tcl*AppInit.c file, apply the sed script to add the
calls to Init functions, compiles, and then links the tcl*AppInit.o with
all the Tcl, Tk, (TclX), and extensions.  

All extension libraries are searched after standard Tcl, Tk, and TclX
libraries.  If a particular extension wants to use it's "main", you'll have
to alter the Makefile.

If all goes well, you get the interpreters for which you asked.  The Make-a-wish
Makefile doesn't have an "install" target (well it does, but it doesn't
do anything useful.)  You will have to copy or install into whatever 
directory you want, say /usr/local/bin.


CAVEATS

Make-a-wish is not "rocket science" and is relatively stupid.  If you try 
to add Tk extensions to a non-Tk interpreter, the make will likely fail.

Other things can go wrong; Murphy's Law applies.  At worst you're no
worse off than without Make-a-wish.



"Now Tom, if Make-a-wish is for Tcl, why did you write maw-configure 
in /bin/sh?"

Tom sez: "Well, it started as something very simple and didn't assume
that tclsh or tcl was installed correctly.  One can generally count 
on /bin/sh.  Make-a-wish began as the Makefiles for my Sybtcl and Oratcl
extensions and borrow on how I did things there.
And of course, conversion to a good shell language like Tcl is left
as an exercise for the user :-)"


