summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-06-02 22:52:46 (GMT)
committerhobbs <hobbs>2005-06-02 22:52:46 (GMT)
commit2a85d2c829f45d6981d321525ef4cc0f28741d9e (patch)
treeea0341a17f57440a73f24fba0b6966347c124423 /tools
parentca7106107072a3bfbf0bb86fda24c2e995c8d494 (diff)
downloadtcl-2a85d2c829f45d6981d321525ef4cc0f28741d9e.zip
tcl-2a85d2c829f45d6981d321525ef4cc0f28741d9e.tar.gz
tcl-2a85d2c829f45d6981d321525ef4cc0f28741d9e.tar.bz2
* unix/Makefile.in (html): add BUILD_HTML_FLAGS optional var
* tools/tcltk-man2html.tcl: add a --useversion to prevent confusion when multiple Tcl source dirs exist.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/tcltk-man2html.tcl41
1 files changed, 25 insertions, 16 deletions
diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl
index b9c8280..f1b1b33 100755
--- a/tools/tcltk-man2html.tcl
+++ b/tools/tcltk-man2html.tcl
@@ -81,9 +81,12 @@ proc parse_command_line {} {
set webdir ../html
set build_tcl 0
set build_tk 0
+ # Default search version is a glob pattern
+ set useversion {{,[8-9].[0-9]{,.[0-9]}}}
# Handle arguments a la GNU:
# --version
+ # --useversion=<version>
# --help
# --srcdir=/path
# --htmldir=/path
@@ -103,6 +106,7 @@ proc parse_command_line {} {
puts " --htmldir=DIR put generated HTML in DIR"
puts " --tcl build tcl help"
puts " --tk build tk help"
+ puts " --useversion version of tcl/tk to search for"
exit 0
}
@@ -116,6 +120,11 @@ proc parse_command_line {} {
set webdir [string range $option 10 end]
}
+ --useversion=* {
+ # length of "--useversion=" is 13
+ set useversion [string range $option 13 end]
+ }
+
--tcl {
set build_tcl 1
}
@@ -134,25 +143,25 @@ proc parse_command_line {} {
if {!$build_tcl && !$build_tk} {set build_tcl 1; set build_tk 1}
if {$build_tcl} {
- # Find Tcl.
- set tcldir [lindex [lsort [glob -nocomplain -tails -type d \
- -directory $tcltkdir {tcl{,[8-9].[0-9]{,.[0-9]}}}]] end]
- if {$tcldir == ""} then {
- puts stderr "tcltk-man-html: couldn't find Tcl below $tcltkdir"
- exit 1
- }
- puts "using Tcl source directory $tcldir"
+ # Find Tcl.
+ set tcldir [lindex [lsort [glob -nocomplain -tails -type d \
+ -directory $tcltkdir tcl$useversion]] end]
+ if {$tcldir == ""} then {
+ puts stderr "tcltk-man-html: couldn't find Tcl below $tcltkdir"
+ exit 1
+ }
+ puts "using Tcl source directory $tcldir"
}
if {$build_tk} {
- # Find Tk.
- set tkdir [lindex [lsort [glob -nocomplain -tails -type d \
- -directory $tcltkdir {tk{,[8-9].[0-9]{,.[0-9]}}}]] end]
- if {$tkdir == ""} then {
- puts stderr "tcltk-man-html: couldn't find Tk below $tcltkdir"
- exit 1
- }
- puts "using Tk source directory $tkdir"
+ # Find Tk.
+ set tkdir [lindex [lsort [glob -nocomplain -tails -type d \
+ -directory $tcltkdir tk$useversion]] end]
+ if {$tkdir == ""} then {
+ puts stderr "tcltk-man-html: couldn't find Tk below $tcltkdir"
+ exit 1
+ }
+ puts "using Tk source directory $tkdir"
}
# the title for the man pages overall