summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rw-r--r--macosx/Tcl.xcodeproj/project.pbxproj30
-rw-r--r--tests/load.test10
-rw-r--r--tests/macOSXLoad.test35
-rw-r--r--tests/unload.test7
-rw-r--r--unix/Makefile.in4
-rwxr-xr-xunix/configure13
-rw-r--r--unix/configure.in11
-rw-r--r--unix/dltest/Makefile.in74
9 files changed, 177 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 14f5e2f..30693f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2006-12-17 Daniel Steffen <das@users.sourceforge.net>
+
+ * tests/macOSXLoad.test (new file): add testing of .bundle loading and
+ * tests/load.test: unloading on Darwin (in addition to
+ * tests/unload.test: existing tests of .dylib loading).
+ * macosx/Tcl.xcodeproj/project.pbxproj: add building of dltest binaries
+ so that testsuite run from Xcode can use them; fix testsuite run script.
+ * unix/configure.in: add support for building dltest binaries as
+ * unix/dltest/Makefile.in: .bundle (in addition to .dylib) on Darwin.
+ * unix/Makefile.in: add stub lib dependency to dltest target.
+ * unix/configure: autoconf-2.59
+
+ * tests/append.test: fix cleanup failure when all tests are skipped.
+
+ * tests/chan.test (chan-16.9): cleanup chan event handler to avoid
+ causing error in event.test when running testsuite with -singleproc 1.
+
+ * tests/info.test: add !singleTestInterp constraint to tests that fail
+ when running testsuite with -singleproc 1. [Bug 1605269]
+
2006-12-14 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
* doc/string.n: Fix example. [Bug 1615277]
diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj
index 44ce16d..14e3501 100644
--- a/macosx/Tcl.xcodeproj/project.pbxproj
+++ b/macosx/Tcl.xcodeproj/project.pbxproj
@@ -177,6 +177,7 @@
/* Begin PBXFileReference section */
8DD76FB20486AB0100D96B5E /* tcltest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tcltest; sourceTree = BUILT_PRODUCTS_DIR; };
F9408AF20B195C08009F7CAC /* tclMathOp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tclMathOp.c; sourceTree = "<group>"; };
+ F95FAFF90B34F1130072E431 /* macOSXLoad.test */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = macOSXLoad.test; sourceTree = "<group>"; };
F966C07408F2820D005CB29B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
F96D3DFA08F272A4004A47F5 /* ChangeLog */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = ChangeLog; sourceTree = "<group>"; };
F96D3DFB08F272A4004A47F5 /* changes */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = changes; sourceTree = "<group>"; };
@@ -1608,6 +1609,7 @@
F96D438B08F272B6004A47F5 /* lset.test */,
F96D438C08F272B6004A47F5 /* lsetComp.test */,
F96D438D08F272B6004A47F5 /* macOSXFCmd.test */,
+ F95FAFF90B34F1130072E431 /* macOSXLoad.test */,
F96D438E08F272B6004A47F5 /* main.test */,
F9ECB1CB0B26534C00A28025 /* mathop.test */,
F96D438F08F272B6004A47F5 /* misc.test */,
@@ -1857,6 +1859,7 @@
F9A5C5F508F651A2008AE941 /* ShellScript */,
8DD76FAB0486AB0100D96B5E /* Sources */,
8DD76FAD0486AB0100D96B5E /* Frameworks */,
+ F95FA74C0B32CE190072E431 /* ShellScript */,
);
buildRules = (
);
@@ -1902,6 +1905,29 @@
/* End PBXProject section */
/* Begin PBXShellScriptBuildPhase section */
+ F95FA74C0B32CE190072E431 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${DERIVED_FILE_DIR}/tcl/tclConfig.sh",
+ "${TCL_SRCROOT}/generic/tclStubLib.c",
+ "${TCL_SRCROOT}/unix/dltest/pkga.c",
+ "${TCL_SRCROOT}/unix/dltest/pkgb.c",
+ "${TCL_SRCROOT}/unix/dltest/pkgc.c",
+ "${TCL_SRCROOT}/unix/dltest/pkgd.c",
+ "${TCL_SRCROOT}/unix/dltest/pkge.c",
+ "${TCL_SRCROOT}/unix/dltest/pkgf.c",
+ "${TCL_SRCROOT}/unix/dltest/pkgua.c",
+ );
+ outputPaths = (
+ "${DERIVED_FILE_DIR}/tcl/dltest.marker",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/bash;
+ shellScript = "## dltest build script phase\n\nrm -f \"${DERIVED_FILE_DIR}/tcl/dltest.marker\"\nmake -C \"${DERIVED_FILE_DIR}/tcl\" dltest.marker\nln -fsh \"${DERIVED_FILE_DIR}/tcl/dltest\" \"${CONFIGURATION_BUILD_DIR}\"\n";
+ };
F97258A40A86873C00096C78 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -1913,7 +1939,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "if [ \"${ACTION:-build}\" == \"build\" ]; then\ncd \"${TARGET_TEMP_DIR}\"; rm -rf \"${DERIVED_FILE_DIR}\"; mkdir -p \"${DERIVED_FILE_DIR}\"\nprintf '%s%s%s%s%s' '\npackage require tcltest 2.2\nnamespace import tcltest::*\nconfigure -testdir [file normalize {' \"${TCL_SRCROOT}\" '/tests}]\nconfigure -tmpdir [file normalize {' \"${DERIVED_FILE_DIR}\" '}]\nconfigure -verbose [concat [configure -verbose] line]\n# following test only fails when testsuite is run from inside Xcode, so skip it\nconfigure -skip [concat [configure -verbose] stack-3.1]\nrunAllTests\n' | \"${TEST_RIG}\"; TEST_RIG_RESULT=$?\n[ ${TEST_RIG_RESULT} -ne 0 ] && echo \"tcltest:0: error: tcltest exited abnormally with code ${TEST_RIG_RESULT}.\"\nexit ${TEST_RIG_RESULT}\nfi";
+ shellScript = "if [ \"${ACTION:-build}\" == \"build\" ]; then\ncd \"${TARGET_TEMP_DIR}\"; rm -rf \"${DERIVED_FILE_DIR}\"; mkdir -p \"${DERIVED_FILE_DIR}\"\nprintf '%s%s%s%s%s' '\npackage require tcltest 2.2\nnamespace import tcltest::*\nconfigure -testdir [file normalize {' \"${TCL_SRCROOT}\" '/tests}]\nconfigure -tmpdir [file normalize {' \"${DERIVED_FILE_DIR}\" '}]\nconfigure -verbose [concat [configure -verbose] line]\n# following test only fails when testsuite is run from inside Xcode, so skip it\nconfigure -skip [concat [configure -skip] stack-3.1]\nrunAllTests\n' | \"${TEST_RIG}\"; TEST_RIG_RESULT=$?\n[ ${TEST_RIG_RESULT} -ne 0 ] && echo \"tcltest:0: error: tcltest exited abnormally with code ${TEST_RIG_RESULT}.\"\nexit ${TEST_RIG_RESULT}\nfi";
};
F9A5C5F508F651A2008AE941 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@@ -1926,6 +1952,8 @@
"${TCL_SRCROOT}/unix/tcl.m4",
"${TCL_SRCROOT}/unix/aclocal.m4",
"${TCL_SRCROOT}/unix/tclConfig.sh.in",
+ "${TCL_SRCROOT}/unix/Makefile.in",
+ "${TCL_SRCROOT}/unix/dltest/Makefile.in",
);
outputPaths = (
"${DERIVED_FILE_DIR}/tcl/tclConfig.sh",
diff --git a/tests/load.test b/tests/load.test
index acdb025..373327f 100644
--- a/tests/load.test
+++ b/tests/load.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: load.test,v 1.16 2006/10/09 19:15:45 msofer Exp $
+# RCS: @(#) $Id: load.test,v 1.17 2006/12/17 03:47:08 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -19,9 +19,10 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
# Figure out what extension is used for shared libraries on this
# platform.
-
+if {![info exists ext]} {
+ set ext [info sharedlibextension]
+}
# Tests require the existence of one of the DLLs in the dltest directory.
-set ext [info sharedlibextension]
set testDir [file join [file dirname [info nameofexecutable]] dltest]
set x [file join $testDir pkga$ext]
set dll "[file tail $x]Required"
@@ -195,7 +196,8 @@ test load-9.1 {Tcl_StaticPackage, load already-loaded package into another inter
-result {{{{} Loadninepointone} {{} Tcltest}} {{{} Loadninepointone} {{} Tcltest}}} \
-cleanup { interp delete child1 ; interp delete child2 }
-
+
# cleanup
+unset ext
::tcltest::cleanupTests
return
diff --git a/tests/macOSXLoad.test b/tests/macOSXLoad.test
new file mode 100644
index 0000000..6db695e
--- /dev/null
+++ b/tests/macOSXLoad.test
@@ -0,0 +1,35 @@
+# Commands covered: load unload
+#
+# This file contains a collection of tests for one or more of the Tcl
+# built-in commands. Sourcing this file into Tcl runs the tests and
+# generates output for errors. No output means no errors were found.
+#
+# Copyright (c) 1995 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# RCS: @(#) $Id: macOSXLoad.test,v 1.1 2006/12/17 03:47:08 das Exp $
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest 2
+ namespace import -force ::tcltest::*
+}
+set oldTSF $::tcltest::testSingleFile
+set ::tcltest::testSingleFile false
+
+if {[testConstraint unix] && $tcl_platform(os) eq "Darwin" &&
+ ![string match *pkga* [info loaded]]} {
+ # On Darwin, test .bundle (un)loading in addition to .dylib
+ set ext .bundle
+ source [file join [file dirname [info script]] load.test]
+ set ext .bundle
+ source [file join [file dirname [info script]] unload.test]
+ unset -nocomplain ext
+}
+
+set ::tcltest::testSingleFile $oldTSF
+unset oldTSF
+::tcltest::cleanupTests
+return
diff --git a/tests/unload.test b/tests/unload.test
index 8af0672..d26f012 100644
--- a/tests/unload.test
+++ b/tests/unload.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: unload.test,v 1.5 2006/03/21 11:12:29 dkf Exp $
+# RCS: @(#) $Id: unload.test,v 1.6 2006/12/17 03:47:08 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -20,9 +20,11 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
# Figure out what extension is used for shared libraries on this
# platform.
+if {![info exists ext]} {
+ set ext [info sharedlibextension]
+}
# Tests require the existence of one of the DLLs in the dltest directory.
-set ext [info sharedlibextension]
set testDir [file join [file dirname [info nameofexecutable]] dltest]
set x [file join $testDir pkgua$ext]
set dll "[file tail $x]Required"
@@ -214,5 +216,6 @@ test unload-4.6 {basic unloading of unloadable package from a safe interpreter,
# cleanup
interp delete child
interp delete child-trusted
+unset ext
::tcltest::cleanupTests
return
diff --git a/unix/Makefile.in b/unix/Makefile.in
index eb95043..cd63b0f 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -4,7 +4,7 @@
# "./configure", which is a configuration script generated by the "autoconf"
# program (constructs like "@foo@" will get replaced in the actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.199 2006/12/05 18:45:51 andreas_kupries Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.200 2006/12/17 03:47:08 das Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -696,7 +696,7 @@ gentommath_h:
# Makefile in the dltest subdirectory creates the dltest.marker file in this
# directory after a successful build.
-dltest.marker:
+dltest.marker: ${STUB_LIB_FILE}
cd dltest ; $(MAKE)
INSTALL_TARGETS = install-binaries install-libraries install-doc @EXTRA_INSTALL@
diff --git a/unix/configure b/unix/configure
index c6ec11d..0c34710 100755
--- a/unix/configure
+++ b/unix/configure
@@ -308,7 +308,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT INSTALL_TZDATA TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT INSTALL_TZDATA TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_YEAR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_STUB_LIB_PATH TCL_INCLUDE_SPEC TCL_BUILD_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_PATH TCL_SRC_DIR CFG_TCL_SHARED_LIB_SUFFIX CFG_TCL_UNSHARED_LIB_SUFFIX CFG_TCL_EXPORT_FILE_SUFFIX TCL_SHARED_BUILD LD_LIBRARY_PATH_VAR TCL_BUILD_LIB_SPEC TCL_NEEDS_EXP_FILE TCL_BUILD_EXP_FILE TCL_EXP_FILE TCL_LIB_VERSIONS_OK TCL_SHARED_LIB_SUFFIX TCL_UNSHARED_LIB_SUFFIX TCL_HAS_LONGLONG BUILD_DLTEST TCL_PACKAGE_PATH TCL_MODULE_PATH TCL_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML DLTEST_LD DLTEST_SUFFIX'
ac_subst_files=''
# Initialize some variables set by options.
@@ -16839,6 +16839,12 @@ _ACEOF
fi
fi
+ # Build .bundle dltest binaries in addition to .dylib
+ DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}'
+ DLTEST_SUFFIX=".bundle"
+else
+ DLTEST_LD='${SHLIB_LD}'
+ DLTEST_SUFFIX=""
fi
#--------------------------------------------------------------------
@@ -17599,6 +17605,9 @@ TCL_SHARED_BUILD=${SHARED_BUILD}
+
+
+
ac_config_files="$ac_config_files Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in"
cat >confcache <<\_ACEOF
@@ -18316,6 +18325,8 @@ s,@EXTRA_CC_SWITCHES@,$EXTRA_CC_SWITCHES,;t t
s,@EXTRA_INSTALL@,$EXTRA_INSTALL,;t t
s,@EXTRA_INSTALL_BINARIES@,$EXTRA_INSTALL_BINARIES,;t t
s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;t t
+s,@DLTEST_LD@,$DLTEST_LD,;t t
+s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t
CEOF
_ACEOF
diff --git a/unix/configure.in b/unix/configure.in
index 12955c4..a4de014 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.152 2006/11/13 08:23:11 das Exp $
+# RCS: @(#) $Id: configure.in,v 1.153 2006/12/17 03:47:09 das Exp $
AC_INIT([tcl],[8.5])
AC_PREREQ(2.59)
@@ -530,6 +530,12 @@ if test "`uname -s`" = "Darwin" ; then
AC_DEFINE(HAVE_WEAK_IMPORT, 1, [Is weak import available?])
fi
fi
+ # Build .bundle dltest binaries in addition to .dylib
+ DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}'
+ DLTEST_SUFFIX=".bundle"
+else
+ DLTEST_LD='${SHLIB_LD}'
+ DLTEST_SUFFIX=""
fi
#--------------------------------------------------------------------
@@ -810,6 +816,9 @@ AC_SUBST(EXTRA_INSTALL)
AC_SUBST(EXTRA_INSTALL_BINARIES)
AC_SUBST(EXTRA_BUILD_HTML)
+AC_SUBST(DLTEST_LD)
+AC_SUBST(DLTEST_SUFFIX)
+
dnl Disable the automake-friendly normalization of LIBOBJS
dnl performed by autoconf 2.53 and later. It's not correct for us.
define([_AC_LIBOBJS_NORMALIZE],[])
diff --git a/unix/dltest/Makefile.in b/unix/dltest/Makefile.in
index f151262..53a45a9 100644
--- a/unix/dltest/Makefile.in
+++ b/unix/dltest/Makefile.in
@@ -1,60 +1,102 @@
# This Makefile is used to create several test cases for Tcl's load
# command. It also illustrates how to take advantage of configuration
# exported by Tcl to set up Makefiles for shared libraries.
-# RCS: @(#) $Id: Makefile.in,v 1.19 2005/11/27 02:33:50 das Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.20 2006/12/17 03:47:09 das Exp $
CC = @CC@
LIBS = @TCL_BUILD_STUB_LIB_SPEC@ @TCL_LIBS@
AC_FLAGS = @DEFS@
-SHLIB_CFLAGS = @SHLIB_CFLAGS@
SHLIB_LD = @SHLIB_LD@
+SHLIB_CFLAGS = @SHLIB_CFLAGS@
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
SHLIB_SUFFIX = @SHLIB_SUFFIX@
+DLTEST_LD = @DLTEST_LD@
+DLTEST_SUFFIX = @DLTEST_SUFFIX@
SRC_DIR = @TCL_SRC_DIR@/unix/dltest
BUILD_DIR = @builddir@
TCL_VERSION= @TCL_VERSION@
CFLAGS_DEBUG = @CFLAGS_DEBUG@
CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
+CFLAGS = @CFLAGS_DEFAULT@ @CFLAGS@
+LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
+LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
+LDFLAGS = @LDFLAGS_DEFAULT@ @LDFLAGS@
-CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@
CC_SWITCHES = $(CFLAGS) -I${SRC_DIR}/../../generic -I${BUILD_DIR}/.. -DTCL_MEM_DEBUG \
${SHLIB_CFLAGS} -DUSE_TCL_STUBS ${AC_FLAGS}
all: pkga${SHLIB_SUFFIX} pkgb${SHLIB_SUFFIX} pkgc${SHLIB_SUFFIX} pkgd${SHLIB_SUFFIX} pkge${SHLIB_SUFFIX} pkgua${SHLIB_SUFFIX}
+ @if test -n "$(DLTEST_SUFFIX)"; then $(MAKE) dltest_suffix; fi
+ @touch ../dltest.marker
+
+dltest_suffix: pkga${DLTEST_SUFFIX} pkgb${DLTEST_SUFFIX} pkgc${DLTEST_SUFFIX} pkgd${DLTEST_SUFFIX} pkge${DLTEST_SUFFIX} pkgua${DLTEST_SUFFIX}
@touch ../dltest.marker
-pkga${SHLIB_SUFFIX}: $(SRC_DIR)/pkga.c
+pkga.o: $(SRC_DIR)/pkga.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkga.c
- ${SHLIB_LD} -o pkga${SHLIB_SUFFIX} pkga.o ${SHLIB_LD_LIBS}
-pkgb${SHLIB_SUFFIX}: $(SRC_DIR)/pkgb.c
+pkgb.o: $(SRC_DIR)/pkgb.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgb.c
- ${SHLIB_LD} -o pkgb${SHLIB_SUFFIX} pkgb.o ${SHLIB_LD_LIBS}
-pkgc${SHLIB_SUFFIX}: $(SRC_DIR)/pkgc.c
+pkgc.o: $(SRC_DIR)/pkgc.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgc.c
- ${SHLIB_LD} -o pkgc${SHLIB_SUFFIX} pkgc.o ${SHLIB_LD_LIBS}
-pkgd${SHLIB_SUFFIX}: $(SRC_DIR)/pkgd.c
+pkgd.o: $(SRC_DIR)/pkgd.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgd.c
- ${SHLIB_LD} -o pkgd${SHLIB_SUFFIX} pkgd.o ${SHLIB_LD_LIBS}
-pkge${SHLIB_SUFFIX}: $(SRC_DIR)/pkge.c
+pkge.o: $(SRC_DIR)/pkge.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkge.c
- ${SHLIB_LD} -o pkge${SHLIB_SUFFIX} pkge.o ${SHLIB_LD_LIBS}
-pkgua${SHLIB_SUFFIX}: $(SRC_DIR)/pkgua.c
+pkgua.o: $(SRC_DIR)/pkgua.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgua.c
+
+pkga${SHLIB_SUFFIX}: pkga.o
+ ${SHLIB_LD} -o pkga${SHLIB_SUFFIX} pkga.o ${SHLIB_LD_LIBS}
+
+pkgb${SHLIB_SUFFIX}: pkgb.o
+ ${SHLIB_LD} -o pkgb${SHLIB_SUFFIX} pkgb.o ${SHLIB_LD_LIBS}
+
+pkgc${SHLIB_SUFFIX}: pkgc.o
+ ${SHLIB_LD} -o pkgc${SHLIB_SUFFIX} pkgc.o ${SHLIB_LD_LIBS}
+
+pkgd${SHLIB_SUFFIX}: pkgd.o
+ ${SHLIB_LD} -o pkgd${SHLIB_SUFFIX} pkgd.o ${SHLIB_LD_LIBS}
+
+pkge${SHLIB_SUFFIX}: pkge.o
+ ${SHLIB_LD} -o pkge${SHLIB_SUFFIX} pkge.o ${SHLIB_LD_LIBS}
+
+pkgua${SHLIB_SUFFIX}: pkgua.o
${SHLIB_LD} -o pkgua${SHLIB_SUFFIX} pkgua.o ${SHLIB_LD_LIBS}
+pkga${DLTEST_SUFFIX}: pkga.o
+ ${DLTEST_LD} -o pkga${DLTEST_SUFFIX} pkga.o ${SHLIB_LD_LIBS}
+
+pkgb${DLTEST_SUFFIX}: pkgb.o
+ ${DLTEST_LD} -o pkgb${DLTEST_SUFFIX} pkgb.o ${SHLIB_LD_LIBS}
+
+pkgc${DLTEST_SUFFIX}: pkgc.o
+ ${DLTEST_LD} -o pkgc${DLTEST_SUFFIX} pkgc.o ${SHLIB_LD_LIBS}
+
+pkgd${DLTEST_SUFFIX}: pkgd.o
+ ${DLTEST_LD} -o pkgd${DLTEST_SUFFIX} pkgd.o ${SHLIB_LD_LIBS}
+
+pkge${DLTEST_SUFFIX}: pkge.o
+ ${DLTEST_LD} -o pkge${DLTEST_SUFFIX} pkge.o ${SHLIB_LD_LIBS}
+
+pkgua${DLTEST_SUFFIX}: pkgua.o
+ ${DLTEST_LD} -o pkgua${DLTEST_SUFFIX} pkgua.o ${SHLIB_LD_LIBS}
+
clean:
- rm -f *.o config.cache config.log config.status
- rm -f lib.exp ../dltest.marker
+ rm -f *.o lib.exp ../dltest.marker
@if test "$(SHLIB_SUFFIX)" != ""; then \
echo "rm -f *${SHLIB_SUFFIX}" ; \
rm -f *${SHLIB_SUFFIX} ; \
fi
+ @if test "$(DLTEST_SUFFIX)" != ""; then \
+ echo "rm -f *${DLTEST_SUFFIX}" ; \
+ rm -f *${DLTEST_SUFFIX} ; \
+ fi
distclean: clean
rm -f Makefile