summaryrefslogtreecommitdiffstats
path: root/tools/tcltk-man2html.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-08-01 09:15:11 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-08-01 09:15:11 (GMT)
commit84631930502efd5f508061e9c4ae81d8413f3ecf (patch)
treeb77bf0217a37594620be39e132d91599d9133973 /tools/tcltk-man2html.tcl
parent03ad3d0610ac27a99cd817cdf14f0506de1f59ed (diff)
downloadtcl-84631930502efd5f508061e9c4ae81d8413f3ecf.zip
tcl-84631930502efd5f508061e9c4ae81d8413f3ecf.tar.gz
tcl-84631930502efd5f508061e9c4ae81d8413f3ecf.tar.bz2
[Bug 3382474]: Added code to determine the version number of contributed
packages from their directory names so that HTML documentation builds are less confusing.
Diffstat (limited to 'tools/tcltk-man2html.tcl')
-rwxr-xr-xtools/tcltk-man2html.tcl16
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl
index 2bde714..eaadc51 100755
--- a/tools/tcltk-man2html.tcl
+++ b/tools/tcltk-man2html.tcl
@@ -766,23 +766,31 @@ proc plus-pkgs {type args} {
if {!$build_tcl} return
set result {}
foreach {dir name} $args {
- set globpat $tcltkdir/$tcldir/pkgs/$dir/doc/*.$type
+ set globpat $tcltkdir/$tcldir/pkgs/$dir*/doc/*.$type
if {![llength [glob -nocomplain $globpat]]} {
# Fallback for manpages generated using doctools
- set globpat $tcltkdir/$tcldir/pkgs/$dir/doc/man/*.$type
+ set globpat $tcltkdir/$tcldir/pkgs/$dir*/doc/man/*.$type
if {![llength [glob -nocomplain $globpat]]} {
continue
}
}
+ regexp "pkgs/$dir(.*)/doc$" [glob $tcltkdir/$tcldir/pkgs/$dir*/doc] \
+ -> version
switch $type {
n {
set title "$name Package Commands"
+ if {$version ne ""} {
+ append title ", version $version"
+ }
set dir [string totitle $dir]Cmd
set desc \
"The additional commands provided by the $name package."
}
3 {
set title "$name Package Library"
+ if {$version ne ""} {
+ append title ", version $version"
+ }
set dir [string totitle $dir]Lib
set desc \
"The additional C functions provided by the $name package."
@@ -945,8 +953,8 @@ try {
append appdir "$tkdir"
}
- # Get the list of packages to try, and what their human-readable
- # names are.
+ # Get the list of packages to try, and what their human-readable names
+ # are. Note that the package directory list should be version-less.
try {
set packageDirNameMap {}
if {$build_tcl} {