Diff

Differences From Artifact [fb76c24536]:

To Artifact [bed9e43849]:


18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
18
19
20
21
22
23
24

25
26
27
28
29
30
31
32







-
+







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 kitdll"
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
60
61
62
63
64
65
66





67
68
69
70
71
72
73
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
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
103
104
105
106
107
108
109

110
111
112
113
114
115
116
117







-
+







else
	KITCREATOR_RC="$(echo "$(pwd)/kitsh/buildsrc"/kitsh-*/kit.rc)"
fi
export KITCREATOR_ICON KITCREATOR_RC

failedpkgs=""
buildfailed="0"
for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} "${KITTARGET}"; do
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
135
136
137
138
139
140
141
142

143
144
145
140
141
142
143
144
145
146

147
148
149
150







-
+



	echo "Failed to build:${failedpkgs}"
fi

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

cp 'kitdll/build'/kitdll-*/libtclkit* . >/dev/null 2>/dev/null
cp 'kitsh/build'/kitsh-*/libtclkit* . >/dev/null 2>/dev/null
cp 'kitsh/build'/kitsh-*/kit "tclkit-${TCLVERS}" >/dev/null 2>/dev/null

exit "${buildfailed}"