Diff

Differences From Artifact [644f3a91bd]:

To Artifact [0084e3a935]:


    21     21   OUTDIR="$(pwd)/out"
    22     22   INSTDIR="$(pwd)/inst"
    23     23   OTHERPKGSDIR="$(pwd)/../"
    24     24   export KITSHVERS BUILDDIR OUTDIR INSTDIR OTHERPKGSDIR
    25     25   
    26     26   # Set configure options for this sub-project
    27     27   LDFLAGS_ADD="${KC_KITSH_LDFLAGS_ADD}"
    28         -LDFLAGS="${KC_KITSH_LDFLAGS}"
    29         -CFLAGS="${KC_KITSH_CFLAGS}"
    30         -CPPFLAGS="${KC_KITSH_CPPFLAGS}"
    31         -LIBS="${KC_KITSH_LIBS}"
           28  +LDFLAGS="${LDFLAGS} ${KC_KITSH_LDFLAGS}"
           29  +CFLAGS="${CFLAGS} ${KC_KITSH_CFLAGS}"
           30  +CPPFLAGS="${CPPFLAGS} ${KC_KITSH_CPPFLAGS}"
           31  +LIBS="${LIBS} ${KC_KITSH_LIBS}"
    32     32   export LDFLAGS_ADD LDFLAGS CFLAGS CPPFLAGS LIBS
    33     33   
    34     34   if [ -z "${ENABLECOMPRESSION}" ]; then
    35     35   	ENABLECOMPRESSION="1"
    36     36   fi
    37     37   export ENABLECOMPRESSION
    38     38   
................................................................................
   198    198   	## Determine if we have a Tclkit to do this work
   199    199   	TCLKIT="${TCLKIT:-tclkit}"
   200    200   	if echo 'exit 0' | "${TCLKIT}" >/dev/null 2>/dev/null; then
   201    201   		## Install using existing Tclkit
   202    202   		### Call installer
   203    203   		echo "Running: \"${TCLKIT}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\""
   204    204   		"${TCLKIT}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" || exit 1
   205         -	else
          205  +	elif echo 'exit 0' | ./kit >/dev/null 2>/dev/null; then
   206    206   		## Bootstrap (cannot cross-compile)
   207    207   		### Call installer
   208    208   		cp kit runkit
   209    209   		echo "set argv [list {${KITTARGET_NAME}} starpack.vfs {${ENABLECOMPRESSION}}]" > setup.tcl
   210    210   		echo 'if {[catch { clock seconds }]} { proc clock args { return 0 } }' >> setup.tcl
   211    211   		echo 'source installvfs.tcl' >> setup.tcl
   212    212   
   213    213   		TCL_LIBRARY="$(pwd)/starpack.vfs/lib/tcl${TCLVERS2}"
   214    214   		export TCL_LIBRARY
   215    215   
   216    216   		echo 'Running: echo | ./runkit setup.tcl'
   217    217   		echo | ./runkit setup.tcl || exit 1
          218  +	else
          219  +		## Install using Tclsh, which may work if we're not using Metakit
          220  +		### Call installer
          221  +		echo "Running: \"${TCLSH_NATIVE}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\""
          222  +		"${TCLSH_NATIVE}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" || exit 1
          223  +		
   218    224   	fi
   219    225   
   220    226   	# Cleanup
   221    227   	if [ "${KITTARGET}" = "kitdll" ]; then
   222    228   		## Remove built interpreters if we are building KitDLL --
   223    229   		## they're just tiny stubs anyway
   224    230   		rm -f kit runkit
   225    231   	fi
   226    232   
   227    233   	exit 0
   228    234   ) || exit 1
   229    235   
   230    236   exit 0