summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog6
-rwxr-xr-xtools/tcltk-man2html.tcl41
-rw-r--r--unix/Makefile.in6
3 files changed, 34 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 28572fa..9ca24a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-02 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * 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.
+
2005-06-01 Don Porter <dgp@users.sourceforge.net>
* generic/tclBasic.c: For compatibility with earlier Tcl releases,
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
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 7e0cbac..e96ed48 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.168 2005/05/23 20:20:53 das Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.169 2005/06/02 22:56:03 hobbs Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -1659,7 +1659,7 @@ allpatch: dist
# This target creates the HTML folder for Tcl & Tk and places it
# in DISTDIR/html. It uses the tcltk-man2html.tcl tool from
# the Tcl group's tool workspace. It depends on the Tcl & Tk being
-# in directories called tcl8.3 & tk8.3 up two directories from the
+# in directories called tcl8.* & tk8.* up two directories from the
# TOOL_DIR.
#
@@ -1677,7 +1677,7 @@ BUILD_HTML = \
@@LD_LIBRARY_PATH_VAR@=`pwd`:$${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \
TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir=$(HTML_INSTALL_DIR) \
- --srcdir=$(TOP_DIR)/..
+ --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS)
#
# Targets to build Solaris package of the distribution for the current