Check-in [f05f6abdf1]
Overview
Comment:Added kitdll top-level build script
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f05f6abdf1e83cd922e7281bc39b29c9eb249a31
User & Date: rkeene on 2010-09-30 05:54:35
Other Links: manifest | tags
Context
2010-09-30
06:24
Fixed KitDLL Build script to correctly create VFS directory before calling make

Added KitDLL cleaning to main kitcreator top-level build script

Updated to allow KitDLL to ship check-in: f547179798 user: rkeene tags: trunk

05:54
Added kitdll top-level build script check-in: f05f6abdf1 user: rkeene tags: trunk
05:43
Added missing file from previous commit check-in: 381f0a779a user: rkeene tags: trunk
Changes

Added kitdll/build.sh version [a2f7dfd11c].

            1  +#! /bin/bash
            2  +
            3  +if [ ! -f 'build.sh' ]; then
            4  +	echo 'ERROR: This script must be run from the directory it is in' >&2
            5  +
            6  +	exit 1
            7  +fi
            8  +if [ -z "${TCLVERS}" ]; then
            9  +	echo 'ERROR: The TCLVERS environment variable is not set' >&2
           10  +
           11  +	exit 1
           12  +fi
           13  +
           14  +KITDLLVERS="0.0"
           15  +BUILDDIR="$(pwd)/build/kitdll-${KITDLLVERS}"
           16  +OUTDIR="$(pwd)/out"
           17  +INSTDIR="$(pwd)/inst"
           18  +OTHERPKGSDIR="$(pwd)/../"
           19  +export KITDLLVERS BUILDDIR OUTDIR INSTDIR OTHERPKGSDIR
           20  +
           21  +rm -rf 'build' 'out' 'inst'
           22  +mkdir 'out' 'inst' || exit 1
           23  +
           24  +(
           25  +	cp -r 'buildsrc' 'build'
           26  +	cd "${BUILDDIR}" || exit 1
           27  +
           28  +	# Determine how we invoke a Tcl interpreter
           29  +	for testsh in "${TCLSH_NATIVE:-false}" "${TCLKIT:-tclkit}"; do
           30  +		if echo 'exit 0' | "${testsh}" >/dev/null 2>/dev/null; then
           31  +			TCLSH_NATIVE="${testsh}"
           32  +
           33  +			break
           34  +		fi
           35  +	done
           36  +
           37  +	# Cleanup, just incase the incoming directory was not pre-cleaned
           38  +	${MAKE:-make} distclean >/dev/null 2>/dev/null
           39  +
           40  +	echo "Running: ./configure --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
           41  +	./configure --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
           42  +
           43  +	echo "Running: ${MAKE:-make}"
           44  +	${MAKE:-make} TCLSH_NATIVE="${TCLSH_NATIVE}" || exit 1
           45  +
           46  +	# Strip the KitDLL of debugging symbols, if possible
           47  +	"${STRIP:-strip}" -g libtcl.* >/dev/null 2>/dev/null
           48  +
           49  +	# Create VFS directory
           50  +	mkdir "starpack.vfs"
           51  +	mkdir "starpack.vfs/lib"
           52  +
           53  +	## Copy in required built directories
           54  +	cp -r "${OTHERPKGSDIR}"/tcl/out/* 'starpack.vfs/'
           55  +	cp -r "${OTHERPKGSDIR}"/tclvfs/out/* 'starpack.vfs/'
           56  +	cp -r "${OTHERPKGSDIR}"/thread/out/* 'starpack.vfs/'
           57  +
           58  +	## Rename the "vfs" package directory to what "boot.tcl" expects
           59  +	mv 'starpack.vfs/lib'/vfs* 'starpack.vfs/lib/vfs'
           60  +
           61  +	## Install "boot.tcl"
           62  +	cp 'boot.tcl' 'starpack.vfs/'
           63  +
           64  +	exit 0
           65  +) || exit 1
           66  +
           67  +exit 0

Modified kitdll/buildsrc/kitdll-0.0/Makefile.in from [c77f4e17f1] to [a774052095].

     2      2   CFLAGS = @CFLAGS@ @SHOBJFLAGS@ -Wall
     3      3   CPPFLAGS = @CPPFLAGS@ @DEFS@ -DKITDLL_MAKE_LOADABLE=1
     4      4   LDFLAGS = @LDFLAGS@
     5      5   SHOBJLDFLAGS = @SHOBJLDFLAGS@
     6      6   LIBS = @LIBS@
     7      7   STATICLIBS = @TCL_LIB_SPEC@ ../../../tclvfs/inst/lib/vfs1.3/libvfs1.3.a
     8      8   OBJS = vfs_kitdll_data_tcl.o kitInit.o rechan.o pwb.o
            9  +TCLSH_NATIVE = tclsh
     9     10   
    10     11   # Default target
    11     12   all: libtcl.@SHOBJEXT@
    12     13   
    13     14   # Build targets
    14     15   ## VFS Build
    15     16   vfs_kitdll_data_tcl.o: vfs_kitdll_data_tcl.c
    16     17   vfs_kitdll_data_tcl.c: dir2c.tcl starpack.vfs vfs_kitdll_data.c
    17         -	./dir2c.tcl tcl starpack.vfs > vfs_kitdll_data_tcl.c
           18  +	"$(TCLSH_NATIVE)" dir2c.tcl tcl starpack.vfs > vfs_kitdll_data_tcl.c
    18     19   
    19     20   ## Tclkit Build
    20     21   kitInit.o: kitInit.c vfs_kitdll.tcl.h
    21     22   vfs_kitdll.tcl.h: vfs_kitdll.tcl
    22         -	./stringify.tcl vfs_kitdll.tcl > vfs_kitdll.tcl.h
           23  +	"$(TCLSH_NATIVE)" ./stringify.tcl vfs_kitdll.tcl > vfs_kitdll.tcl.h
    23     24   
    24     25   ## Extensions
    25     26   rechan.o: rechan.c
    26     27   pwb.o: pwb.c
    27     28   
    28     29   ## DLL Build
    29     30   libtcl.@SHOBJEXT@: $(OBJS)
    30     31   	$(CC) $(CPPFLAGS) $(CFLAGS) -o libtcl.so $(OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) -Wl,--whole-archive $(STATICLIBS) -Wl,--no-whole-archive $(LIBS)
    31     32   
    32     33   # Test driver
    33     34   tclsh.o: tclsh.c
    34         -tclsh: tclsh.o
           35  +tclsh: tclsh.o libtcl.@SHOBJEXT@
    35     36   	$(CC) $(CPPFLAGS) $(CFLAGS) -o tclsh tclsh.o -L. -ltcl -Wl,-R,`pwd`
    36     37   
    37     38   # Cleanup routeines
    38     39   clean:
    39     40   	rm -f libtcl.so
    40     41   	rm -f $(OBJS)
    41     42   	rm -f vfs_kitdll_data_tcl.c