diff options
Diffstat (limited to 'tcl/unix/Makefile.in')
-rw-r--r-- | tcl/unix/Makefile.in | 448 |
1 files changed, 264 insertions, 184 deletions
diff --git a/tcl/unix/Makefile.in b/tcl/unix/Makefile.in index a7dbf51e6bf..e4dcb1b6f1c 100644 --- a/tcl/unix/Makefile.in +++ b/tcl/unix/Makefile.in @@ -8,6 +8,9 @@ # RCS: @(#) $Id$ VERSION = @TCL_VERSION@ +MAJOR_VERSION = @TCL_MAJOR_VERSION@ +MINOR_VERSION = @TCL_MINOR_VERSION@ +PATCH_LEVEL = @TCL_PATCH_LEVEL@ #---------------------------------------------------------------- # Things you can change to personalize the Makefile for your own @@ -37,7 +40,8 @@ mandir = @mandir@ # when installing files. INSTALL_ROOT = -TCL_LIBRARY = @datadir@/tcl$(VERSION) +# Path for the platform independent Tcl scripting libraries: +TCL_LIBRARY = $(prefix)/lib/tcl$(VERSION) # Path to use at runtime to refer to LIB_INSTALL_DIR: LIB_RUNTIME_DIR = $(libdir) @@ -46,19 +50,16 @@ LIB_RUNTIME_DIR = $(libdir) BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir) # Directory in which to install libtcl.so or libtcl.a: -LIB_INSTALL_DIR = $(INSTALL_ROOT)@libdir@ +LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir) # Path name to use when installing library scripts. SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TCL_LIBRARY) -# Directory in which to install the program tclsh: -BIN_INSTALL_DIR = $(INSTALL_ROOT)@bindir@ - # Directory in which to install the include file tcl.h: -INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)@includedir@ +INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir) # Top-level directory in which to install manual entries: -MAN_INSTALL_DIR = $(INSTALL_ROOT)@mandir@ +MAN_INSTALL_DIR = $(INSTALL_ROOT)$(mandir) # Directory in which to install manual entry for tclsh: MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1 @@ -92,9 +93,9 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ # Flags to pass to the linker -LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ -LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ -LDFLAGS = @LDFLAGS@ @LDFLAGS_DEFAULT@ +LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ +LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ +LDFLAGS = @LDFLAGS@ @LDFLAGS_DEFAULT@ # To disable ANSI-C procedure prototypes reverse the comment characters # on the following lines: @@ -125,7 +126,7 @@ ENV_FLAGS = # the current one does). GENERIC_FLAGS = #GENERIC_FLAGS = -DTCL_GENERIC_ONLY -UNIX_OBJS = tclMtherr.o tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o \ +UNIX_OBJS = tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o \ tclUnixFile.o tclUnixPipe.o tclUnixSock.o \ tclUnixTime.o tclUnixInit.o tclUnixThrd.o #UNIX_OBJS = @@ -136,15 +137,15 @@ NOTIFY_OBJS = tclUnixNotfy.o # lines. Warning: if you enable memory debugging, you must do it # *everywhere*, including all the code that calls Tcl, and you must use # ckalloc and ckfree everywhere instead of malloc and free. -MEM_DEBUG_FLAGS = +MEM_DEBUG_FLAGS = @MEM_DEBUG_FLAGS@ #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG -# To enable support for stubs in Tcl. -STUB_LIB_FILE = @TCL_STUB_LIB_FILE@ - TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@ #TCL_STUB_LIB_FILE = libtclstub.a +# Generic stub lib name used in rules that apply to tcl and tk +STUB_LIB_FILE = ${TCL_STUB_LIB_FILE} + TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@ #TCL_STUB_LIB_FLAG = -ltclstub @@ -161,37 +162,26 @@ NO_DEPRECATED_FLAGS = # Some versions of make, like SGI's, use the following variable to # determine which shell to use for executing commands: -SHELL = @SHELL@ +SHELL = /bin/sh # Tcl used to let the configure script choose which program to use # for installing, but there are just too many different versions of # "install" around; better to use the install-sh script that comes # with the distribution, which is slower but guaranteed to work. -INSTALL = @srcdir@/install-sh -c -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -# The following symbol defines additional compiler flags to enable -# Tcl itself to be a shared library. If Tcl isn't going to be a -# shared library then the symbol has an empty definition. - -TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@ -#TCL_SHLIB_CFLAGS = - -# The following symbol defines additional compiler flags to enable -# writable strings, since Tcl_Eval2 writes into its arguments. Only -# applicable for GCC +INSTALL_STRIP_PROGRAM = -s +INSTALL_STRIP_LIBRARY = -S -S INSTALL = @srcdir@/install-sh -c INSTALL_PROGRAM = ${INSTALL} +INSTALL_LIBRARY = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 -# The following specifies which Tcl executable to use for make targets -# below. This can generally be 'tclsh', meaning all targets will work -# once we have created the initial executable, but in some cases you -# may want to use a target without having made tclsh on these sources -# (like for make genstubs) +# TCL_EXE is the name of a tclsh executable that is available *BEFORE* +# running make for the first time. Certain build targets (make genstubs) +# need it to be available on the PATH. This executable should *NOT* be +# required just to do a normal build although it can be required to run +# make dist. TCL_EXE = tclsh # The symbols below provide support for dynamic loading and shared @@ -200,19 +190,23 @@ TCL_EXE = tclsh # configure script. You shouldn't normally need to modify any of # these definitions by hand. -STLIB_LD = @STLIB_LD@ -SHLIB_LD = @SHLIB_LD@ -SHLIB_CFLAGS = @SHLIB_CFLAGS@ +STLIB_LD = @STLIB_LD@ +SHLIB_LD = @SHLIB_LD@ +SHLIB_CFLAGS = @SHLIB_CFLAGS@ +SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@ +SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ +TCL_SHLIB_LD_EXTRAS = @TCL_SHLIB_LD_EXTRAS@ -SHLIB_SUFFIX = @SHLIB_SUFFIX@ -#SHLIB_SUFFIX = +SHLIB_SUFFIX = @SHLIB_SUFFIX@ +#SHLIB_SUFFIX = -TCL_SHARED_LIB_SUFFIX = @TCL_SHARED_LIB_SUFFIX@ -TCL_UNSHARED_LIB_SUFFIX = @TCL_UNSHARED_LIB_SUFFIX@ -TCL_SHARED_LIB_FILE = @TCL_SHARED_LIB_FILE@ -TCL_UNSHARED_LIB_FILE = @TCL_UNSHARED_LIB_FILE@ +DLTEST_TARGETS = dltest.marker -DLTEST_TARGETS = dltest/pkg5${SHLIB_SUFFIX} dltest/Makefile +# Additional search flags needed to find the various shared libraries +# at run-time. The first symbol is for use when creating a binary +# with cc, and the second is for use when running ld directly. +CC_SEARCH_FLAGS = @CC_SEARCH_FLAGS@ +LD_SEARCH_FLAGS = @LD_SEARCH_FLAGS@ # The following symbol is defined to "$(DLTEST_TARGETS)" if dynamic # loading is available; this causes everything in the "dltest" @@ -225,12 +219,18 @@ BUILD_DLTEST = @BUILD_DLTEST@ TCL_LIB_FILE = @TCL_LIB_FILE@ #TCL_LIB_FILE = libtcl.a +# Generic lib name used in rules that apply to tcl and tk +LIB_FILE = ${TCL_LIB_FILE} + TCL_LIB_FLAG = @TCL_LIB_FLAG@ #TCL_LIB_FLAG = -ltcl TCL_EXP_FILE = @TCL_EXP_FILE@ TCL_BUILD_EXP_FILE = @TCL_BUILD_EXP_FILE@ +# support for embedded libraries on Darwin / Mac OS X +DYLIB_INSTALL_DIR = ${LIB_RUNTIME_DIR} + #---------------------------------------------------------------- # The information below is modified by the configure script when # Makefile is generated from Makefile.in. You shouldn't normally @@ -248,13 +248,27 @@ GENERIC_DIR = $(TOP_DIR)/generic COMPAT_DIR = $(TOP_DIR)/compat TOOL_DIR = $(TOP_DIR)/tools UNIX_DIR = $(TOP_DIR)/unix +MAC_OSX_DIR = $(TOP_DIR)/macosx # Must be absolute because of the cd dltest $(DLTEST_DIR)/configure below. DLTEST_DIR = @TCL_SRC_DIR@/unix/dltest # Must be absolute to so the corresponding tcltest's tcl_library is absolute. TCL_BUILDTIME_LIBRARY = @TCL_SRC_DIR@/library -#CC = purify -best-effort @CC@ CC = @CC@ +#CC = purify -best-effort @CC@ -DPURIFY + +# Flags to be passed to mkLinks to control whether the manpages +# should be compressed and linked with softlinks +MKLINKS_FLAGS = @MKLINKS_FLAGS@ + +#---------------------------------------------------------------- +# The information below is usually usable as is. The configure +# script won't modify it and it only exists to make working +# around selected rare system configurations easier. +#---------------------------------------------------------------- + +GDB = gdb +DDD = ddd #---------------------------------------------------------------- # The information below should be usable as is. The configure @@ -274,7 +288,7 @@ STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ ${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \ ${COMPILE_DEBUG_FLAGS} ${ENV_FLAGS} -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\" -LIBS = @DL_LIBS@ @LIBS@ $(MATH_LIBS) -lc +LIBS = @DL_LIBS@ @LIBS@ $(MATH_LIBS) DEPEND_SWITCHES = ${CFLAGS} -I${GENERIC_DIR} -I${SRC_DIR} \ ${AC_FLAGS} ${MATH_FLAGS} \ @@ -300,11 +314,13 @@ GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \ tclObj.o tclPanic.o tclParse.o tclParseExpr.o tclPipe.o \ tclPkg.o tclPosixStr.o tclPreserve.o tclProc.o tclRegexp.o \ tclResolve.o tclResult.o tclScan.o tclStringObj.o tclThread.o \ - tclStubInit.o tclStubLib.o tclTimer.o tclUtf.o tclUtil.o tclVar.o + tclThreadAlloc.o tclThreadJoin.o tclStubInit.o tclStubLib.o \ + tclTimer.o tclUtf.o tclUtil.o tclVar.o STUB_LIB_OBJS = tclStubLib.o ${COMPAT_OBJS} -OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${NOTIFY_OBJS} ${COMPAT_OBJS} @DL_OBJS@ +OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${NOTIFY_OBJS} ${COMPAT_OBJS} \ + @DL_OBJS@ @PLAT_OBJS@ TCL_DECLS = \ $(GENERIC_DIR)/tcl.decls \ @@ -381,6 +397,8 @@ GENERIC_SRCS = \ $(GENERIC_DIR)/tclTestObj.c \ $(GENERIC_DIR)/tclTestProcBodyObj.c \ $(GENERIC_DIR)/tclThread.c \ + $(GENERIC_DIR)/tclThreadAlloc.c \ + $(GENERIC_DIR)/tclThreadJoin.c \ $(GENERIC_DIR)/tclTimer.c \ $(GENERIC_DIR)/tclUtil.c \ $(GENERIC_DIR)/tclVar.c @@ -393,7 +411,6 @@ UNIX_HDRS = \ UNIX_SRCS = \ $(UNIX_DIR)/tclAppInit.c \ - $(UNIX_DIR)/tclMtherr.c \ $(UNIX_DIR)/tclUnixChan.c \ $(UNIX_DIR)/tclUnixEvent.c \ $(UNIX_DIR)/tclUnixFCmd.c \ @@ -417,15 +434,18 @@ DL_SRCS = \ $(UNIX_DIR)/tclLoadOSF.c \ $(UNIX_DIR)/tclLoadShl.c -# Note: don't include DL_SRCS in SRCS: most of those files won't -# compile on the current machine, and they will cause problems for -# things like "make depend". +MAC_OSX_SRCS = \ + $(MAC_OSX_DIR)/tclMacOSXBundle.c + +# Note: don't include DL_SRCS or MAC_OSX_SRCS in SRCS: most of those +# files won't compile on the current machine, and they will cause +# problems for things like "make depend". SRCS = $(GENERIC_SRCS) $(UNIX_SRCS) $(STUB_SRCS) all: binaries libraries doc -binaries: ${TCL_LIB_FILE} $(TCL_STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh +binaries: ${LIB_FILE} $(STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh libraries: @@ -433,15 +453,13 @@ doc: # The following target is configured by autoconf to generate either # a shared library or non-shared library for Tcl. -${TCL_LIB_FILE}: ${OBJS} ${STUB_LIB_FILE} - rm -f ${TCL_LIB_FILE} +${LIB_FILE}: ${OBJS} ${STUB_LIB_FILE} + rm -f $@ @MAKE_LIB@ - $(RANLIB) ${TCL_LIB_FILE} ${STUB_LIB_FILE}: ${STUB_LIB_OBJS} - rm -f ${STUB_LIB_FILE} + rm -f $@ @MAKE_STUB_LIB@ - $(RANLIB) ${STUB_LIB_FILE} # Make target which outputs the list of the .o contained in the Tcl lib # usefull to build a single big shared library containing Tcl and other @@ -457,32 +475,66 @@ objs: ${OBJS} tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${CC} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \ - @TCL_LD_SEARCH_FLAGS@ -o tclsh + ${CC_SEARCH_FLAGS} -o tclsh + +# Resetting the LIB_RUNTIME_DIR below is required so that +# the generated tcltest executable gets the build directory +# burned into its ld search path. This keeps tcltest from +# picking up an already installed version of the Tcl library. tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST} - ${CC} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \ - @TCL_LD_SEARCH_FLAGS@ -o tcltest + $(MAKE) tcltest-real LIB_RUNTIME_DIR=`pwd` +tcltest-real: + ${CC} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \ + ${CC_SEARCH_FLAGS} -o tcltest # Note, in the target below TCL_LIBRARY needs to be set or else # "make test" won't work in the case where the compilation directory # isn't the same as the source directory. +# Specifying TESTFLAGS on the command line is the standard way to pass +# args to tcltest, ie: +# % make test TESTFLAGS="-verbose bps -file fileName.test" test: tcltest - LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \ - LIBPATH=`pwd`:${LIBPATH}; export LIBPATH; \ - SHLIB_PATH=`pwd`:${SHLIB_PATH}; export SHLIB_PATH; \ + @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tcltest $(TOP_DIR)/tests/all.tcl $(TCLTESTARGS) + ./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) $(TCLTESTARGS) # Useful target to launch a built tcltest with the proper path,... runtest: tcltest - LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \ - LIBPATH=`pwd`:${LIBPATH}; export LIBPATH; \ - SHLIB_PATH=`pwd`:${SHLIB_PATH}; export SHLIB_PATH; \ + @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ ./tcltest +# Useful target for running the test suite with an unwritable current +# directory... +ro-test: tcltest + @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ + echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | ./tcltest + +# This target can be used to run tclsh from the build directory +# via `make shell SCRIPT=/tmp/foo.tcl` +shell: tclsh + @@LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}; export @LD_LIBRARY_PATH_VAR@; \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ + ./tclsh $(SCRIPT) + +# This target can be used to run tclsh inside either gdb or insight +gdb: tclsh + @echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}" > gdb.run + @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run + $(GDB) ./tclsh --command=gdb.run + rm gdb.run + +# This target can be used to run tclsh inside ddd +ddd: tclsh + @echo "set env @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@}" > gdb.run + @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run + $(DDD) -command=gdb.run ./tclsh + rm gdb.run + # The following target outputs the name of the top-level source directory # for Tcl (it is used by Tk's configure script, for example). The # .NO_PARALLEL line is needed to avoid problems under Sun's "pmake". @@ -502,36 +554,28 @@ topDirName: gendate: yacc -l $(GENERIC_DIR)/tclGetDate.y sed -e 's/yy/TclDate/g' -e '/^#include <values.h>/d' \ - -e 's?SCCSID?RCS: @(#) $$Id$$?' \ + -e 's?SCCSID?RCS: @(#) ?' \ -e '/#ifdef __STDC__/,/#endif/d' -e '/TclDateerrlab:/d' \ -e '/TclDatenewstate:/d' -e '/#pragma/d' \ -e '/#include <inttypes.h>/d' -e 's/const /CONST /g' \ <y.tab.c >$(GENERIC_DIR)/tclDate.c rm y.tab.c -# The following targets generate the shared libraries in dltest that +# The following target generates the shared libraries in dltest/ that # are used for testing; they are included as part of the "tcltest" # target (via the BUILD_DLTEST variable) if dynamic loading is supported -# on this platform. The ".." environment variable stuff is needed -# because on some platforms tclsh scripts will be executed as part of -# building the shared libraries, and they need to be able to use the -# uninstalled tclsh that is present in this directory. The "make tclsh" -# command is needed for the same reason (must make sure that it exists). - -dltest/pkg5${SHLIB_SUFFIX}: dltest/Makefile - if test ! -f tclsh; then $(MAKE) tclsh; else true; fi - libdir=`cd $(TOP_DIR)/library && pwd`; cd dltest; \ - PATH=..:${PATH} TCL_LIBRARY=$$libdir $(MAKE) - -dltest/Makefile: $(DLTEST_DIR)/configure $(DLTEST_DIR)/Makefile.in tclConfig.sh - if test ! -d dltest; then mkdir dltest; else true; fi - dldir=`cd $(DLTEST_DIR) && pwd`; cd dltest; \ - if test -f configure; then ./configure; else $$dldir/configure; fi +# on this platform. The Makefile in the dltest subdirectory creates +# the dltest.marker file in this directory after a successful build. + +dltest.marker: + cd dltest ; $(MAKE) install: install-binaries install-libraries install-doc install-strip: - $(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" + $(MAKE) install \ + INSTALL_PROGRAM="$(INSTALL_PROGRAM) ${INSTALL_STRIP_PROGRAM}" \ + INSTALL_LIBRARY="$(INSTALL_LIBRARY) ${INSTALL_STRIP_LIBRARY}" # Note: before running ranlib below, must cd to target directory because # some ranlibs write to current directory, and this might not always be @@ -550,10 +594,9 @@ install-binaries: binaries @if test ! -x $(SRC_DIR)/install-sh; then \ chmod +x $(SRC_DIR)/install-sh; \ fi - @echo "Installing $(TCL_LIB_FILE) to $(LIB_INSTALL_DIR)/" - @$(INSTALL_DATA) $(TCL_LIB_FILE) $(LIB_INSTALL_DIR)/$(TCL_LIB_FILE) - @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TCL_LIB_FILE)) - @chmod 555 $(LIB_INSTALL_DIR)/$(TCL_LIB_FILE) + @echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/" + @@INSTALL_LIB@ + @chmod 555 $(LIB_INSTALL_DIR)/$(LIB_FILE) @if test "$(TCL_BUILD_EXP_FILE)" != ""; then \ echo "Installing $(TCL_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \ $(INSTALL_DATA) $(TCL_BUILD_EXP_FILE) \ @@ -563,15 +606,13 @@ install-binaries: binaries @$(INSTALL_PROGRAM) tclsh $(BIN_INSTALL_DIR)/tclsh$(VERSION) @echo "Installing tclConfig.sh to $(LIB_INSTALL_DIR)/" @$(INSTALL_DATA) tclConfig.sh $(LIB_INSTALL_DIR)/tclConfig.sh - @if test "$(TCL_STUB_LIB_FILE)" != "" ; then \ - echo "Installing $(TCL_STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \ - $(INSTALL_DATA) $(STUB_LIB_FILE) \ - $(LIB_INSTALL_DIR)/$(TCL_STUB_LIB_FILE); \ - fi + @if test "$(STUB_LIB_FILE)" != "" ; then \ + echo "Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/"; \ + @INSTALL_STUB_LIB@ ; \ + fi -install-libraries: - @for i in $(INSTALL_ROOT)@datadir@ $(INCLUDE_INSTALL_DIR) \ - $(SCRIPT_INSTALL_DIR) ; \ +install-libraries: libraries + @for i in $(INCLUDE_INSTALL_DIR) $(SCRIPT_INSTALL_DIR); \ do \ if [ ! -d $$i ] ; then \ echo "Making directory $$i"; \ @@ -580,7 +621,7 @@ install-libraries: else true; \ fi; \ done; - @for i in http2.3 http1.0 opt0.4 encoding msgcat1.0 tcltest1.0; \ + @for i in http2.4 http1.0 opt0.4 encoding msgcat1.3 tcltest2.2; \ do \ if [ ! -d $(SCRIPT_INSTALL_DIR)/$$i ] ; then \ echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \ @@ -593,7 +634,8 @@ install-libraries: chmod +x $(SRC_DIR)/install-sh; \ fi @echo "Installing header files"; - @for i in $(GENERIC_DIR)/tcl.h $(GENERIC_DIR)/tclDecls.h ; \ + @for i in $(GENERIC_DIR)/tcl.h $(GENERIC_DIR)/tclDecls.h \ + $(GENERIC_DIR)/tclPlatDecls.h ; \ do \ $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \ done; @@ -602,13 +644,30 @@ install-libraries: do \ $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \ done; - @for i in http2.3 http1.0 opt0.4 msgcat1.0 tcltest1.0; \ + @echo "Installing library http1.0 directory"; + @for j in $(TOP_DIR)/library/http1.0/*.tcl ; \ do \ - echo "Installing library $$i directory"; \ - for j in $(TOP_DIR)/library/$$i/*.tcl ; \ - do \ - $(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/$$i; \ - done; \ + $(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/http1.0; \ + done; + @echo "Installing library http2.4 directory"; + @for j in $(TOP_DIR)/library/http/*.tcl ; \ + do \ + $(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/http2.4; \ + done; + @echo "Installing library opt0.4 directory"; + @for j in $(TOP_DIR)/library/opt/*.tcl ; \ + do \ + $(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/opt0.4; \ + done; + @echo "Installing library msgcat1.3 directory"; + @for j in $(TOP_DIR)/library/msgcat/*.tcl ; \ + do \ + $(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/msgcat1.3; \ + done; + @echo "Installing library tcltest2.2 directory"; + @for j in $(TOP_DIR)/library/tcltest/*.tcl ; \ + do \ + $(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/tcltest2.2; \ done; @echo "Installing library encoding directory"; @for i in $(TOP_DIR)/library/encoding/*.enc ; do \ @@ -634,54 +693,47 @@ install-doc: doc rm -f $(MAN1_INSTALL_DIR)/$$i; \ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ $$i > $(MAN1_INSTALL_DIR)/$$i; \ - chmod 644 $(MAN1_INSTALL_DIR)/$$i; \ + chmod 444 $(MAN1_INSTALL_DIR)/$$i; \ done; @echo "Cross-linking top-level (.1) docs"; - @$(UNIX_DIR)/mkLinks $(MAN1_INSTALL_DIR) + @$(UNIX_DIR)/mkLinks $(MKLINKS_FLAGS) $(MAN1_INSTALL_DIR) @echo "Installing C API (.3) docs"; @cd $(TOP_DIR)/doc; for i in *.3; \ do \ rm -f $(MAN3_INSTALL_DIR)/$$i; \ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ $$i > $(MAN3_INSTALL_DIR)/$$i; \ - chmod 644 $(MAN3_INSTALL_DIR)/$$i; \ + chmod 444 $(MAN3_INSTALL_DIR)/$$i; \ done; @echo "Cross-linking C API (.3) docs"; - @$(UNIX_DIR)/mkLinks $(MAN3_INSTALL_DIR) + @$(UNIX_DIR)/mkLinks $(MKLINKS_FLAGS) $(MAN3_INSTALL_DIR) @echo "Installing command (.n) docs"; @cd $(TOP_DIR)/doc; for i in *.n; \ do \ rm -f $(MANN_INSTALL_DIR)/$$i; \ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ - $$i > $(MAN3_INSTALL_DIR)/$$i; \ - chmod 644 $(MAN3_INSTALL_DIR)/$$i; \ + $$i > $(MANN_INSTALL_DIR)/$$i; \ + chmod 444 $(MANN_INSTALL_DIR)/$$i; \ done; @echo "Cross-linking command (.n) docs"; - @$(UNIX_DIR)/mkLinks $(MANN_INSTALL_DIR) + @$(UNIX_DIR)/mkLinks $(MKLINKS_FLAGS) $(MANN_INSTALL_DIR) -Makefile: $(UNIX_DIR)/Makefile.in config.status +Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in $(SHELL) config.status -config.status: $(UNIX_DIR)/configure - ./config.status --recheck - -mostlyclean: clean clean: rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \ errors tclsh tcltest lib.exp - if test -f dltest/Makefile; then cd dltest; $(MAKE) clean; fi + cd dltest ; $(MAKE) clean distclean: clean rm -rf Makefile config.status config.cache config.log tclConfig.sh \ $(PACKAGE).* prototype - if test -f dltest/Makefile; then cd dltest; $(MAKE) distclean; fi + cd dltest ; $(MAKE) distclean depend: makedepend -- $(DEPEND_SWITCHES) -- $(SRCS) -bp: $(UNIX_DIR)/bp.c - $(CC) $(CC_SWITCHES) $(UNIX_DIR)/bp.c -o bp - # Test binaries. The rules for tclTestInit.o and xtTestInit.o are # complicated because they are compiled from tclAppInit.c. Can't use # the "-o" option because this doesn't work on some strange compilers @@ -871,9 +923,6 @@ tclLoadShl.o: $(UNIX_DIR)/tclLoadShl.c tclMain.o: $(GENERIC_DIR)/tclMain.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclMain.c -tclMtherr.o: $(UNIX_DIR)/tclMtherr.c - $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclMtherr.c - tclNamesp.o: $(GENERIC_DIR)/tclNamesp.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclNamesp.c @@ -925,7 +974,7 @@ tclStubInit.o: $(GENERIC_DIR)/tclStubInit.c tclUtil.o: $(GENERIC_DIR)/tclUtil.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclUtil.c -tclUtf.o: $(GENERIC_DIR)/tclUtf.c +tclUtf.o: $(GENERIC_DIR)/tclUtf.c $(GENERIC_DIR)/tclUniData.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclUtf.c tclVar.o: $(GENERIC_DIR)/tclVar.c @@ -946,6 +995,12 @@ tclTimer.o: $(GENERIC_DIR)/tclTimer.c tclThread.o: $(GENERIC_DIR)/tclThread.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclThread.c +tclThreadAlloc.o: $(GENERIC_DIR)/tclThreadAlloc.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclThreadAlloc.c + +tclThreadJoin.o: $(GENERIC_DIR)/tclThreadJoin.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclThreadJoin.c + tclThreadTest.o: $(GENERIC_DIR)/tclThreadTest.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclThreadTest.c @@ -979,24 +1034,15 @@ tclUnixThrd.o: $(UNIX_DIR)/tclUnixThrd.c tclUnixTime.o: $(UNIX_DIR)/tclUnixTime.c $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tclUnixTime.c -# CYGNUS LOCAL - -# Don't burn a TCL_LIBRARY path into tclUnixInit.o. -# We need Tcl to be location independent and a compiled -# in path just masks problems with the search algo. - -# FIXME: The TCL_PACKAGE_PATH is still compiled in, -# the only effect seems to be that the compiled in -# dir name appears on the auto_path after the tree -# has been moved. - -# END CYGNUS LOCAL - tclUnixInit.o: $(UNIX_DIR)/tclUnixInit.c $(GENERIC_DIR)/tclInitScript.h tclConfig.sh - $(CC) -c $(CC_SWITCHES) -DTCL_LIBRARY=\"\" \ + $(CC) -c $(CC_SWITCHES) -DTCL_LIBRARY=\"${TCL_LIBRARY}\" \ -DTCL_PACKAGE_PATH="\"${TCL_PACKAGE_PATH}\"" \ $(UNIX_DIR)/tclUnixInit.c +# This is the CFBundle interface. It is only used on Mac OS X. +tclMacOSXBundle.o: $(MAC_OSX_DIR)/tclMacOSXBundle.c + $(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tclMacOSXBundle.c + # The following targets are not completely general. They are provide # purely for documentation purposes so people who are interested in # the Xt based notifier can modify them to suit their own installation. @@ -1005,7 +1051,7 @@ xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} \ @DL_OBJS@ ${BUILD_DLTEST} ${CC} ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} \ @DL_OBJS@ @TCL_BUILD_LIB_SPEC@ ${LIBS} \ - @TCL_LD_SEARCH_FLAGS@ -L/usr/openwin/lib -lXt -o xttest + ${CC_SEARCH_FLAGS} -L/usr/openwin/lib -lXt -o xttest tclXtNotify.o: $(UNIX_DIR)/tclXtNotify.c $(CC) -c $(CC_SWITCHES) -I/usr/openwin/include \ @@ -1023,9 +1069,6 @@ tclXtTest.o: $(UNIX_DIR)/tclXtTest.c fixstrtod.o: $(COMPAT_DIR)/fixstrtod.c $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/fixstrtod.c -getcwd.o: $(COMPAT_DIR)/getcwd.c - $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/getcwd.c - opendir.o: $(COMPAT_DIR)/opendir.c $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/opendir.c @@ -1044,9 +1087,15 @@ strtod.o: $(COMPAT_DIR)/strtod.c strtol.o: $(COMPAT_DIR)/strtol.c $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtol.c +strtoll.o: $(COMPAT_DIR)/strtoll.c + $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtoll.c + strtoul.o: $(COMPAT_DIR)/strtoul.c $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtoul.c +strtoull.o: $(COMPAT_DIR)/strtoull.c + $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/strtoull.c + tmpnam.o: $(COMPAT_DIR)/tmpnam.c $(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/tmpnam.c @@ -1069,8 +1118,9 @@ tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c $(GENERIC_DIR)/tclStubInit.c: $(GENERIC_DIR)/tcl.decls \ $(GENERIC_DIR)/tclInt.decls - $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ - $(GENERIC_DIR)/tcl.decls $(GENERIC_DIR)/tclInt.decls + @echo "Warning: tclStubInit.c may be out of date." + @echo "Developers may want to run \"make genstubs\" to regenerate." + @echo "This warning can be safely ignored, do not report as a bug!" genstubs: $(TCL_EXE) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \ @@ -1094,6 +1144,24 @@ checkstubs: done # +# Target to check that all public APIs which are not command +# implementations have an entry in section three of the distributed +# manpages. +# + +checkdoc: + -@for i in `nm -p $(TCL_LIB_FILE) | awk '$$3 ~ /Tcl_/ { print $$3 }' \ + | grep -v 'Cmd$$' | sort -n`; do \ + match=0; \ + for j in $(TOP_DIR)/doc/*.3; do \ + if [ `grep '\-' $$j | grep -c $$i` -gt 0 ]; then \ + match=1; \ + fi; \ + done; \ + if [ $$match -eq 0 ]; then echo $$i; fi \ + done + +# # Target to check for proper usage of UCHAR macro. # @@ -1123,49 +1191,51 @@ rpm: all /bin/rpm mv RPMS/i386/*.rpm . rm -rf RPMS THIS.TCL.SPEC +mklinks: + $(TCL_EXE) $(UNIX_DIR)/mkLinks.tcl \ + $(UNIX_DIR)/../doc/*.[13n] > $(UNIX_DIR)/mkLinks + chmod +x $(UNIX_DIR)/mkLinks + # # Target to create a proper Tcl distribution from information in the # master source directory. DISTDIR must be defined to indicate where # to put the distribution. # -DISTROOT = /tmp/dist -DISTNAME = tcl@TCL_VERSION@@TCL_PATCH_LEVEL@ -ZIPNAME = tcl@TCL_MAJOR_VERSION@@TCL_MINOR_VERSION@@TCL_PATCH_LEVEL@.zip -DISTDIR = $(DISTROOT)/$(DISTNAME) +DISTROOT = /tmp/dist +DISTNAME = tcl${VERSION}${PATCH_LEVEL} +ZIPNAME = tcl${MAJOR_VERSION}${MINOR_VERSION}${PATCH_LEVEL}.zip +DISTDIR = $(DISTROOT)/$(DISTNAME) $(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in autoconf $(UNIX_DIR)/configure.in > $(UNIX_DIR)/configure -dist: $(UNIX_DIR)/configure + +dist: $(UNIX_DIR)/configure mklinks rm -rf $(DISTDIR) - mkdir $(DISTDIR) - mkdir $(DISTDIR)/unix + mkdir -p $(DISTDIR)/unix cp -p $(UNIX_DIR)/*.c $(UNIX_DIR)/*.h $(DISTDIR)/unix - rm -f $(DISTDIR)/unix/bp.c cp $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix chmod 664 $(DISTDIR)/unix/Makefile.in cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.in \ $(UNIX_DIR)/tcl.m4 $(UNIX_DIR)/aclocal.m4 \ $(UNIX_DIR)/tclConfig.sh.in $(UNIX_DIR)/install-sh \ $(UNIX_DIR)/README $(UNIX_DIR)/ldAix $(UNIX_DIR)/tcl.spec \ + $(UNIX_DIR)/mkLinks \ $(DISTDIR)/unix chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in chmod 775 $(DISTDIR)/unix/ldAix chmod +x $(DISTDIR)/unix/install-sh - - $(TCL_EXE) $(UNIX_DIR)/mkLinks.tcl \ - $(UNIX_DIR)/../doc/*.[13n] > $(DISTDIR)/unix/mkLinks - chmod +x $(DISTDIR)/unix/mkLinks mkdir $(DISTDIR)/generic cp -p $(GENERIC_DIR)/*.c $(GENERIC_DIR)/*.h $(DISTDIR)/generic cp -p $(GENERIC_DIR)/*.decls $(DISTDIR)/generic cp -p $(GENERIC_DIR)/README $(DISTDIR)/generic cp -p $(GENERIC_DIR)/tclGetDate.y $(DISTDIR)/generic cp -p $(TOP_DIR)/changes $(TOP_DIR)/ChangeLog $(TOP_DIR)/README* \ - $(TOP_DIR)/license.terms $(DISTDIR) + $(TOP_DIR)/ChangeLog.[12]??? $(TOP_DIR)/license.terms \ + $(DISTDIR) mkdir $(DISTDIR)/library cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \ $(TOP_DIR)/library/tclIndex $(DISTDIR)/library - for i in http2.3 http1.0 opt0.4 msgcat1.0 reg1.0 dde1.1 tcltest1.0; \ + for i in http1.0 http opt msgcat reg dde tcltest; \ do \ mkdir $(DISTDIR)/library/$$i ;\ cp -p $(TOP_DIR)/library/$$i/*.tcl $(DISTDIR)/library/$$i; \ @@ -1184,46 +1254,56 @@ dist: $(UNIX_DIR)/configure cp -p $(TOP_DIR)/tests/*.test $(TOP_DIR)/tests/README \ $(TOP_DIR)/tests/httpd $(TOP_DIR)/tests/*.tcl \ $(DISTDIR)/tests - mkdir $(DISTDIR)/tests/pkg - cp -p $(TOP_DIR)/license.terms $(DISTDIR)/tests/pkg - cp -p $(TOP_DIR)/tests/pkg/*.tcl $(DISTDIR)/tests/pkg mkdir $(DISTDIR)/win cp $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win - cp $(TOP_DIR)/win/configure.in \ - $(TOP_DIR)/win/configure \ + cp $(TOP_DIR)/win/configure.in $(TOP_DIR)/win/configure \ $(TOP_DIR)/win/tclConfig.sh.in \ $(TOP_DIR)/win/tcl.m4 $(TOP_DIR)/win/aclocal.m4 \ $(DISTDIR)/win - cp -p $(TOP_DIR)/win/*.c $(TOP_DIR)/win/*.h $(TOP_DIR)/win/*.rc \ - $(TOP_DIR)/win/*.ico $(DISTDIR)/win + cp -p $(TOP_DIR)/win/*.c $(TOP_DIR)/win/*.h \ + $(TOP_DIR)/win/*.ico $(TOP_DIR)/win/*.rc \ + $(DISTDIR)/win cp -p $(TOP_DIR)/win/*.bat $(DISTDIR)/win + $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/*.bat cp -p $(TOP_DIR)/win/makefile.* $(DISTDIR)/win + $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/makefile.* + cp -p $(TOP_DIR)/win/rules.vc $(DISTDIR)/win + $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/rules.vc + cp -p $(TOP_DIR)/win/coffbase.txt $(DISTDIR)/win + $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/coffbase.txt + cp -p $(TOP_DIR)/win/tcl.hpj.in $(DISTDIR)/win + $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/tcl.hpj.in + cp -p $(TOP_DIR)/win/tcl.ds* $(DISTDIR)/win + $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/win/tcl.ds* cp -p $(TOP_DIR)/win/README $(DISTDIR)/win cp -p $(TOP_DIR)/license.terms $(DISTDIR)/win mkdir $(DISTDIR)/mac - cp -p $(TOP_DIR)/mac/tclMacProjects.sea.hqx $(DISTDIR)/mac - cp -p $(TOP_DIR)/mac/*.c $(TOP_DIR)/mac/*.h $(TOP_DIR)/mac/*.r \ + cp -p $(TOP_DIR)/mac/tclMacProjects.sea.hqx \ + $(TOP_DIR)/mac/*.c $(TOP_DIR)/mac/*.h $(TOP_DIR)/mac/*.r \ $(DISTDIR)/mac cp -p $(TOP_DIR)/mac/porting.notes $(TOP_DIR)/mac/README $(DISTDIR)/mac - cp -p $(TOP_DIR)/mac/*.exp $(TOP_DIR)/mac/*.pch $(DISTDIR)/mac - cp -p $(TOP_DIR)/mac/*.doc $(DISTDIR)/mac - cp -p $(TOP_DIR)/mac/*.html $(DISTDIR)/mac + cp -p $(TOP_DIR)/mac/*.pch $(DISTDIR)/mac + cp -p $(TOP_DIR)/mac/*.doc $(TOP_DIR)/mac/*.html $(DISTDIR)/mac cp -p $(TOP_DIR)/license.terms $(DISTDIR)/mac + mkdir $(DISTDIR)/macosx + cp -p $(TOP_DIR)/macosx/Makefile \ + $(TOP_DIR)/macosx/*.c \ + $(DISTDIR)/macosx + mkdir $(DISTDIR)/macosx/Tcl.pbproj + cp -p $(TOP_DIR)/macosx/Tcl.pbproj/*.pbx* $(DISTDIR)/macosx/Tcl.pbproj mkdir $(DISTDIR)/unix/dltest cp -p $(UNIX_DIR)/dltest/*.c $(UNIX_DIR)/dltest/Makefile.in \ + $(UNIX_DIR)/dltest/README \ $(DISTDIR)/unix/dltest - cp -p $(UNIX_DIR)/dltest/configure.in $(UNIX_DIR)/dltest/configure \ - $(UNIX_DIR)/dltest/README $(DISTDIR)/unix/dltest mkdir $(DISTDIR)/tools - cp -p $(TOP_DIR)/tools/Makefile.in \ - $(TOP_DIR)/tools/README \ - $(TOP_DIR)/tools/configure.in \ - $(TOP_DIR)/tools/*.tcl \ - $(TOP_DIR)/tools/man2tcl.c \ - $(TOP_DIR)/tools/tcl.wse.in \ - $(TOP_DIR)/tools/*.bmp \ - $(TOP_DIR)/tools/tcl.hpj.in \ + cp -p $(TOP_DIR)/tools/Makefile.in $(TOP_DIR)/tools/README \ + $(TOP_DIR)/tools/configure $(TOP_DIR)/tools/configure.in \ + $(TOP_DIR)/tools/*.tcl $(TOP_DIR)/tools/man2tcl.c \ + $(TOP_DIR)/tools/tcl.wse.in $(TOP_DIR)/tools/*.bmp \ + $(TOP_DIR)/tools/tcl.hpj.in \ $(DISTDIR)/tools + $(TCL_EXE) $(TOOL_DIR)/eolFix.tcl -crlf $(DISTDIR)/tools/tcl.hpj.in \ + $(DISTDIR)/tools/tcl.wse.in # # The following target can only be used for non-patch releases. Use |