Check-in [e854407d3f]
Overview
Comment:Updated to support patching Tcl using scripts

Created internal build script to create statically linked Diet Libc-based Tclkits

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e854407d3f3ef241e80e80255c819065e3c5cfc9
User & Date: rkeene on 2010-09-26 04:45:57
Other Links: manifest | tags
Context
2010-09-26
04:46
Updated to disable threads (crashes with Diet Libc) in internal build script check-in: bf92561b68 user: rkeene tags: trunk
04:45
Updated to support patching Tcl using scripts

Created internal build script to create statically linked Diet Libc-based Tclkits check-in: e854407d3f user: rkeene tags: trunk

04:45
Removed references to PATH_MAX check-in: 9fb1a353d1 user: rkeene tags: trunk
Changes

Added build/make-minkit-static version [f633f55a68].











































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh

# Set C compiler to diet libc
CC='diet gcc'
export CC

# Build minimalistic tclkit
KITCREATOR_PKGS=" "
KITCREATOR_MINENCODINGS='true' 
KITCREATOR_MINBUILD='true' 
export KITCREATOR_PKGS KITCREATOR_MINENCODINGS KITCREATOR_MINBUILD

rm -rf tcl/patchscripts
mkdir tcl/patchscripts || exit 1

cat << \__EOF__ > tcl/patchscripts/dietlibc.sh
sed 's@^# *include *<string.h>$@&@;T s;p;s@string.h@strings.h@;:s' generic/tclInt.h > generic/tclInt.h.new && cat generic/tclInt.h.new > generic/tclInt.h
rm -f generic/tclInt.h.new
__EOF__

./kitcreator "$@" --disable-load

Modified build/pre.sh from [52ef0ed788] to [af3b94cbc4].

14
15
16
17
18
19
20


21
22

	./configure || exit 1
	make boot.tcl.h
	make zipvfs.tcl.h

	make distclean
) || exit 1



find . -name '.*.sw?' -type f | xargs rm -f







>
>


14
15
16
17
18
19
20
21
22
23
24

	./configure || exit 1
	make boot.tcl.h
	make zipvfs.tcl.h

	make distclean
) || exit 1

rm -rf tcl/patchscripts/

find . -name '.*.sw?' -type f | xargs rm -f

Modified tcl/build.sh from [d139769440] to [1ef9a6bcc4].

12
13
14
15
16
17
18

19
20
21
22
23
24
25
26
fi

SRC="src/tcl${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
BUILDDIR="$(pwd)/build/tcl${TCLVERS}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"

export SRC SRCURL BUILDDIR OUTDIR INSTDIR

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

if [ ! -f "${SRC}" ]; then
	mkdir 'src' >/dev/null 2>/dev/null








>
|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
fi

SRC="src/tcl${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
BUILDDIR="$(pwd)/build/tcl${TCLVERS}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHSCRIPTDIR="$(pwd)/patchscripts"
export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR

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

if [ ! -f "${SRC}" ]; then
	mkdir 'src' >/dev/null 2>/dev/null

50
51
52
53
54
55
56









57
58
59
60
61
62
63
	if [ ! -d '../buildsrc' ]; then
		gzip -dc "../${SRC}" | tar -xf -
	else
		cp -rp ../buildsrc/* './'
	fi

	cd "${BUILDDIR}" || exit 1









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

			exit 1
		fi








>
>
>
>
>
>
>
>
>







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
	if [ ! -d '../buildsrc' ]; then
		gzip -dc "../${SRC}" | tar -xf -
	else
		cp -rp ../buildsrc/* './'
	fi

	cd "${BUILDDIR}" || exit 1

	# Apply patch scripts if needed
	for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do
		if [ -f "${patchscript}" ]; then
			echo "Running patch script: ${patchscript}"
			. "${patchscript}"
		fi
	done

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

			exit 1
		fi