Changes On Branch 6f5ce08b75eb9bc8

Changes In Branch tcl-sdk-support Through [6f5ce08b75] Excluding Merge-Ins

This is equivalent to a diff from d2a98c553c to 6f5ce08b75

2011-11-15
03:09
Merged tcl-sdk-support branch into trunk check-in: 9d8d38d716 user: rkeene tags: trunk
2011-11-14
07:10
Updated to include sub-directories from header files (for Win32 support)

Fixed issue with regexp used to replace refernces to -ltcl/-ltk for KitDLL SDK

Fixed issue with selecting library file on Win32

Updated to pull libraries from KitSH for KitDLL SDK to avoid picking wrong file if one is already in the current directory check-in: fe142d1843 user: rkeene tags: tcl-sdk-support

05:01
Added documentation on KitDLL SDK check-in: 6f5ce08b75 user: rkeene tags: tcl-sdk-support
04:29
Updated to ignore created SDKs when looking for created kits during test builds check-in: cb0c37e35e user: rkeene tags: tcl-sdk-support
02:32
Create new branch named "tcl-sdk-support" check-in: d5e4b44ef6 user: rkeene tags: tcl-sdk-support
2011-11-05
18:49
KitCreator 0.6.1

Updated to download Tk by tag first, if possible, then by date if not check-in: d2a98c553c user: rkeene tags: trunk, 0.6.1

2011-10-05
18:42
Updated to build Solaris/SPARC tests targetting Solaris 8 check-in: acb9725083 user: rkeene tags: trunk

Modified README from [5d77e30af0] to [cb012f0bd1].

137
138
139
140
141
142
143






























144
145
146
147
148
149
150
			itcl thread

Kitsh Configure Options:
	1. --enable-kit-storage={zip|mk4|auto}
		Specify which type of storage to use with the Tclkit.  The
		default is to auto-detect.  Auto-detection uses Mk4 if
		available and built statically, otherwise it falls back to Zip.































-------------------
Method of Operation
-------------------
Summary:
	1. "kitcreator" calls */build.sh
	2. */build.sh downloads and compiles appropriate software







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
173
174
175
176
177
178
179
180
			itcl thread

Kitsh Configure Options:
	1. --enable-kit-storage={zip|mk4|auto}
		Specify which type of storage to use with the Tclkit.  The
		default is to auto-detect.  Auto-detection uses Mk4 if
		available and built statically, otherwise it falls back to Zip.

--------------------
Using the KitDLL SDK
--------------------
When you build a KitDLL, a "kitdll-sdk-<tclvers>.tar.gz" tarball is also
produced.  This tarball contains the Tcl (and Tk, if compiled) stubs libraries,
and Tcl (and Tk, if compiled) header files needed to compile and link things
against Tcl (and Tk).  It also includes "tclConfig.sh" (and "tkConfig.sh", if
Tk was compiled).

The purpose for this tarball is to be used to build Tcl extensions or
applications that rely on Tcl/Tk using the KitDLL.

To use it, one first must extract the tarball.  After that the environment
variable "TCLKIT_SDK_DIR" must be set to the directory that was created in
order to make most of the variables contain useful values.

For example, to build an extension using the KitDLL SDK one would typically do
something like:
	1. Compile KitDLL (may be omitted if the KitDLL SDK is already
	   available)
		a. $ KITCREATOR_PKGS='tk itcl kitdll'
		b. $ export KITCREATOR_PKGS
		c. $ ./kitcreator
	2. Compile the Extension
		a. $ tar -xf /path/to/libtclkit-sdk-8.4.19.tar.gz
		b. $ TCLKIT_SDK_DIR="$(pwd)/libtclkit-sdk-8.4.19"
		c. $ export TCLKIT_SDK_DIR
		d. $ ./configure --with-tcl="${TCLKIT_SDK_DIR}/lib"
		e. $ make

-------------------
Method of Operation
-------------------
Summary:
	1. "kitcreator" calls */build.sh
	2. */build.sh downloads and compiles appropriate software

Modified build/test/test from [8772772acc] to [97d02f3024].

199
200
201
202
203
204
205

206
207
208
209

210
211
212
213
214
215
216
		fi

		# Create Tclkit
		if [ "${kitdll}" = "1" ]; then
			createdkit="libtclkit*.dll libtclkit*.*"
			outputname="${TESTDIR}/kits/libtclkit-${version}-${kit}"
			failoutputname="${TESTDIR}/kits/failed/libtclkit-${version}-${kit}"

		else
			createdkit="tclkit-${version}"
			outputname="${TESTDIR}/kits/tclkit-${version}-${kit}"
			failoutputname="${TESTDIR}/kits/failed/tclkit-${version}-${kit}"

		fi
		buildlog="${outputname}-build.log"
		failbuildlog="${failoutputname}-build.log"
		testresultslog="${outputname}-tests.log"

		if [ ! -f "${outputname}" ]; then
			unset KITCREATOR_PKGS STATICTK STRIP







>




>







199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
		fi

		# Create Tclkit
		if [ "${kitdll}" = "1" ]; then
			createdkit="libtclkit*.dll libtclkit*.*"
			outputname="${TESTDIR}/kits/libtclkit-${version}-${kit}"
			failoutputname="${TESTDIR}/kits/failed/libtclkit-${version}-${kit}"
			sdk="$(echo libtclkit-sdk-*.tar.gz)"
		else
			createdkit="tclkit-${version}"
			outputname="${TESTDIR}/kits/tclkit-${version}-${kit}"
			failoutputname="${TESTDIR}/kits/failed/tclkit-${version}-${kit}"
			sdk=''
		fi
		buildlog="${outputname}-build.log"
		failbuildlog="${failoutputname}-build.log"
		testresultslog="${outputname}-tests.log"

		if [ ! -f "${outputname}" ]; then
			unset KITCREATOR_PKGS STATICTK STRIP
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
					cd kitsh/build/kitsh-*/ || exit 1
					make tclsh
					cp tclsh ../../../
				) >> "${buildlog}" 2>&1
			fi

			# Perform wildcard expansion
			createdkit="$(ls -f1 ${createdkit} 2>/dev/null | head -n 1)"

			if [ ! -f "${createdkit}" ]; then
				echo "Failed to create kit ${version}/${kit}" >&2

				failed="${failed} ${version}/${kit}-build"

				touch "${failoutputname}"







|







323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
					cd kitsh/build/kitsh-*/ || exit 1
					make tclsh
					cp tclsh ../../../
				) >> "${buildlog}" 2>&1
			fi

			# Perform wildcard expansion
			createdkit="$(ls -f1 ${createdkit} 2>/dev/null | grep -v '\.tar\.gz$' | head -n 1)"

			if [ ! -f "${createdkit}" ]; then
				echo "Failed to create kit ${version}/${kit}" >&2

				failed="${failed} ${version}/${kit}-build"

				touch "${failoutputname}"

Added common/post/sdk.sh version [2a53429c2b].























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
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
90
91
#! /bin/bash

if [ -z "${TCLVERS}" ]; then
	echo 'This script is not meant to be run directly.' >&2

	exit 1
fi

if [ "${KITTARGET}" != "kitdll" ]; then
	exit 0
fi

rm -rf '__tmp__'
mkdir '__tmp__'
mkdir '__tmp__/include'
mkdir '__tmp__/lib'

cp 'tcl/inst/lib/tclConfig.sh' '__tmp__/lib/'
cp 'tcl/inst/include'/* '__tmp__/include/'
cp 'tcl/inst/lib'/libtclstub* '__tmp__/lib/'

if [ -f 'tk/inst/lib/tkConfig.sh' ]; then
	cp 'tk/inst/lib/tkConfig.sh' '__tmp__/lib/'
	cp 'tk/inst/include'/* '__tmp__/include/'
	cp 'tk/inst/lib'/libtkstub* '__tmp__/lib/'
fi

cp libtclkit* '__tmp__/lib/'

(
	cd '__tmp__/lib' || exit 1

	for libfile in *.dll.a; do
		if [ ! -f "${libfile}" ]; then
			continue
		fi

		newlibfile="$(basename "${libfile}" .dll.a).lib"

		mv "${libfile}" "${newlibfile}"
	done

	for kitlibfile in libtclkit*; do
		if echo "${kitlibfile}" | grep '\.tar\.gz' >/dev/null; then
			continue
		fi

		break
	done
	kitlinker="$(echo "${kitlibfile}" | sed 's@^lib@-l@;s@\.[^\.]*$@@')"

	sed 's|'"$(dirname "$(dirname "$(pwd)")")"'/tcl/inst|${TCLKIT_SDK_DIR}|g;s|^TCL_SHARED_BUILD=.*$|TCL_SHARED_BUILD=1|;s|^TCL_LIB_FILE=.*$|TCL_LIB_FILE='"${kitlibfile}"'|;s|-ltcl[^s][a-fA-F0-9\.]*|'"${kitlinker}"'|' 'tclConfig.sh' > 'tclConfig.sh.new'
	(
		cat << _EOF_
if [ -z "\${TCLKIT_SDK_DIR}" ]; then
	TCLKIT_SDK_DIR="./libtclkit-sdk-${TCLVERS}"
fi

_EOF_
		cat 'tclConfig.sh.new'
	) > 'tclConfig.sh'
	rm -f 'tclConfig.sh.new'

	if [ -f 'tkConfig.sh' ]; then
		sed 's|'"$(dirname "$(dirname "$(pwd)")")"'/tk/inst|${TCLKIT_SDK_DIR}|g;s|^TK_SHARED_BUILD=.*$|TK_SHARED_BUILD=1|;s|^TK_LIB_FILE=.*$|TK_LIB_FILE='"${kitlibfile}"'|;s|-ltk[^s][a-fA-F0-9\.]*|'"${kitlinker}"'|' 'tkConfig.sh' > 'tkConfig.sh.new'
		(
			cat << _EOF_
if [ -z "\${TCLKIT_SDK_DIR}" ]; then
	TCLKIT_SDK_DIR="./libtclkit-sdk-${TCLVERS}"
fi

_EOF_
			cat 'tkConfig.sh.new'
		) > 'tkConfig.sh'
		rm -f 'tkConfig.sh.new'
	fi
)

(
	cd '__tmp__' || exit 1

	mkdir "libtclkit-sdk-${TCLVERS}"

	mv 'lib' 'include' "libtclkit-sdk-${TCLVERS}/"

	tar -cf - "libtclkit-sdk-${TCLVERS}" | gzip -9c > "../libtclkit-sdk-${TCLVERS}.tar.gz"
)

rm -rf '__tmp__'

exit 0

Modified kitcreator from [ed95cc9314] to [e5a4f5c30e].

165
166
167
168
169
170
171








172
173

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

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









exit "${buildfailed}"







>
>
>
>
>
>
>
>


165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181

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

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

for postscript in common/post/*; do
	if [ ! -f "${postscript}" ]; then
		continue
	fi

	"${postscript}"
done

exit "${buildfailed}"