diff options
author | das <das@noemail.net> | 2003-07-18 02:02:01 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2003-07-18 02:02:01 (GMT) |
commit | 0813f5260c0dcce3c0caf915bbfcb8528ae99212 (patch) | |
tree | b3ca9b300226091b105fc28b840bbfc2bcc00b0e /tools | |
parent | dfc650c939811fd74d08cdfc7602f2a1f1c9888a (diff) | |
download | tcl-0813f5260c0dcce3c0caf915bbfcb8528ae99212.zip tcl-0813f5260c0dcce3c0caf915bbfcb8528ae99212.tar.gz tcl-0813f5260c0dcce3c0caf915bbfcb8528ae99212.tar.bz2 |
* unix/tclUnixFCmd.c: fix for compilation errors on platforms where
configure detects non-functional chflags(). [Bug 748946]
* macosx/Makefile: Rewrote buildsystem for Mac OS X framework build
to be purely make driven; in order to become independent of Apple's
closed-source IDE and build tool. The changes are intended to be
transparent to the Makefile user, all existing make targets and
cmd line variable overrides should continue to work.
Changed build to only include tcl specific html help in Tcl.framework,
the tk specific html help is now included in Tk.framework.
Added var to allow overriding of tclsh used during html help
building (Landon Fuller).
* macosx/Tcl.pbproj/project.pbxproj:
* macosx/Tcl.pbproj/jingham.pbxuser: Changed to purely call through
to the make driven buildsystem; Tcl.framework is no longer assembled
by ProjectBuilder.
Set default SYMROOT in target options to simplify setting up PB
(manually setting common build folder for tcl & tk no longer needed).
* tools/tcltk-man2html.tcl: Added options to allow building only the
tcl or tk html help files; the default behaviour with none of the new
options is to build both, as before.
* unix/Makefile.in: Added targets for building only the tcl or tk help.
* macosx/README (new): Tcl specific excerpts of tk/macosx/README.
* generic/tcl.h: Updated reminder comment about editing
macosx/Tcl.pbproj/project.pbxproj when version number changes.
FossilOrigin-Name: f0dc607cb13aa8f3764beed00207748ddcecfc0e
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/tcltk-man2html.tcl | 63 |
1 files changed, 46 insertions, 17 deletions
diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl index 221dc63..89f3a83 100755 --- a/tools/tcltk-man2html.tcl +++ b/tools/tcltk-man2html.tcl @@ -65,20 +65,22 @@ package require Tcl 8.4 # Oct 24, 1997 - moved from 8.0b1 to 8.0 release # -set Version "0.31" +set Version "0.32" proc parse_command_line {} { global argv Version # These variables determine where the man pages come from and where # the converted pages go to. - global tcltkdir tkdir tcldir webdir + global tcltkdir tkdir tcldir webdir build_tcl build_tk # Set defaults based on original code. set tcltkdir ../.. set tkdir {} set tcldir {} set webdir ../html + set build_tcl 0 + set build_tk 0 # Handle arguments a la GNU: # --version @@ -99,6 +101,8 @@ proc parse_command_line {} { puts " --version print version number, then exit" puts " --srcdir=DIR find tcl and tk source below DIR" puts " --htmldir=DIR put generated HTML in DIR" + puts " --tcl build tcl help" + puts " --tk build tk help" exit 0 } @@ -112,6 +116,14 @@ proc parse_command_line {} { set webdir [string range $option 10 end] } + --tcl { + set build_tcl 1 + } + + --tk { + set build_tk 1 + } + default { puts stderr "tcltk-man-html: unrecognized option -- `$option'" exit 1 @@ -119,6 +131,9 @@ 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] @@ -127,7 +142,9 @@ proc parse_command_line {} { 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] @@ -136,10 +153,15 @@ proc parse_command_line {} { exit 1 } puts "using Tk source directory $tkdir" + } # the title for the man pages overall global overall_title - set overall_title "[capitalize $tcldir]/[capitalize $tkdir] Manual" + set overall_title "" + if {$build_tcl} {append overall_title "[capitalize $tcldir]"} + if {$build_tcl && $build_tk} {append overall_title "/"} + if {$build_tk} {append overall_title "[capitalize $tkdir]"} + append overall_title " Manual" } proc capitalize {string} { @@ -656,6 +678,7 @@ proc cross-reference {ref} { foreach name {array file history info interp string trace after clipboard grab image option pack place selection tk tkwait update winfo wm} { if {[regexp "^$name \[a-z0-9]*\$" $lref] && \ + [info exists manual(name-$name)] && \ [string compare $manual(tail) "$name.n"]} { return "<A HREF=\"../$manual(name-$name).htm\">$ref</A>" } @@ -1265,7 +1288,7 @@ proc makedirhier {dir} { ## specified by html. ## proc make-man-pages {html args} { - global env manual overall_title + global env manual overall_title tcltkdesc makedirhier $html set manual(short-toc-n) 1 set manual(short-toc-fp) [open $html/contents.htm w] @@ -1273,6 +1296,7 @@ proc make-man-pages {html args} { puts $manual(short-toc-fp) "<BODY><HR><H3>$overall_title</H3><HR><DL>" set manual(merge-copyrights) {} foreach arg $args { + if {$arg == ""} {continue} set manual(wing-glob) [lindex $arg 0] set manual(wing-name) [lindex $arg 1] set manual(wing-file) [lindex $arg 2] @@ -1558,15 +1582,15 @@ proc make-man-pages {html args} { set keys [lsort -command strcasecmp [array names manual keyword-*]] makedirhier $html/Keywords catch {eval file delete -- [glob $html/Keywords/*]} - puts $manual(short-toc-fp) {<DT><A HREF="Keywords/contents.htm">Keywords</A><DD>The keywords from the Tcl/Tk man pages.} + puts $manual(short-toc-fp) "<DT><A HREF=\"Keywords/contents.htm\">Keywords</A><DD>The keywords from the $tcltkdesc man pages." set keyfp [open $html/Keywords/contents.htm w] - puts $keyfp "<HTML><HEAD><TITLE>Tcl/Tk Keywords</TITLE></HEAD>" - puts $keyfp "<BODY><HR><H3>Tcl/Tk Keywords</H3><HR><H2>" + puts $keyfp "<HTML><HEAD><TITLE>$tcltkdesc Keywords</TITLE></HEAD>" + puts $keyfp "<BODY><HR><H3>$tcltkdesc Keywords</H3><HR><H2>" foreach a {A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} { puts $keyfp "<A HREF=\"$a.htm\">$a</A>" set afp [open $html/Keywords/$a.htm w] - puts $afp "<HTML><HEAD><TITLE>Tcl/Tk Keywords - $a</TITLE></HEAD>" - puts $afp "<BODY><HR><H3>Tcl/Tk Keywords - $a</H3><HR><H2>" + puts $afp "<HTML><HEAD><TITLE>$tcltkdesc Keywords - $a</TITLE></HEAD>" + puts $afp "<BODY><HR><H3>$tcltkdesc Keywords - $a</H3><HR><H2>" foreach b {A B C D E F G H I J K L M N O P Q R S T U V W X Y Z} { puts $afp "<A HREF=\"$b.htm\">$b</A>" } @@ -1657,22 +1681,27 @@ proc make-man-pages {html args} { return {} } -set usercmddesc {The interpreters which implement Tcl and Tk.} +parse_command_line + +set tcltkdesc ""; set cmdesc ""; set appdir "" +if {$build_tcl} {append tcltkdesc "Tcl"; append cmdesc "Tcl"; append appdir "$tcldir"} +if {$build_tcl && $build_tk} {append tcltkdesc "/"; append cmdesc " and "; append appdir ","} +if {$build_tk} {append tcltkdesc "Tk"; append cmdesc "Tk"; append appdir "$tkdir"} + +set usercmddesc "The interpreters which implement $cmdesc." set tclcmddesc {The commands which the <B>tclsh</B> interpreter implements.} set tkcmddesc {The additional commands which the <B>wish</B> interpreter implements.} set tcllibdesc {The C functions which a Tcl extended C program may use.} set tklibdesc {The additional C functions which a Tk extended C program may use.} -parse_command_line - if {1} { if {[catch { make-man-pages $webdir \ - "$tcltkdir/{$tkdir,$tcldir}/doc/*.1 {Tcl/Tk Applications} UserCmd {$usercmddesc}" \ - "$tcltkdir/$tcldir/doc/*.n {Tcl Commands} TclCmd {$tclcmddesc}" \ - "$tcltkdir/$tkdir/doc/*.n {Tk Commands} TkCmd {$tkcmddesc}" \ - "$tcltkdir/$tcldir/doc/*.3 {Tcl Library} TclLib {$tcllibdesc}" \ - "$tcltkdir/$tkdir/doc/*.3 {Tk Library} TkLib {$tklibdesc}" + "$tcltkdir/{$appdir}/doc/*.1 \"$tcltkdesc Applications\" UserCmd {$usercmddesc}" \ + [expr {$build_tcl ? "$tcltkdir/$tcldir/doc/*.n {Tcl Commands} TclCmd {$tclcmddesc}" : ""}] \ + [expr {$build_tk ? "$tcltkdir/$tkdir/doc/*.n {Tk Commands} TkCmd {$tkcmddesc}" : ""}] \ + [expr {$build_tcl ? "$tcltkdir/$tcldir/doc/*.3 {Tcl Library} TclLib {$tcllibdesc}" : ""}] \ + [expr {$build_tk ? "$tcltkdir/$tkdir/doc/*.3 {Tk Library} TkLib {$tklibdesc}" : ""}] } error]} { puts $error\n$errorInfo } |