summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2002-03-28 02:42:40 (GMT)
committerdavygrvy <davygrvy@pobox.com>2002-03-28 02:42:40 (GMT)
commit369191c32d21d0a7ae82205e8e274154d0f76d00 (patch)
tree66e30c06ec1803f3c2838ccf56f40ebbe14c695d /tools
parent0e6b520d2c873ab9b8e129ed8b82ecd5b9275a8f (diff)
downloadtcl-369191c32d21d0a7ae82205e8e274154d0f76d00.zip
tcl-369191c32d21d0a7ae82205e8e274154d0f76d00.tar.gz
tcl-369191c32d21d0a7ae82205e8e274154d0f76d00.tar.bz2
* tools/man2help.tcl:
* win/makefile.vc: winhelp target now copies all needed files from tools/ to a workarea under $(OUT_DIR) and builds it from there. No build cruft is left in tools/ anymore. All paths used in man2help.tcl are now relative to where the script is. [Bug 527941]
Diffstat (limited to 'tools')
-rw-r--r--tools/man2help.tcl16
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/man2help.tcl b/tools/man2help.tcl
index 2422468..0d9bb02 100644
--- a/tools/man2help.tcl
+++ b/tools/man2help.tcl
@@ -6,13 +6,15 @@
#
# Copyright (c) 1996 by Sun Microsystems, Inc.
#
-# RCS: @(#) $Id: man2help.tcl,v 1.8 2001/11/10 02:34:57 hobbs Exp $
+# RCS: @(#) $Id: man2help.tcl,v 1.9 2002/03/28 02:42:40 davygrvy Exp $
#
#
# PASS 1
#
+set man2tclprog [file join [file dirname [info script]] man2tcl.exe]
+
proc generateContents {basename version files} {
global curID topics
set curID 0
@@ -21,7 +23,7 @@ proc generateContents {basename version files} {
flush stdout
doFile $f
}
- set fd [open "$basename$version.cnt" w]
+ set fd [open [file join [file dirname [info script]] $basename$version.cnt] w]
fconfigure $fd -translation crlf
puts $fd ":Base $basename$version.hlp"
foreach package [getPackages] {
@@ -55,7 +57,7 @@ proc generateHelp {basename files} {
}
}
- set file [open "$basename.rtf" w]
+ set file [open [file join [file dirname [info script]] $basename.rtf] w]
fconfigure $file -translation crlf
puts $file "\{\\rtf1\\ansi \\deff0\\deflang1033\{\\fonttbl\{\\f0\\froman\\fcharset0\\fprq2 Times New Roman\;\}\}"
foreach f $files {
@@ -78,8 +80,8 @@ proc generateHelp {basename files} {
# file - Name of file to translate.
proc doFile {file} {
- if {[catch {eval [exec man2tcl [glob $file]]} msg] &&
- [catch {eval [exec ./man2tcl [glob $file]]} msg]} {
+ global man2tclprog
+ if {[catch {eval [exec $man2tclprog [glob $file]]} msg]} {
global errorInfo
puts stderr $msg
puts "in"
@@ -124,7 +126,7 @@ foreach i [lrange $argv 2 end] {
}
}
-source [file join [file dir $argv0] index.tcl]
+source [file join [file dirname [info script]] index.tcl]
generateContents $baseName $version $files
-source [file join [file dir $argv0] man2help2.tcl]
+source [file join [file dirname [info script]] man2help2.tcl]
generateHelp $baseName $files