Diff

Differences From Artifact [35b0320bb7]:

To Artifact [f33d7d8aef]:


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











TCLVERS="8.5.14"
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

# 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"


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


>
>
>
>
>
>
>
>
>
>








<
<
<
<
<
<
<
<
<
<
<
<
<










>
>

>
|
|

|
>







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
46
#! /usr/bin/env bash

# Determine appropriate mode
mode="build"
case "$1" in
	clean|distclean|build|retry)
		mode="$1"
		shift
		;;
esac

# Determine which Tcl version to build
TCLVERS="8.5.14"
if echo "$1" | grep '^[0-9][0-9]*\.' >/dev/null || echo "$1" | egrep '^(cvs|fossil)_' >/dev/null; then
	TCLVERS="$1"

	shift
fi
export TCLVERS














# 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"
# 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"

		rm -rf "${pkg}/src"/tmp-*
	fi

	if [ "${mode}" = "distclean" ]; then
		rm -rf "${pkg}/src"
	fi
done

# We're all done if we're in clean or distclean mode
126
127
128
129
130
131
132




133
134
135
136
137
138
139
140

141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158


159
160
161
162
163
164
165
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 3>&1 4>&2 > build.log 2>&1 || exit 1
	) || failed="1"


	if [ "${failed}" = "1" ]; then
		echo " failed."
		failedpkgs="${failedpkgs} ${pkg}"
	else
		echo " done."
	fi

	case "${pkg}" in
		tcl)
			TCLCONFIGDIR=$(find "$(pwd)/tcl/build" -name tclConfig.sh | head -1 | sed 's@/[^/]*$@@')
			TCLCONFIGDIRTAIL="$(basename "${TCLCONFIGDIR}")"
			export TCLCONFIGDIR TCLCONFIGDIRTAIL
			;;
	esac

	if [ "${failed}" = "1" ]; then
		buildfailed="1"


	fi
done

if [ -n "${failedpkgs}" ]; then
	echo "Failed to build:${failedpkgs}"
fi








>
>
>
>
|

<
|
|

|
|
>


















>
>







127
128
129
130
131
132
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
done
export TCLSH_NATIVE

# Do build
failedpkgs=""
buildfailed="0"
for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do
	failed="0"
	if [ -f "${pkg}/.success" ]; then
		echo -n "Skipping ${pkg} ..."
	else
		echo -n "Building ${pkg} ..."


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

			./build.sh 3>&1 4>&2 > build.log 2>&1 || exit 1
		) || failed="1"
	fi

	if [ "${failed}" = "1" ]; then
		echo " failed."
		failedpkgs="${failedpkgs} ${pkg}"
	else
		echo " done."
	fi

	case "${pkg}" in
		tcl)
			TCLCONFIGDIR=$(find "$(pwd)/tcl/build" -name tclConfig.sh | head -1 | sed 's@/[^/]*$@@')
			TCLCONFIGDIRTAIL="$(basename "${TCLCONFIGDIR}")"
			export TCLCONFIGDIR TCLCONFIGDIRTAIL
			;;
	esac

	if [ "${failed}" = "1" ]; then
		buildfailed="1"
	else
		touch "${pkg}/.success"
	fi
done

if [ -n "${failedpkgs}" ]; then
	echo "Failed to build:${failedpkgs}"
fi