summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstanton <stanton>1999-02-19 02:14:56 (GMT)
committerstanton <stanton>1999-02-19 02:14:56 (GMT)
commit8b366d83a2f91972947f05b4b206d8d9f7af940a (patch)
tree68b2e0d3a964b96c9c6d8dccd7d8a96f26a78a5b
parent016e252a68278aa62a4fbab8f3632fecb6958765 (diff)
downloadtcl-8b366d83a2f91972947f05b4b206d8d9f7af940a.zip
tcl-8b366d83a2f91972947f05b4b206d8d9f7af940a.tar.gz
tcl-8b366d83a2f91972947f05b4b206d8d9f7af940a.tar.bz2
changed so helpfile generation can work from the build environment
-rw-r--r--tools/Makefile.in31
-rw-r--r--tools/configure.in20
-rw-r--r--tools/man2help.tcl4
3 files changed, 35 insertions, 20 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 3a3feec..b44ace0 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -6,18 +6,17 @@
#
# HTML: 1. Build the html target on Unix
-# RCS: @(#) $Id: Makefile.in,v 1.6 1999/02/05 03:12:50 stanton Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.7 1999/02/19 02:14:56 stanton Exp $
-#TCL = tcl@TCL_VERSION@@TCL_PATCH_LEVEL@
-#TK = tk@TCL_VERSION@@TCL_PATCH_LEVEL@
TCL = tcl@TCL_VERSION@
TK = tk@TCL_VERSION@
VER=@TCL_WIN_VERSION@
-TCL_SOURCE = @srcdir@/..
-TK_SOURCE = @srcdir@/../../$(TK)
-PRO_SOURCE = @srcdir@/../../pro
-ITCL_SOURCE = @srcdir@/../../itcl3.0.1
+TCL_BIN_DIR = @TCL_BIN_DIR@
+TCL_SOURCE = @TCL_SRC_DIR@
+TK_SOURCE = $(TCL_SOURCE)/../$(TK)
+PRO_SOURCE = $(TCL_SOURCE)/../pro
+ITCL_SOURCE = $(TCL_SOURCE)/../itcl3.0.1
TCL_DOCS = \
$(TCL_SOURCE)/doc/*.[13n]
@@ -36,7 +35,7 @@ ITCL_DOCS = \
COREDOCS = $(TCL_DOCS) $(TK_DOCS)
PRODOCS = $(COREDOCS) $(PRO_DOCS) $(ITCL_DOCS)
-TCLSH = $(TCL_SOURCE)/unix/tclsh
+TCLSH = $(TCL_BIN_DIR)/tclsh
CC=@CC@
all: core
@@ -47,20 +46,18 @@ pro:
core:
$(MAKE) DOCS="$(COREDOCS)" rtf
-rtf: man2help.tcl man2tcl $(DOCS)
- LD_LIBRARY_PATH=$(TCL_SOURCE)/unix \
- $(TCLSH) man2help.tcl tcl "$(VER)" $(DOCS)
+rtf: $(TCL_SOURCE)/tools/man2help.tcl man2tcl $(DOCS)
+ LD_LIBRARY_PATH=$(TCL_BIN_DIR) \
+ TCL_LIBRARY=$(TCL_SOURCE)/library \
+ $(TCLSH) $(TCL_SOURCE)/tools/man2help.tcl tcl "$(VER)" $(DOCS)
winhelp: tcl.rtf
-man2tcl: man2tcl.c
- $(CC) $(CFLAGS) -o man2tcl man2tcl.c
+man2tcl: $(TCL_SOURCE)/tools/man2tcl.c
+ $(CC) $(CFLAGS) -o man2tcl $(TCL_SOURCE)/tools/man2tcl.c
clean:
-rm -f man2tcl *.o *.cnt *.rtf
helpfile:
- hcw /c tcl.hpj
-
-# mv tcl.hlp tcl$(VER).hlp
-
+ hcw /c /e tcl.hpj
diff --git a/tools/configure.in b/tools/configure.in
index 8d048c8..bd1f575 100644
--- a/tools/configure.in
+++ b/tools/configure.in
@@ -2,11 +2,24 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run to configure the
dnl Makefile in this directory.
AC_INIT(man2tcl.c)
-# RCS: @(#) $Id: configure.in,v 1.2 1998/09/14 18:40:15 stanton Exp $
+# RCS: @(#) $Id: configure.in,v 1.3 1999/02/19 02:14:56 stanton Exp $
# Recover information that Tcl computed with its configure script.
-. ../unix/tclConfig.sh
+#--------------------------------------------------------------------
+# See if there was a command-line option for where Tcl is; if
+# not, assume that its top-level directory is a sibling of ours.
+#--------------------------------------------------------------------
+
+AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.0 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd ../../tcl8.0$TK_PATCH_LEVEL/unix; pwd`)
+if test ! -d $TCL_BIN_DIR; then
+ AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR doesn't exist)
+fi
+if test ! -f $TCL_BIN_DIR/tclConfig.sh; then
+ AC_MSG_ERROR(There's no tclConfig.sh in $TCL_BIN_DIR; perhaps you didn't specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
+fi
+
+. $TCL_BIN_DIR/tclConfig.sh
TCL_WIN_VERSION=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
AC_SUBST(TCL_WIN_VERSION)
@@ -14,5 +27,8 @@ CC=$TCL_CC
AC_SUBST(CC)
AC_SUBST(TCL_VERSION)
AC_SUBST(TCL_PATCH_LEVEL)
+AC_SUBST(TCL_SRC_DIR)
+AC_SUBST(TCL_BIN_DIR)
AC_OUTPUT(Makefile)
+AC_OUTPUT(tcl.hpj)
diff --git a/tools/man2help.tcl b/tools/man2help.tcl
index 50de53b..e86e78b 100644
--- a/tools/man2help.tcl
+++ b/tools/man2help.tcl
@@ -6,7 +6,7 @@
#
# Copyright (c) 1996 by Sun Microsystems, Inc.
#
-# RCS: @(#) $Id: man2help.tcl,v 1.3 1998/12/02 01:42:39 welch Exp $
+# RCS: @(#) $Id: man2help.tcl,v 1.4 1999/02/19 02:14:56 stanton Exp $
#
#
@@ -23,6 +23,7 @@ proc generateContents {basename version files} {
doFile $f
}
set fd [open "$basename$version.cnt" w]
+ fconfigure $fd -translation crlf
puts $fd ":Base $basename$version.hlp"
foreach package [getPackages] {
foreach section [getSections $package] {
@@ -56,6 +57,7 @@ proc generateHelp {basename files} {
}
set file [open "$basename.rtf" w]
+ fconfigure $file -translation crlf
puts $file "\{\\rtf1\\ansi \\deff0\\deflang1033\{\\fonttbl\{\\f0\\froman\\fcharset0\\fprq2 Times New Roman\;\}\}"
foreach f $files {
regsub -all -- {-} [file tail $f] {} curFile