diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-01-24 10:50:27 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:39 +1000 |
commit | a0017cc44c22a83df8f92600317ad8ccd635e2a1 (patch) | |
tree | 02b11291babc8a1b793d26041e65017def19d06a /make-c-ext.tcl | |
parent | d495fb19428bfc640aa4d0e9245bc8f23c31f380 (diff) | |
download | jimtcl-a0017cc44c22a83df8f92600317ad8ccd635e2a1.zip jimtcl-a0017cc44c22a83df8f92600317ad8ccd635e2a1.tar.gz jimtcl-a0017cc44c22a83df8f92600317ad8ccd635e2a1.tar.bz2 |
Build improvements
Fix for make-c-ext to allow jim to build in a different dir
Use a sh-based make-c-ext
*: No need to leave one remaining host tcl dependency
------------------------------------------------------------------------
Diffstat (limited to 'make-c-ext.tcl')
-rw-r--r-- | make-c-ext.tcl | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/make-c-ext.tcl b/make-c-ext.tcl deleted file mode 100644 index 96f6355..0000000 --- a/make-c-ext.tcl +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env tclsh - -proc tcl_to_string {str} { - set result {} - foreach buf [split $str \n] { - set trimmed [string trim $buf] - if {[string match "#*" $trimmed] || $trimmed == ""} { - continue - } - regsub -all {\\} $buf {\\\\} buf - regsub -all \" $buf "\\\"" buf - append result {"} $buf {\n"} \n - } - return $result -} - -set outfile [lindex $argv 0] -set argv [lrange $argv 1 end] - -foreach file $argv { - if {![string match *.tcl $file]} { - error "Not a tcl file: $file" - } - set tmp [file tail $file] - set rootname [file rootname $tmp] - if {0} { - set outfile jim-$rootname.c - } - set f [open $file] - set str [read $f] - close $f - set f [open $outfile w] - puts $f {#include <jim.h>} - puts $f "int Jim_${rootname}Init(Jim_Interp *interp)" - puts $f "{" - puts $f "\treturn Jim_EvalGlobal(interp, " - puts -nonewline $f [tcl_to_string $str] - puts $f ");\t}" - close $f -} |