Posted to tcl by venks at Sat Jul 14 20:30:46 GMT 2012view raw

  1. --- kitsh/build.sh
  2. +++ kitsh/build.sh
  3. @@ -186,16 +186,15 @@
  4. "${TCLKIT}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" || exit 1
  5. else
  6. ## Bootstrap (cannot cross-compile)
  7. ### Call installer
  8. cp kit runkit
  9. - echo "set argv [list {${KITTARGET_NAME}} starpack.vfs {${ENABLECOMPRESSION}}]" > setup.tcl
  10. + echo "set argv [list {${KITTARGET_NAME}} `pwd`/starpack.vfs {${ENABLECOMPRESSION}}]" > setup.tcl
  11. echo 'if {[catch { clock seconds }]} { proc clock args { return 0 } }' >> setup.tcl
  12. - echo 'source installvfs.tcl' >> setup.tcl
  13. -
  14. + echo 'source [file dirname [info script]]/installvfs.tcl' >> setup.tcl
  15. echo 'Running: echo | ./runkit'
  16. - echo | ./runkit setup.tcl || exit 1
  17. + echo | ./runkit `pwd`/setup.tcl || exit 1
  18. fi
  19.  
  20. # Cleanup
  21. if [ "${KITTARGET}" = "kitdll" ]; then
  22. ## Remove built interpreters if we are building KitDLL --
  23.  
  24. --- kitsh/buildsrc/kitsh-0.0/installvfs.tcl
  25. +++ kitsh/buildsrc/kitsh-0.0/installvfs.tcl
  26. @@ -13,11 +13,11 @@
  27. if {[lindex $argv 2] != ""} {
  28. set opt_compression [lindex $argv 2]
  29. }
  30.  
  31. # Determine what storage mechanism is being used
  32. -set fd [open Makefile.common r]
  33. +set fd [open [file dirname [info script]]/Makefile.common r]
  34. set data [read $fd]
  35. close $fd
  36.  
  37. if {[string match "*KIT_STORAGE_ZIP*" $data]} {
  38. set tclKitStorage zip
  39.  
  40.