Diff

Differences From Artifact [21af131d5c]:

To Artifact [a0fc7f495f]:


17
18
19
20
21
22
23
24
25
26
27




28
29
30
31
32
33
34
17
18
19
20
21
22
23




24
25
26
27
28
29
30
31
32
33
34







-
-
-
-
+
+
+
+







OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHSCRIPTDIR="$(pwd)/patchscripts"
PATCHDIR="$(pwd)/patches"
export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR

# Set configure options for this sub-project
LDFLAGS="${KC_TCL_LDFLAGS}"
CFLAGS="${KC_TCL_CFLAGS}"
CPPFLAGS="${KC_TCL_CPPFLAGS}"
LIBS="${KC_TCL_LIBS}"
LDFLAGS="${LDFLAGS} ${KC_TCL_LDFLAGS}"
CFLAGS="${CFLAGS} ${KC_TCL_CFLAGS}"
CPPFLAGS="${CPPFLAGS} ${KC_TCL_CPPFLAGS}"
LIBS="${LIBS} ${KC_TCL_LIBS}"
export LDFLAGS CFLAGS CPPFLAGS LIBS

rm -rf 'build' 'out' 'inst'
mkdir 'build' 'out' 'inst' || exit 1

if [ ! -f "${SRC}" ]; then
	mkdir 'src' >/dev/null 2>/dev/null
197
198
199
200
201
202
203










204
205
206
207







208
209
210
211
212
213
214
215
216
217
218
219
220
221

222
223
224
225
226
227
228
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213




214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242







+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+














+







			(
				. "${patchscript}"
			)
		fi
	done

	tryfirstdir=''
	case "${KC_CROSSCOMPILE_HOST_OS}" in
		*-*-darwin*)
			# Cross-compiling for Mac OS X -- try to build macosx directory first
			tryfirstdir='macosx'
			;;
		*-*-*)
			# Cross-compiling, do not assume based on build platform
			;;
		'')
			# Not cross-compiling, assume based on build platform
	if [ "$(uname -s)" = "Darwin" ]; then
		tryfirstdir='macosx'
	fi

			if [ "$(uname -s)" = "Darwin" ]; then
				# Compiling for Mac OS X, build in that directory first
				tryfirstdir='macosx'
			fi
			;;
	esac
		
	for dir in "${tryfirstdir}" unix win macosx __fail__; do
		if [ -z "${dir}" ]; then
			continue
		fi

		if [ "${dir}" = "__fail__" ]; then
			# If we haven't figured out how to build it, reject.

			exit 1
		fi

		# Remove previous directory's "tclConfig.sh" if found
		rm -f 'tclConfig.sh'

		echo "Working in: $dir"
		cd "${BUILDDIR}/${dir}" || exit 1

		# Remove broken pre-generated Makfiles
		rm -f GNUmakefile Makefile makefile

		echo "Running: ./configure --disable-shared --with-encoding=utf-8 --prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" ${CONFIGUREEXTRA}"
		./configure --disable-shared --with-encoding=utf-8 --prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" ${CONFIGUREEXTRA}