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
38
39
40
41
|
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
38
39
40
41
42
43
44
45
|
+
+
+
-
+
-
+
+
|
#! /usr/bin/env bash
# Clean variables which will interfere with the build
unset MAKEFLAGS DESTDIR
# Determine appropriate mode
mode="build"
case "$1" in
clean|distclean|build|retry)
mode="$1"
shift
;;
esac
# Determine which Tcl version to build
TCLVERS="8.6.1"
TCLVERS="8.6.2"
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 the two part Tcl version
TCLVERS2=$(echo ${TCLVERS} | cut -d. -f1,2)
export TCLVERS2
# Verify that "pre.sh" has been run if this is a development snapshot of
# KitCreator
if [ -f 'build/pre.sh' ]; then
if ! find 'kitsh/buildsrc/' -name configure -type f 2>/dev/null | grep configure >/dev/null; then
echo "Please remember to run 'build/pre.sh' if you expect this build to work." >&2
fi
fi
# Define the list of all packages, for cleaning purposes
KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus"
KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus tls tclx tcc4tcl"
# Always rebuild kitsh
rm -f "kitsh/.success"
for pkg in ${KITCREATOR_ALLPKGS}; do
if [ "${mode}" != "retry" -o ! -f "${pkg}/.success" ]; then
rm -f "${pkg}/build.log" "${pkg}/.success"
rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
CONFIGUREEXTRA="$@"
export CONFIGUREEXTRA
if echo " ${CONFIGUREEXTRA} " | grep ' --enable-threads' >/dev/null 2>/dev/null; then
KITCREATOR_PKGS="${KITCREATOR_PKGS} thread"
fi
# Determine cross-compile status
host_os="$(echo " ${CONFIGUREEXTRA} " | sed 's@^.* --host=\([^ ]*\) .*$@\1@
t x
d
:x')"
build_os="$(echo " ${CONFIGUREEXTRA} " | sed 's@^.* --build=\([^ ]*\) .*$@\1@
t x
d
:x')"
if [ "${host_os}" != "${build_os}" -a -n "${host_os}" ]; then
KC_CROSSCOMPILE='1'
KC_CROSSCOMPILE_HOST_OS="${host_os}"
else
KC_CROSSCOMPILE='0'
KC_CROSSCOMPILE_HOST_OS=''
fi
export KC_CROSSCOMPILE KC_CROSSCOMPILE_HOST_OS
# Set default target
KITTARGET="kitsh"
export KITTARGET
# Fix up package list
## If building KitDLL, define it as our target
if echo " ${KITCREATOR_PKGS} " | grep ' kitdll ' >/dev/null 2>/dev/null; then
|