Check-in [f84245cd51]
Overview
Comment:Fix hard-coded use of './kit' in the kitsh build script and improve how the kit target name is defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f84245cd51d96745f86003f5c3a47eed4db67081
User & Date: mistachkin on 2015-10-07 02:38:10
Other Links: manifest | tags
Context
2015-10-07
22:44
Simplify and fix handling of 'kit.exe' instead of 'kit' on Windows. check-in: 31baf7fa49 user: mistachkin tags: trunk
02:38
Fix hard-coded use of './kit' in the kitsh build script and improve how the kit target name is defined. check-in: f84245cd51 user: mistachkin tags: trunk
2015-09-14
19:04
Updated to include timeout for tests check-in: 404a1c438f user: rkeene tags: trunk
2015-05-18
22:54
Improvements in how the kit target name is defined. Closed-Leaf check-in: 227a06a601 user: mistachkin tags: kitTargetNameFix
Changes

Modified kitsh/build.sh from [60eb9576ab] to [d9a8c3dd79].

   168    168   				continue
   169    169   			fi
   170    170   
   171    171   			if echo "${chkkittarget}" | egrep '\.(lib|def|a)$'; then
   172    172   				continue
   173    173   			fi
   174    174   
   175         -			KITTARGET_NAME="${chkkittarget}"
          175  +			KITTARGET_NAME="./${chkkittarget}"
   176    176   
   177    177   			break
   178    178   		done
   179    179   
   180    180   		## Also create an executable named "kit" so that we can run it later
   181    181   		${MAKE:-make} tclsh
   182    182   		if [ -f "tclsh.exe" ]; then
................................................................................
   183    183   			mv tclsh.exe kit.exe
   184    184   		else
   185    185   			mv tclsh kit
   186    186   		fi
   187    187   	else
   188    188   		## The executable is always named "kit"
   189    189   		if [ -f 'kit.exe' -a ! -f 'kit' ]; then
   190         -			KITTARGET_NAME='kit.exe'
          190  +			KITTARGET_NAME='./kit.exe'
   191    191   		else
   192         -			KITTARGET_NAME='kit'
          192  +			KITTARGET_NAME='./kit'
   193    193   		fi
   194    194   	fi
   195    195   	export KITTARGET_NAME
   196    196   
   197    197   	if [ "${KITTARGET_NAME}" = '__error__' ]; then
   198    198   		echo "Failed to locate kit target!" >&2
   199    199   
................................................................................
   205    205   	TCLKIT="${TCLKIT:-tclkit}"
   206    206   	if echo 'exit 0' | "${TCLKIT}" >/dev/null 2>/dev/null; then
   207    207   		## Install using existing Tclkit
   208    208   		### Call installer
   209    209   		echo "Running: \"${TCLKIT}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\" \"${KITTARGET_NAME}.new\""
   210    210   		"${TCLKIT}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" "${KITTARGET_NAME}.new" || exit 1
   211    211   	else
   212         -		if echo 'exit 0' | ./kit >/dev/null 2>/dev/null; then
          212  +		if echo 'exit 0' | "${KITTARGET_NAME}" >/dev/null 2>/dev/null; then
   213    213   			## Bootstrap (cannot cross-compile)
   214    214   			### Call installer
   215    215   			echo "set argv [list {${KITTARGET_NAME}} starpack.vfs {${ENABLECOMPRESSION}} {${KITTARGET_NAME}.new}]" > setup.tcl
   216    216   			echo 'if {[catch { clock seconds }]} { proc clock args { return 0 } }' >> setup.tcl
   217    217   			echo 'source installvfs.tcl' >> setup.tcl
   218    218   
   219         -			echo 'Running: echo | ./kit setup.tcl'
   220         -			echo | ./kit setup.tcl || exit 1
          219  +			echo 'Running: echo | \"${KITTARGET_NAME}\" setup.tcl'
          220  +			echo | "${KITTARGET_NAME}" setup.tcl || exit 1
   221    221   		else
   222    222   			## Install using Tclsh, which may work if we're not using Metakit
   223    223   			### Call installer
   224    224   			echo "Running: \"${TCLSH_NATIVE}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\" \"${KITTARGET_NAME}.new\""
   225    225   			"${TCLSH_NATIVE}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" "${KITTARGET_NAME}.new" || exit 1
   226    226   		fi
   227    227   	fi
................................................................................
   229    229   	cat "${KITTARGET_NAME}.new" > "${KITTARGET_NAME}" || exit 1
   230    230   	rm -f "${KITTARGET_NAME}.new"
   231    231   
   232    232   	# Cleanup
   233    233   	if [ "${KITTARGET}" = "kitdll" ]; then
   234    234   		## Remove built interpreters if we are building KitDLL --
   235    235   		## they're just tiny stubs anyway
   236         -		rm -f kit
          236  +		rm -f "${KITTARGET_NAME}"
   237    237   	fi
   238    238   
   239    239   	exit 0
   240    240   ) || exit 1
   241    241   
   242    242   exit 0