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  +#! /bin/sh
            2  +
            3  +# Set C compiler to diet libc
            4  +CC='diet gcc'
            5  +export CC
            6  +
            7  +# Build minimalistic tclkit
            8  +KITCREATOR_PKGS=" "
            9  +KITCREATOR_MINENCODINGS='true' 
           10  +KITCREATOR_MINBUILD='true' 
           11  +export KITCREATOR_PKGS KITCREATOR_MINENCODINGS KITCREATOR_MINBUILD
           12  +
           13  +rm -rf tcl/patchscripts
           14  +mkdir tcl/patchscripts || exit 1
           15  +
           16  +cat << \__EOF__ > tcl/patchscripts/dietlibc.sh
           17  +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
           18  +rm -f generic/tclInt.h.new
           19  +__EOF__
           20  +
           21  +./kitcreator "$@" --disable-load

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

    14     14   
    15     15   	./configure || exit 1
    16     16   	make boot.tcl.h
    17     17   	make zipvfs.tcl.h
    18     18   
    19     19   	make distclean
    20     20   ) || exit 1
           21  +
           22  +rm -rf tcl/patchscripts/
    21     23   
    22     24   find . -name '.*.sw?' -type f | xargs rm -f

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

    12     12   fi
    13     13   
    14     14   SRC="src/tcl${TCLVERS}.tar.gz"
    15     15   SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
    16     16   BUILDDIR="$(pwd)/build/tcl${TCLVERS}"
    17     17   OUTDIR="$(pwd)/out"
    18     18   INSTDIR="$(pwd)/inst"
    19         -export SRC SRCURL BUILDDIR OUTDIR INSTDIR
           19  +PATCHSCRIPTDIR="$(pwd)/patchscripts"
           20  +export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR
    20     21   
    21     22   rm -rf 'build' 'out' 'inst'
    22     23   mkdir 'build' 'out' 'inst' || exit 1
    23     24   
    24     25   if [ ! -f "${SRC}" ]; then
    25     26   	mkdir 'src' >/dev/null 2>/dev/null
    26     27   
................................................................................
    50     51   	if [ ! -d '../buildsrc' ]; then
    51     52   		gzip -dc "../${SRC}" | tar -xf -
    52     53   	else
    53     54   		cp -rp ../buildsrc/* './'
    54     55   	fi
    55     56   
    56     57   	cd "${BUILDDIR}" || exit 1
           58  +
           59  +	# Apply patch scripts if needed
           60  +	for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do
           61  +		if [ -f "${patchscript}" ]; then
           62  +			echo "Running patch script: ${patchscript}"
           63  +			. "${patchscript}"
           64  +		fi
           65  +	done
           66  +
    57     67   	for dir in unix win macosx __fail__; do
    58     68   		if [ "${dir}" = "__fail__" ]; then
    59     69   			# If we haven't figured out how to build it, reject.
    60     70   
    61     71   			exit 1
    62     72   		fi
    63     73