summaryrefslogtreecommitdiffstats
path: root/macosx/buildTkConfig.tcl
diff options
context:
space:
mode:
authordas <das>2002-09-26 17:07:33 (GMT)
committerdas <das>2002-09-26 17:07:33 (GMT)
commit32b1b1f7e6f65a67d4b080700b835c3d09edce65 (patch)
tree112cb862271c362e292651bcd940c53f02ab243c /macosx/buildTkConfig.tcl
parent34668c7563378b40e10094f94be222b167d40723 (diff)
downloadtk-32b1b1f7e6f65a67d4b080700b835c3d09edce65.zip
tk-32b1b1f7e6f65a67d4b080700b835c3d09edce65.tar.gz
tk-32b1b1f7e6f65a67d4b080700b835c3d09edce65.tar.bz2
* macosx/Makefile: preserve environment value of INSTALL_ROOT.
When embedding only use deployment build. Force relink before embedded build to ensure new linker flags are picked up. * macosx/buildTkConfig.tcl (new): * macosx/Wish.pbproj/project.pbxproj: synthesize tkConfig.sh based on tclConfig.sh in Tcl.framework and tkConfig.sh.in. Add symbolic links to debug lib, stub libs and tkConfig.sh in framework toplevel. Made tkIntXlibDecls.h a public header since Headers/X11/Xlib.h includes it. Install wish8.4 script that runs "Wish Shell.app" and corresponding wish link. Use tcl headers from built Tcl.framework instead of from tcl source directory. * macosx/tkMacOSXPort.h: added missing standard unix includes and defines, similarly to tkUnixPort.h. * macosx/tkMacOSXNotify.c: removed dependency on internal tcl header "tclPort.h" * unix/Makefile.in: * unix/install-sh: copied support for 'install-strip' target over from tcl/unix/{Makefile.in,install-sh}
Diffstat (limited to 'macosx/buildTkConfig.tcl')
-rwxr-xr-xmacosx/buildTkConfig.tcl44
1 files changed, 44 insertions, 0 deletions
diff --git a/macosx/buildTkConfig.tcl b/macosx/buildTkConfig.tcl
new file mode 100755
index 0000000..7f1350a
--- /dev/null
+++ b/macosx/buildTkConfig.tcl
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Synthesize tkConfig.sh for Mac OS X based
+# on tclConfig.sh and tkConfig.sh.in
+#
+# RCS: @(#) $Id: buildTkConfig.tcl,v 1.1 2002/09/26 17:07:33 das Exp $
+#
+# the next line restarts using tclsh \
+exec tclsh8.4 "$0" "$@"
+
+proc main {tclConfigFile tkConfigFileIn tkConfigFile} {
+ set in [open $tclConfigFile]
+ set tclConfig [read $in]
+ close $in
+ set in [open $tkConfigFileIn]
+ set tkConfig [read $in]
+ close $in
+ set tclconfvars [regexp -all -inline -line -- {^TCL_([^=]*)=(.*)$} $tclConfig]
+ lappend tclconfvars {} {XINCLUDES} \
+ [lindex [regexp -inline -line -- {^TCL_INCLUDE_SPEC=(.*)$} $tclConfig] 1]
+ set tkconfvars [regexp -all -inline -line -- {^TK_([^=]*)=} $tkConfig]
+ foreach {-> var val} $tclconfvars {
+ regsub -all -- {([Tt])cl((?![[:alnum:]])|stub)} $val {\1k\2} val
+ foreach {-> tkvar} $tkconfvars {
+ regsub -all -- "TCL_$tkvar" $val "TK_$tkvar" val
+ }
+ regsub -line -- "^TK_$var=.*\$" $tkConfig "TK_$var=$val" tkConfig
+ }
+ regsub -line -all -- {@[^@]+@} $tkConfig {} tkConfig
+ regsub -line -all -- {/[^/]+\.build/Tk.build} $tkConfig {} tkConfig
+ regsub -line {^(TK_DEFS=')} $tkConfig {\1 -DMAC_OSX_TK} tkConfig
+
+ set out [open $tkConfigFile w]
+ puts $out $tkConfig
+ close $out
+}
+
+if {$argc != 3} {
+ puts stderr "usage: $argv0 /path/to/tclConfig.sh \
+/path/to/tkConfig.sh.in /path/to/tkConfig.sh"
+ exit 1
+}
+
+main [lindex $argv 0] [lindex $argv 1] [lindex $argv 2]