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)
commit24ae729ae7d4ebdc3db4055e6b02a8423d7a6461 (patch)
treeea0341a17f57440a73f24fba0b6966347c124423 /tools
parent4559c0bf3c0657fb44ee689add8e640d03b50b03 (diff)
downloadtcl-24ae729ae7d4ebdc3db4055e6b02a8423d7a6461.zip
tcl-24ae729ae7d4ebdc3db4055e6b02a8423d7a6461.tar.gz
tcl-24ae729ae7d4ebdc3db4055e6b02a8423d7a6461.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