diff options
-rw-r--r-- | tools/tcltk-man2html-utils.tcl | 2 | ||||
-rwxr-xr-x | tools/tcltk-man2html.tcl | 31 |
2 files changed, 18 insertions, 15 deletions
diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl index d407baa..95552c0 100644 --- a/tools/tcltk-man2html-utils.tcl +++ b/tools/tcltk-man2html-utils.tcl @@ -1602,6 +1602,8 @@ proc make-manpage-section {outputDir sectionDescriptor} { } if {[info exists manual(category-$catMaster)]} { set category $manual(category-$catMaster) + } else { + #puts stderr "\n$tail has no .SH CATEGORY" } # Render link set tail [file tail $tail] diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index b7d0648..c15d31a 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -694,7 +694,7 @@ try { try { glob -directory [file join $pkgsDir $dir] -- \ configure.in configure.ac unix/configure.in - } trap {POSIX ENOENT} {e} { + } trap {TCL OPERATION GLOB NOMATCH} {e} { puts stderr "warning: no 'configure.in' (or .ac) under '[file nativename [file join $pkgsDir $dir]]'" } on ok {flist} { try { @@ -720,29 +720,30 @@ try { # 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} { -#FIXME-TD look in --pkgsrc = $pkgsDir for this -# set f [open [file join $pkgsDir "package.list.txt"]] -# May need to look in more than one place? - set f [open $tcltkdir/$tcldir/pkgs/package.list.txt] + set packageDirNameMap {} + if {$build_tcl} { + set packageDirNameMap { + itcl {[incr Tcl]} + tdbc {TDBC} + thread Thread + } + foreach pkglistfile [list \ + [file join $pkgsDir "package.list.txt"] \ + "$tcltkdir/$tcldir/pkgs/package.list.txt" \ + ] { + puts "checking for package map in '[file nativename [file normalize $pkglistfile]]'" + if { ! [file exists $pkglistfile] } continue + set f [open $pkglistfile r] try { foreach line [split [read $f] \n] { if {[string trim $line] eq ""} continue if {[string match #* $line]} continue - lappend packageDirNameMap {*}$line + dict set packageDirNameMap {*}$line } } finally { close $f } } - } trap {POSIX ENOENT} {} { - set packageDirNameMap { - itcl {[incr Tcl]} - tdbc {TDBC} - thread Thread - } } # Convert to human readable names, if applicable |