Diff

Differences From Artifact [4831102fe2]:

To Artifact [1b7030d641]:


47
48
49
50
51
52
53
54




55
56

57
58


59
60
61
62
63

64
65
66
67
68
69
70
71
72
73
74
75
76
77

78
79
80
81
82
83
84
47
48
49
50
51
52
53
54
55
56
57
58
59

60
61

62
63
64
65
66
67

68
69
70
71
72
73
74
75
76
77
78
79
80
81

82
83
84
85
86
87
88
89








+
+
+
+

-
+

-
+
+




-
+













-
+








CONFIGUREEXTRA="$@"
export CONFIGUREEXTRA

if echo " ${CONFIGUREEXTRA} " | grep ' --enable-threads' >/dev/null 2>/dev/null; then
	KITCREATOR_PKGS="${KITCREATOR_PKGS} thread"
fi

# Set default target
KITTARGET="kitsh"
export KITTARGET

# Fix up package list
## If building KitDLL, it must come last
## 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') kitdll"
	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 echo " ${KITCREATOR_PKGS} " | grep ' kitdll ' >/dev/null 2>/dev/null; then
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
			echo '         Set STATICTK to -1 if you really want to link Tk dynamically.' >&2

			STATICTK="1"
			export STATICTK
		fi
	fi
fi

failedpkgs=""
buildfailed="0"
for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do
for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} "${KITTARGET}"; do
	echo -n "Building ${pkg} ..."

	failed="0"
	(
		cd "${pkg}" >/dev/null 2>/dev/null || exit 1

		./build.sh > build.log 2>&1 || exit 1
110
111
112
113
114
115
116
117

118
119
115
116
117
118
119
120
121

122
123
124







-
+


if [ "${buildfailed}" != "0" ]; then
	echo 'WARNING: Build is likely incomplete or failed.' >&2
fi

for kitdllfile in 'kitdll/build'/kitdll-*/libtclkit.*; do
	cp "${kitdllfile}" "$(echo "${kitdllfile}" | sed "s@^.*/@@;s@\..*\$@-${TCLVERS}&@")" >/dev/null 2>/dev/null
done
cp 'kitsh/build'/kitsh-*/kit "tclkit-${TCLVERS}"
cp 'kitsh/build'/kitsh-*/kit "tclkit-${TCLVERS}" >/dev/null 2>/dev/null

exit "${buildfailed}"