Skip to content

Commit

Permalink
Updated TEA for tdom core. tcldomsh seg fault makes that retarded.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolf committed Jun 6, 2013
1 parent 4be49b7 commit 2d7e246
Show file tree
Hide file tree
Showing 9 changed files with 7,524 additions and 8,224 deletions.
79 changes: 46 additions & 33 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id$

#========================================================================
# Add additional lines to handle any additional AC_SUBST cases that
Expand Down Expand Up @@ -72,7 +70,7 @@ PKG_HEADERS = @PKG_HEADERS@
PKG_LIB_FILE = @PKG_LIB_FILE@
PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@

lib_BINARIES = $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE)
lib_BINARIES = $(PKG_LIB_FILE)
BINARIES = $(lib_BINARIES)

SHELL = @SHELL@
Expand All @@ -83,9 +81,10 @@ exec_prefix = @exec_prefix@

bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
includedir = @includedir@

DESTDIR =

Expand All @@ -96,17 +95,19 @@ pkgincludedir = $(includedir)/$(PKG_DIR)

top_builddir = .

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_OPTIONS =
INSTALL = $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS}
INSTALL_DATA_DIR = ${INSTALL} -d -m 755
INSTALL_PROGRAM = ${INSTALL} -m 555
INSTALL_DATA = ${INSTALL} -m 444
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
INSTALL_LIBRARY = ${INSTALL_DATA}

PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
CC = @CC@
CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
CFLAGS_WARNING = @CFLAGS_WARNING@
CLEANFILES = @CLEANFILES@
EXEEXT = @EXEEXT@
LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
MAKE_LIB = @MAKE_LIB@
Expand All @@ -126,9 +127,13 @@ TCL_SRC_DIR = @TCL_SRC_DIR@
#TK_BIN_DIR = @TK_BIN_DIR@
#TK_SRC_DIR = @TK_SRC_DIR@

MATH_LIBS = @MATH_LIBS@

# Not used, but retained for reference of what libs Tcl required
#TCL_LIBS = @TCL_LIBS@

TDOMSHELL_LIBS = @TCL_LIBS@ @SHLIB_LD_LIBS@

#========================================================================
# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
# package without installing. The other environment variables allow us
Expand All @@ -139,18 +144,17 @@ TCL_SRC_DIR = @TCL_SRC_DIR@
EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR)
#EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
TCLLIBPATH = $(top_builddir)
TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
@LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library`
PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
PATH="$(EXTRA_PATH):$(PATH)" \
TCLLIBPATH="$(TCLLIBPATH)"
# TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`

TCLSH_PROG = @TCLSH_PROG@
TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
TCLSH = $(PKG_ENV) $(TCLSH_ENV) $(TCLSH_PROG)

#WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
#WISH_PROG = @WISH_PROG@
#WISH = $(TCLSH_ENV) $(WISH_PROG)

#WISH = $(PKG_ENV) $(TCLSH_ENV) $(WISH_ENV) $(WISH_PROG)

SHARED_BUILD = @SHARED_BUILD@

Expand All @@ -167,21 +171,25 @@ PKG_CFLAGS = @PKG_CFLAGS@
#DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
DEFS = @DEFS@ $(PKG_CFLAGS)

CONFIG_CLEAN_FILES = Makefile tdomConfig.sh tdom.tcl
# Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
CLEANFILES = @CLEANFILES@

CPPFLAGS = @CPPFLAGS@
LIBS = @PKG_LIBS@ @LIBS@
AR = @AR@
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

.SUFFIXES: .c .$(OBJEXT)

#========================================================================
# Start of user-definable TARGETS section
#========================================================================

#========================================================================
# TEA TARGETS. Please note that the "libraries:" target refers to platform
# independent files, and the "binaries:" target inclues executable programs and
# independent files, and the "binaries:" target includes executable programs and
# platform-dependent libraries. Modify these targets so that they install
# the various pieces of your package. The make and install rules
# for the BINARIES that you specified above have already been done.
Expand All @@ -193,10 +201,10 @@ all: binaries libraries doc
# TDOM enabled shell is build as an extra directive, since non TEA.
#========================================================================

$(TDOMSHELL): $(PKG_OBJECTS)
$(TDOMSHELL): $(PKG_OBJECTS) $(srcdir)/unix/tclAppInit.c
$(COMPILE) -c `@CYGPATH@ $(srcdir)/unix/tclAppInit.c`
$(CC) @LDFLAGS@ -o $@ tclAppInit.$(OBJEXT) $(PKG_OBJECTS) \
$(TCL_LIBS) $(TCL_LIB_SPEC) $(LIBS) $(TDOM_LD_SEARCH_FLAGS)
$(TCL_LIB_SPEC) $(TDOMSHELL_LIBS) $(TDOM_LD_SEARCH_FLAGS)

#========================================================================
# The binaries target builds executable programs, Windows .dll's, unix
Expand All @@ -209,7 +217,6 @@ binaries: $(BINARIES) pkgIndex.tcl-hand

libraries:


#========================================================================
# Your doc target should differentiate from doc builds (by the developer)
# and doc installs (see install-doc), which just install the docs on the
Expand All @@ -228,7 +235,7 @@ install-binaries: binaries install-lib-binaries install-bin-binaries
#========================================================================

install-libraries: libraries
@mkdir -p $(DESTDIR)$(includedir)
@$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir)
@echo "Installing header files in $(DESTDIR)$(includedir)"
@list='$(PKG_HEADERS)'; for i in $$list; do \
echo "Installing $(srcdir)/$$i" ; \
Expand All @@ -241,11 +248,10 @@ install-libraries: libraries
#========================================================================

install-doc: doc
@mkdir -p $(DESTDIR)$(mandir)/mann
@$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann
@echo "Installing documentation in $(DESTDIR)$(mandir)"
@list='$(srcdir)/doc/*.n'; for i in $$list; do \
echo "Installing $$i"; \
rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
done

Expand All @@ -259,6 +265,16 @@ shell: binaries libraries
gdb:
$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)

VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high \
--leak-check=yes --show-reachable=yes -v

valgrind: binaries libraries
$(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) \
`@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)

valgrindshell: binaries libraries
$(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT)

depend:

#========================================================================
Expand Down Expand Up @@ -296,7 +312,7 @@ $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
# As necessary, add $(srcdir):$(srcdir)/compat:....
#========================================================================

VPATH = $(srcdir):$(srcdir)/expat:$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win
VPATH = $(srcdir):$(srcdir)/expat:$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win:$(srcdir)/macosx

.c.@OBJEXT@:
$(COMPILE) -c `@CYGPATH@ $<` -o $@
Expand All @@ -317,7 +333,7 @@ pkgIndex.tcl-hand:
#========================================================================

#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
DIST_ROOT = /tmp/dist
DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)

Expand Down Expand Up @@ -363,7 +379,7 @@ dist: dist-clean
# variable in configure.in
#========================================================================

clean:
clean:
-test -z "$(BINARIES)" || rm -f $(BINARIES)
-rm -f *.$(OBJEXT) core *.core
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
Expand All @@ -385,11 +401,11 @@ distclean: clean
#========================================================================

install-lib-binaries: binaries
@mkdir -p $(DESTDIR)$(pkglibdir)
@$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir)
@list='$(lib_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
$(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p; \
stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
if test "x$$stub" = "xstub"; then \
echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
Expand Down Expand Up @@ -419,7 +435,6 @@ install-lib-binaries: binaries
echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
$(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
fi
$(INSTALL_DATA) tdomConfig.sh $(DESTDIR)$(libdir)

#========================================================================
# Install binary executables (e.g. .exe files and dependent .dll files)
Expand All @@ -431,16 +446,14 @@ install-lib-binaries: binaries
#========================================================================

install-bin-binaries: binaries
@mkdir -p $(DESTDIR)$(bindir)
@$(INSTALL_DATA_DIR) $(DESTDIR)$(bindir)
@list='$(bin_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
fi; \
done

.SUFFIXES: .c .$(OBJEXT)

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
Expand Down
33 changes: 0 additions & 33 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ COMPILING/USING tDOM
Alternatively, you can build the tDOM package in just about any
directory elsewhere on the fileystem (since TEA-compatible).

NOTE: Be sure to have the CC=gcc defined if you're using GCC.

You might also want to do "../configure --help" to get list of all
supported options of the configure script. In the "unix" directory
there is a "CONFIG" file containing some examples on how to invoke
Expand All @@ -76,37 +74,6 @@ COMPILING/USING tDOM

The compile process will build the tDOM shared library suitable for
loading into the Tcl shell using standard "package require" mechanism.
Optionally the make process can also generate the "tcldomsh"
executable shell with tDOM functionality built-in. You can use this
shell as any other Tcl shell. To do this, you have to:

make tcldomsh

Note, however, that this step is optional.


Note for Tcl 8.0.5 users:
-------------------------

Per default, this release of tDOM links against Tcl stubs
library. To build it against Tcl8.0.5, use the configure-tcl8.0.5
script to generate the Makefile.

If you want to recreate the configure script for building against
Tcl8.0.5 please edit the "configure.in" file in this directory,
comment-out the AC_DEFINE(USE_TCL_STUBS) directive and run
autoconf. Please be sure to use autoconf with version 2.59.


PLATFORMS
HP-UX-10.20 (both ansi cc and gcc)
HP-UX-9.x
Linux 2.2.5 (egcs 2.91.66, SuSE 6.1)
Solaris 2.5.1+ (both gcc and SunWorks compilers)
W2K (VC++ 6.0)
Mac OS X 10.2.6 (Apple's gcc)

Other machines and OS's are not tested but should work too.

Have fun!

Expand Down
Loading

0 comments on commit 2d7e246

Please sign in to comment.