summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-06-02 22:56:02 (GMT)
committerhobbs <hobbs>2005-06-02 22:56:02 (GMT)
commit220cef33204f421514444e4bd574cfd50fa054ea (patch)
tree5b15f8c53cc627c1dd5cdc9f3f28b10ddafd3ed8 /tools
parent1c4f18a930d0ea2d75a420154eefc6fbcf82add8 (diff)
downloadtcl-220cef33204f421514444e4bd574cfd50fa054ea.zip
tcl-220cef33204f421514444e4bd574cfd50fa054ea.tar.gz
tcl-220cef33204f421514444e4bd574cfd50fa054ea.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