Differences From Artifact [15de613872]:
- Executable file kitcreator — part of check-in [76ec61a413] at 2010-10-06 07:06:11 on branch trunk — Updated to support building Mk4tcl dynamically when building KitDLL, but falling back to building statically. (user: rkeene, size: 3094) [annotate] [blame] [check-ins using]
To Artifact [9916a29d8c]:
- Executable file
kitcreator
— part of check-in
[0527703474]
at
2011-05-28 06:38:41
on branch trunk
— Updated to support finding TCLSH_NATIVE by the root kitcreator script and using that in most places where a native Tcl interpreter is needed
Updated to find date of Fossil checkin when a fossil tag or ID is specified and use that date for checkouts of other projects (user: rkeene, size: 3946) [annotate] [blame] [check-ins using] [more...]
1 2 3 | #! /bin/bash TCLVERS="8.4.19" | | | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#! /bin/bash
TCLVERS="8.4.19"
if echo "$1" | grep '^[0-9][0-9]*\.' >/dev/null || echo "$1" | egrep '^(cvs|fossil)_' >/dev/null; then
TCLVERS="$1"
shift
fi
export TCLVERS
# Determine appropriate mode
mode="build"
if [ "$1" = "clean" ]; then
shift
mode="clean"
fi
if [ "$1" = "distclean" ]; then
shift
mode="distclean"
fi
# Define the list of all packages, for cleaning purposes
KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread"
for pkg in ${KITCREATOR_ALLPKGS}; do
rm -f "${pkg}/build.log"
rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"
rm -rf "${pkg}/src"/tmp-*
if [ "${mode}" = "distclean" ]; then
rm -rf "${pkg}/src"
fi
done
# We're all done if we're in clean or distclean mode
|
| ︙ | ︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# Fix up package list
## If building KitDLL, define it as our target
if echo " ${KITCREATOR_PKGS} " | grep ' kitdll ' >/dev/null 2>/dev/null; then
KITCREATOR_PKGS="$(echo " ${KITCREATOR_PKGS} " | sed 's@ kitdll @ @g;s@^ *@@;s@ *$@@;s@ *@ @g')"
KITTARGET="kitdll"
fi
## If building KitDLL and Tk, must do Tk statically
### (Well, we don't HAVE to, but it would defeat much of the purpose)
if [ "${KITTARGET}" = "kitdll" ]; then
if echo " ${KITCREATOR_PKGS} " | grep ' tk ' >/dev/null 2>/dev/null; then
if [ "${STATICTK}" != "1" -a "${STATICTK}" != "-1" ]; then
echo 'Warning: Linking Tk statically because you are building KitDLL' 2>&1
| > > > > > | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# Fix up package list
## If building KitDLL, define it as our target
if echo " ${KITCREATOR_PKGS} " | grep ' kitdll ' >/dev/null 2>/dev/null; then
KITCREATOR_PKGS="$(echo " ${KITCREATOR_PKGS} " | sed 's@ kitdll @ @g;s@^ *@@;s@ *$@@;s@ *@ @g')"
KITTARGET="kitdll"
fi
# If the user manually requested "--enable-kitdll", make it so
if echo "x $@ " | grep ' [-][-]enable-kitdll ' >/dev/null 2>/dev/null; then
KITTARGET="kitdll"
fi
## If building KitDLL and Tk, must do Tk statically
### (Well, we don't HAVE to, but it would defeat much of the purpose)
if [ "${KITTARGET}" = "kitdll" ]; then
if echo " ${KITCREATOR_PKGS} " | grep ' tk ' >/dev/null 2>/dev/null; then
if [ "${STATICTK}" != "1" -a "${STATICTK}" != "-1" ]; then
echo 'Warning: Linking Tk statically because you are building KitDLL' 2>&1
|
| ︙ | ︙ | |||
81 82 83 84 85 86 87 88 89 | STATICMK4="0" export STATICMK4 fi fi fi failedpkgs="" buildfailed="0" | > > > > > > > > > > > > > > > > > > > > > > > > > > > | | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
STATICMK4="0"
export STATICMK4
fi
fi
fi
# Find Windows resource-related files
if [ -f "kit.ico" ]; then
KITCREATOR_ICON="$(pwd)/kit.ico"
else
KITCREATOR_ICON="$(echo "$(pwd)/kitsh/buildsrc"/kitsh-*/kit.ico)"
fi
if [ -f "kit.rc" ]; then
KITCREATOR_RC="$(pwd)/kit.rc"
else
KITCREATOR_RC="$(echo "$(pwd)/kitsh/buildsrc"/kitsh-*/kit.rc)"
fi
export KITCREATOR_ICON KITCREATOR_RC
# Determine how we invoke a Tcl interpreter
if [ -z "${TCLSH_NATIVE}" ]; then
TCLSH_NATIVE="false"
fi
for testsh in "${TCLSH_NATIVE}" tclsh tclsh8.4 tclsh8.5 tclsh8.6 "${TCLKIT:-tclkit}"; do
if echo 'exit 0' | "${testsh}" >/dev/null 2>/dev/null; then
TCLSH_NATIVE="${testsh}"
break
fi
done
export TCLSH_NATIVE
# Do build
failedpkgs=""
buildfailed="0"
for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do
echo -n "Building ${pkg} ..."
failed="0"
(
cd "${pkg}" >/dev/null 2>/dev/null || exit 1
./build.sh > build.log 2>&1 || exit 1
|
| ︙ | ︙ | |||
120 121 122 123 124 125 126 |
echo "Failed to build:${failedpkgs}"
fi
if [ "${buildfailed}" != "0" ]; then
echo 'WARNING: Build is likely incomplete or failed.' >&2
fi
| | | 154 155 156 157 158 159 160 161 162 163 164 |
echo "Failed to build:${failedpkgs}"
fi
if [ "${buildfailed}" != "0" ]; then
echo 'WARNING: Build is likely incomplete or failed.' >&2
fi
cp 'kitsh/build'/kitsh-*/libtclkit* . >/dev/null 2>/dev/null
cp 'kitsh/build'/kitsh-*/kit "tclkit-${TCLVERS}" >/dev/null 2>/dev/null
exit "${buildfailed}"
|