#!/bin/sh

# make static lib and interp 
./configure
make clean
make


# rename interp so doesn't get crunched
mv tclsh tclshs

# cleanup
rm *.o lib*.so

# make shared lib and interp 
./configure --enable-shared
make

# make install dir
if [ ! -d ../dist ]; then
    mkdir ../dist
fi

if [ ! -d ../dist/usr ] ; then
    mkdir ../dist/usr
fi

if [ ! -d ../dist/usr/local ]; then
    mkdir ../dist/usr/local
fi

# install shared stuff 
make install

# install static stuff 
echo ./install-sh -c   tclshs ../dist/usr/local/bin/tclsh7.5s
./install-sh -c        tclshs ../dist/usr/local/bin/tclsh7.5s
echo ./install-sh -c -m 644 libtcl7.5.a ../dist/usr/local/lib
./install-sh -c -m 644 libtcl7.5.a ../dist/usr/local/lib


